Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 844 articles
Browse latest View live

RGBDSLAMv2 remote online mapping visualization problems in RViz

$
0
0
Hi, as I already mentioned in earlier posts, I am attempting to remotely build a map in real-time with RGBDSLAM over Wifi (if possible). I have Raspberry Pi 3 on my robot with Kinect XBOX 360 from which I am streaming RGB and depth images while on my workstation side I run RGBDSLAM. I managed to successfully build a map with GUI enabled, but in case of headless mapping after using rosservice calls rosservice call /rgbdslam/ros_ui_b pause false rosservice call /rgbdslam/ros_ui send_al and subscribing to `/rgbdslam/batch_clou`d topic in Rviz I can only visualize the point cloud of environment in the direction that camera is facing atm. I want to visualize an incrementally building of map in RViz like it is done in RGBDSLAM GUI. I noticed that I get "No Map received" warning even if the map node is published and part of /tf. My tf look like [this](https://imgur.com/a/N4CyxMd). In RViz tf is "jumping around" the grid so I suspect something is not right with it even no error/warning is produced. Shouldn't the transform be with /map as the root of tree like `/map --> /odom --> /base_link --> /camera_link --> ...` I can't seem to get it right even after fideling with params some time. The current setting is like this: Can somebody guide me how to resolve this issues? It would be much appreciated.

What is the difference between geometry and tf quaternions?

$
0
0
I am trying to create a geometry_msgs::Quaternion from two other (to create an Odometry message). I've found that tf::Quaternion is a btQuaternion but it is not a geometry_msgs one. I would like to know which is the difference and how can I work if I only have geometry_msgs::Quaternion inputs and outputs. Thanks!

How to add parent frame map? Map not exists.

$
0
0
Map frame never exist before. I broadcast map -> odom when init node. When i use frameExists, map frame not exists. But in rqt_tf_tree it exists and connected to odom. Where can be problem? self.tf_broadcaster = tf.TransformBroadcaster() self.tf_listener = tf.TransformListener() self.tf_broadcaster.sendTransform((5.0, 3.0, 0.0), tf.transformations.quaternion_from_euler(0.0, 0.0, 0.0), rospy.Time.now(), "odom", "map") #This condition never True. if self.tf_listener.frameExists("odom") and self.tf_listener.frameExists("map"): rospy.loginfo("transform exist!") t = self.tf_listener.getLatestCommonTime("odom", "map") position, quaternion = self.tf_listener.lookupTransform("odom", "map", t) print position, quaternion print("!!!!!!!!!")

How to add static transform with right timestamp to rosbag?

$
0
0
I saw [this question](https://answers.ros.org/question/9106/rosbag-play-tf-static_transform_publisher/) and tried the first answer. My launch file looks like this: but when I try to use lookuptransform on the bag I get the same error as in the question: tf2.ExtrapolationException: Lookup would require extrapolation at time 1535537364.011644125, but only time 0.000000000 is in the buffer, when looking up transform from frame [vicon] to frame [camera] Am I doing something wrong here or why doesn't it work?

AMCL warning: no laser scan received

$
0
0
Hello everyone. I'm having a problem. I acquired a RPLidar A2 recently and I'm trying to perform localization on a previously built map. I've built the map via Hector Map and saved it via map_server - yaml file. I am now trying to use the AMCL node but I have some issues. After a few researches on the problem, I am running the following commands in separate windows.   roslaunch rplidar_ros rplidar.launch rosrun map_server map_server Documents/Maps/mymap.yaml rosrun tf static_transform_publisher 0 0 0 0 0 0 map base_link 100 rosrun the tf statin_transform_publisher 0 0 0 0 0 0 base_link laser 100 rosrun amcl amcl roslaunch rviz rviz   These are the frames I'm getting: https://ibb.co/hzDLLU   In the terminal window, I’m getting a problem in the AMCL launch. The warning message is the following:   > No laser scan received (and thus no pose updates have been published) for 1536824498.771014 seconds. Verify that data is being published on the /scan topic.   I have checked the /scan topic and there are messages flowing. > Type: sensor_msgs/LaserScan> Publishers: */rplidarNode> Subscribers: */rviz_1536823488387470311 * /amcl In the RViz window, I can see the map and the scan, and everything seems to be working, but for some reason I can't get the estimated position of the laser inside the map.   Any suggestion on what is causing the problem? I believe it must be something with the TF but the TF tree seems OK to me. Thank you for your help PS: Ubuntu 16.04; ROS kinetic

amcl: No laser scan received (and thus no pose updates have been published) for xxxx seconds ?

$
0
0
Hello, I'm using ROS kinectic on ubuntu 16.04 on an HP laptop. I made my own "real/physical" 2WD robot, and now I want to use ROS navigation stack to get it to move around autonomously. I'm currently struggling with the real robot. Typical behavior is that after the robot accepts a 2DNav goal, it starts navigating to the goal, then hesidates, rotates on himself, then continues rotating forever. A friend of mine suggested to model my physical environment in gazebo, then use the ROS navigation stack in gazebo, tune the navigation parameters until it works decently in gazebo, then reuse those navigation parameters for the real robot. So here I am, struggling to get the simulated robot to navigate. Firing gazebo works. the world I created is ok. 2WD plugin of gazebo feels fine when i teleop it with a keyboard. The mapping process worked just fine. I publish the previously recorded map, it works. The published /odom and /scan values seems correct too. I can see them in rviz as expected. rostopic echo /scan and rostopic echo /odom feels fine as well. The problem is that when I launch amcl, I keep getting the following warning:
[ WARN] [1537204065.051924673, 3433.606000000]: No laser scan received (and thus no pose updates have been published) for 34139472.000000 seconds.  Verify that data is being published on the /scan topic.
[ WARN] [1537204080.975562709, 3448.606000000]: No laser scan received (and thus no pose updates have been published) for 34139472.000000 seconds.  Verify that data is being published on the /scan topic.
[ WARN] [1537204096.883037473, 3463.606000000]: No laser scan received (and thus no pose updates have been published) for 34139472.000000 seconds.  Verify that data is being published on the /scan topic.
[...]
Here is a typical /scan message (taken somehow later)
user@ubuntu:~$ rostopic info /scan
Type: sensor_msgs/LaserScan

Publishers:
 * /gazebo (http://ubuntu:40085/)

Subscribers:
 * /amcl (http://ubuntu:38221/)

user@ubuntu:~$ rostopic echo -n 1 /scan
header:
  seq: 42106
  stamp:
    secs: 4001
    nsecs: 770000000
  frame_id: "sensor_laser"
angle_min: 0.0
angle_max: 6.27319002151
angle_increment: 0.0174740664661
time_increment: 0.0
scan_time: 0.0
range_min: 0.10000000149
range_max: 18.0
ranges: [0.14208605885505676, 0.11974052339792252, ..., 1.9066493511199951, 1.8749361038208008]
intensities: [-3.16707076146899e+24, ... , 0.0]
---
user@ubuntu:~$
When i look into the node, it seems amcl is indeed connected to /scan.
user@ubuntu:~$ rosnode info amcl
--------------------------------------------------------------------------------
Node [/amcl]
Publications:
 * /amcl/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /amcl/parameter_updates [dynamic_reconfigure/Config]
 * /amcl_pose [geometry_msgs/PoseWithCovarianceStamped]
 * /particlecloud [geometry_msgs/PoseArray]
 * /rosout [rosgraph_msgs/Log]
 * /tf [tf2_msgs/TFMessage]

Subscriptions:
 * /clock [rosgraph_msgs/Clock]
 * /initialpose [unknown type]
 * /map [nav_msgs/OccupancyGrid]
 * /scan [sensor_msgs/LaserScan]
 * /tf [tf2_msgs/TFMessage]
 * /tf_static [tf2_msgs/TFMessage]

Services:
 * /amcl/get_loggers
 * /amcl/set_logger_level
 * /amcl/set_parameters
 * /global_localization
 * /request_nomotion_update
 * /set_map


contacting node http://ubuntu:38221/ ...
Pid: 20339
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /amcl
    * direction: outbound
    * transport: INTRAPROCESS
 * topic: /clock
    * to: /gazebo (http://ubuntu:40085/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf
    * to: /amcl (http://ubuntu:38221/)
    * direction: inbound
    * transport: INTRAPROCESS
 * topic: /tf
    * to: /robot_state_publisher (http://ubuntu:33029/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf
    * to: /gazebo (http://ubuntu:40085/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf_static
    * to: /robot_state_publisher (http://ubuntu:33029/)
    * direction: inbound
    * transport: TCPROS
 * topic: /scan
    * to: /gazebo (http://ubuntu:40085/)
    * direction: inbound
    * transport: TCPROS
 * topic: /map
    * to: /map_server_1537203380314611704 (http://ubuntu:33768/)
    * direction: inbound
    * transport: TCPROS

user@ubuntu:~$
I tried outputting the /clock values as well, and I see nothing partiulcarly wrong there (except maybe that time seems to start at 1000seconds... go figure) And indeed, when i try to view the tf tree with rosrun tf view_frames => the link between map and odom is missing, whereas i expect amcl to publish it. ![image description](https://image.ibb.co/n95ojz/deleteme.png) I'm guessing that amcl is either not receiving /scan events and filtering them all (no laser scan received for 34139472 seconds feels a lot like none were ever received)=> therefore published no map->odom tf. while increasing the verbosity of amcl from default info to debug (*), i see those debug messages, but i have no clue what they mean
[DEBUG] [1537204573.964568814, 3913.317000000]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 100 (frame_id=sensor_laser, stamp=3908.290000)
[DEBUG] [1537204573.964899783, 3913.317000000]: MessageFilter [target=odom ]: Added message in frame sensor_laser at time 3913.294, count now 100
[DEBUG] [1537204574.025497198, 3913.368000000]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 100 (frame_id=sensor_laser, stamp=3908.340000)
[DEBUG] [1537204574.025600379, 3913.368000000]: MessageFilter [target=odom ]: Added message in frame sensor_laser at time 3913.344, count now 100
[DEBUG] [1537204574.049464305, 3913.388000000]: Incoming queue was full for topic "/clock". Discarded oldest message (current queue size [0])
[DEBUG] [1537204574.054565708, 3913.392000000]: Incoming queue was full for topic "/clock". Discarded oldest message (current queue size [0])
[DEBUG] [1537204574.066972159, 3913.403000000]: Incoming queue was full for topic "/clock". Discarded oldest message (current queue size [0])
[DEBUG] [1537204574.086864841, 3913.420000000]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 100 (frame_id=sensor_laser, stamp=3908.390000)
[DEBUG] [1537204574.086959735, 3913.420000000]: MessageFilter [target=odom ]: Added message in frame sensor_laser at time 3913.393, count now 100
[DEBUG] [1537204574.133658368, 3913.453000000]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 100 (frame_id=sensor_laser, stamp=3908.440000)
[DEBUG] [1537204574.133732163, 3913.453000000]: MessageFilter [target=odom ]: Added message in frame sensor_laser at time 3913.442, count now 100
[DEBUG] [1537204574.182417016, 3913.491000000]: Incoming queue was full for topic "/clock". Discarded oldest message (current queue size [0])
(*) if someone knows how to default to debug so that i can see what's going on as the amcl node starts => plz let me know) some environment parameters that may apply
user@ubuntu:~$ printenv | grep -i ros
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/user/catkin_ws/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
LD_LIBRARY_PATH=/home/user/catkin_ws/devel/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
PATH=/home/user/bin:/home/user/.local/bin:/opt/ros/kinetic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ROSLISP_PACKAGE_DIRECTORIES=/home/user/catkin_ws/devel/share/common-lisp
ROS_DISTRO=kinetic
PYTHONPATH=/home/user/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/home/user/catkin_ws/devel/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig
CMAKE_PREFIX_PATH=/home/user/catkin_ws/devel:/opt/ros/kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
user@ubuntu:~$
How can I get rid of the No laser scan received (and thus no pose updates have been published) for xxxx seconds ?

No transform from [base_link] to frame [map]

$
0
0
Followed this [TF ROS tutorial](http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf) **Incurred error:** ![Global](/media/golluri/$h@r@th/Projects/UV sterilization robot/Project files/no_transformerror.jpg) TF status is 'warn'. This reads three: 1. No transform from [turtle1] to frame [map] 2. No transform from [turtle2] to frame [map] 3. No transform from [world] to frame [map] I've tried( one at once ) these commands, viz., 1. $ rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 turtle1 turtle2 100 2. $ rosrun tf static_transform_publisher 0.0 0.0 0 0.0 0.0 0.0 turtle1 turtle2 world 3. $ rosrun tf static_transform_publisher 0.0 0.0 0 0.0 0.0 0.0 turtle1 turtle2 world 100 to resolve this, while this command is running on one of the terminals $ rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map my_frame 100 I've also followed [this ROS Q&A thread](https://answers.ros.org/question/10762/no-transform-from-base_link-to-map/), but didn't help in this case. What am I missing in here? Please correct and clarify. Any constructive discussions or leads will be much appreciated. Thanks in advance.

Adding transforms creates a not-tree

$
0
0
My understanding of ROS transforms is that they need to form a tree. Is it ever the case where it can be a non-tree graph? If not, then how should I form this tf tree? Here's my situation: Let's say I have a typical map->odom transform, then an EKF that provides the odom->base_link transform. Now, figure that attached to that base_link is an AR tag, which has a static transform from base_link. An external camera exists which has a transform from map. That camera estimates a pose for the AR tag attached to base_link, however. So now I've created a situation where the AR tag is a child of both the external camera and base_link. What's the proper way to go about this? map-->odom-->base_link-->ar_tag \-->camera-------------/

Python TF/TF2 without ROS

$
0
0
Okay that's kind of a shitty title, allow me to explain: for one of my "mostly python" projects (which was built initially using ROS conventions, catkin for the build system, and rosdep for dependency resolution) makes extensive use of TF but only to build and query an in memory transformation tree. I'm currently trying to chart a path to transition the project away from ROS and make it a python package (pip for dependency resolution, setuptools for build/deploy etc). I can probably make a library myself that replaces all the uses of TF but if there is already a "ROS free" version of TF or TF2 on PyPi (or in a state where it would be easy to put it on PyPi) that would save me a lot of time. An alternative approach is to shamelessly copy tf2 and tf2_py from geometry2 and turn it into a python package. I've been considering that and I might end up doing that if the devops burden is less than the linear algebra burden of writing my own library. Soooo yeah. Is there a TF or TF2 library already that I can install from apt or pip that doesn't need any other ROS dependencies? Thanks :)

why tf_monitor shows unknown_publisher

$
0
0
When I tf_monitor my frames, I saw all my frames were published by unknown_publisher. Could anyone please give me an idea how that usually happens, and how to solve it? Also, I wonder whether it has anything to do with my strangely behaved AMCL, which seems to update the robot location only by /odom, and did not care about the laser scan (because laser scan does not align to the map). Thank you. RESULTS: for all Frames Frames: Frame: base_link published by unknown_publisher Average Delay: 0.0187717 Max Delay: 0.0346738 Frame: left_back_wheel published by unknown_publisher Average Delay: 0.0250101 Max Delay: 0.0499581 Frame: left_front_wheel published by unknown_publisher Average Delay: 0.0250121 Max Delay: 0.0499596 Frame: odom published by unknown_publisher Average Delay: 0.0589457 Max Delay: 0.109153 Frame: right_back_wheel published by unknown_publisher Average Delay: 0.0250131 Max Delay: 0.0499602 Frame: right_front_wheel published by unknown_publisher Average Delay: 0.0250138 Max Delay: 0.0499608 Frame: rplidar published by unknown_publisher Average Delay: -0.499657 Max Delay: 0 All Broadcasters: Node: unknown_publisher 86.3553 Hz, Average Delay: -0.278273 Max Delay: 0.109153

Translating between left handed co-ordinate system and right handed co-ordinate system?

$
0
0
I have a rosbag that publishes IMU information in the left hand coordinate system but as I read in [REP 103](http://www.ros.org/reps/rep-0103) , the coordinate systems in ros are all right handed. How do I accomplish this transformation between the two? Do I change values published by IMU or do I publish a transform? I strongly feel that I should publish a certain transform. What does that transform look like and where can I read more about it? What are the best practices to do this? Also can one sensor be in a different co-ordinate frame than the other, how do you fix that? **Note:** I am using tf2 I also found and article about this on [a webpage by unity](http://answers.unity3d.com/storage/temp/12048-lefthandedtorighthanded.pdf).

transform map to base_link was unavailable in using husky outdoor GPS navigation

$
0
0
in husky UGV Tutorial ,transform from the map to the odom frame from Gmapping is not used.we want to use the transform from the ekf node but I don not know how to shield the map->odom from Gmapping . the waring"transform map to base_link was unavailable" show after "world frame to utm" in terminal.

Rotate quaternion by body yaw

$
0
0
How to change a quaternion's body-fixed yaw? Using `Matrix3x3`'s `getRPY` and then `setRPY` doesn't work, because this is about the axes, fixed to the initial orientation, so it's fixed yaw, not body yaw. Using `getEulerYPR` and then `setEulerYPR` doesn't work as well, because yaw rotation it the first, and it gets affected the following pitch and roll rotation. I think `getEulerRPY`/`setEulerRPY` might work, but there are no such functions in the `tf` and `tf2` libraries.

My camera does not move with my robot in rviz

$
0
0
I have installed the camera to my robot and gazebo works fine. However, when I start Rviz, the camera shows all the depth images but it does not move along with a robot and stays static. Here is my launch file: And here is the tf tree: [frames.pdf](https://drive.google.com/open?id=1HWpR50vtODge8MV0NXyrQ3Tzmbc03HXZ)

namespace conflicts with tf2_ros::TransformListener

$
0
0
Hi, so im launching a drone in gazebo and in a seperate namespace a pan tilt unit. This is my C++ snippet: ROS_INFO_STREAM("frame_id:" << poseCameraFrame->header.frame_id); tf2_ros::Buffer tfBuffer_target2tilt; tf2_ros::TransformListener tfl_target2tilt_(tfBuffer_target2tilt); geometry_msgs::PoseStamped drone_estimated_pose; geometry_msgs::TransformStamped transformed_drone_pose; drone_estimated_pose.header = poseCameraFrame->header; drone_estimated_pose.pose = poseCameraFrame->pose.pose; try{ transformed_drone_pose = tfBuffer_target2tilt.lookupTransform("virt_pan_link", drone_estimated_pose.header.frame_id , drone_estimated_pose.header.stamp ,ros::Duration(3)); } catch (tf2::TransformException &ex) { ROS_WARN("%s",ex.what()); ros::Duration(1.0).sleep(); } So in the first line, when i run the node, this is what i get: > frame_id:ttdevice/hector_thermal_optical_frame but since my tf tree doesnt have the namespace /ttdevice, my tf lookup can't seem to find that source: > "ttdevice/hector_thermal_optical_frame" passed to lookupTransform argument source_frame does not exist. my tf tree: https://ibb.co/hbxNpK I tried several workarounds, but I can't seem to get it working: - changed name in urdf file - removed namespace (conflict with controller since both nodes use ros_control and some more which i cant think of right now since this has been going on for way too long.. If anyone knows advice, I'd appreciate it.

Could not get transform from odom to base_link

$
0
0
I'm running rtabmap with an rgb-d sensor and get the following error: We received odometry message, but we cannot get the corresponding TF odom->base_link at data stamp 1533265358.770186s (odom msg stamp is 1533265358.757750s). Make sure TF of odometry is also published to get more accurate pose estimation. This warning is only printed once. This is my launch file This is how my tf-tree is being published for some reason https://imgur.com/a/Wp4ZodK, and this is how I'm connecting my kinect with the base_link: rosrun tf static_transform_publisher 0 0 0.1 0 0 0 1 base_link camera_rgb_optical_frame 100 Lastly, I'm calling roslaunch openni_launch openni.launch depth_registration:=true To launch my rgbd node.

Problems with tf

$
0
0
I'm trying to use google cartographer and in order to I have to build a tf. I didn't fully understand the idea of tf. I have a robot and a laser. I constructed the tf like here http://wiki.ros.org/navigation/Tutorials/RobotSetup/TF . This is my tree: map->base_lnk->base_laser But thats the point I don't understand: I have this code: broadcaster.sendTransform( tf::StampedTransform( tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)), ros::Time::now(),"base_link", "base_laser")); But how is the "base_link" now connected to the node that the laser is publishing? broadcaster.sendTransform( tf::StampedTransform( tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)), ros::Time::now(),"map", "base_link")); And I also have this. Here the same problem. If I wouldn't write this: `ros::Time::now(),"map", "base_link"));` the map wouldn't appear on rqt. How should the nodes be connected to the tf??

TF Listener

$
0
0
I want to create a class tf_listener. I'm using a laser, so the node for the laser data already exists. I looked at some tutorials and saw that they are using pointstamped. But my laser publishes with the type sensor_msgs/LaserScan. How should I write the subscriber in the class? Or the whole tf listener?

How to transform laserscan messages

$
0
0
I have a laser and I want to tranform with tf. Its message type is LaserScanner but I don't know how to do it. Do you have an example how to solve it?

Why is tf_broadcaster a subscriber and tf_listener a publisher?

$
0
0
Dear all, I am rather new to ROS and I do not understand the tf library very well. I am going through tutorials, in particular those on http://wiki.ros.org/tf/Tutorials/. I do not understand the tf_listener and the tf_broadcaster tutorial. If i understand correctly, the tf_broadcaster builds or updates the transformation tree representing the robot. On the other hand, the tf_listener makes queries on that tree. In this sense, why is the tf_broadcaster associated with ropsy.Subscriber? Should the tree not be published instead? And on the other hand, why is tf_listener not associated with rospy.Subscriber, but rather with ropsy.Listener? I feel that I am understanding something very wrongly. If someone could light my lanter, I'd appreciate! Have a nice day!
Viewing all 844 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>