ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

gmapping with depthimage_to_laserscan

asked 2017-04-25 01:14:43 -0500

hamed gravatar image

Hi everyone. I am relatively new to ROS. I have an Orbbec Astra camera, and I use the following line to make a node to obtain the images: $ roslaunch astra_launch astra.launch It finds my device, and I can see the depth and RGB images in rviz. Then I use depthimage_to_laserscan to get the laser scan data: $ rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw Again when I add 'LaserScan' in rviz, I can see the output in /scan topic. The next step is implementing gmapping, and my problem starts here. I have read a lot about gmapping needing tf to transform the coordinates, but I couldn't implement it (tried and all I get is "No map received" in rviz), and I have no idea how to do it. I would be very thankful if you help me with the transforms needed, and how to implement them.


edit retag flag offensive close merge delete


Send us a screenshot of your connection graph - most likely gmapping is listening to a different topic

MarkyMark2012 gravatar image MarkyMark2012  ( 2017-04-25 01:44:39 -0500 )edit

@MarkyMark2012 My problem is I don't know which transforms to use. I use a static_transform_publisher for base to camera, but have no idea how I should implement the second transform.

hamed gravatar image hamed  ( 2017-04-25 03:04:09 -0500 )edit

Like I say of you can send a screen shot of your map that should help - might be that gmapping is looking for a diff topic to what you're outputting on

MarkyMark2012 gravatar image MarkyMark2012  ( 2017-04-26 01:10:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-06 15:14:41 -0500

matwilso gravatar image

updated 2017-06-06 15:26:19 -0500

The gmapping package requires you to publish the transform from your sensor link to your base_link, as well as provide odometry data (see here). You would need to set this up before using gmapping.

Alternatively, you can use the hector_mapping package, which does not require odometry.

Both packages require you to have a transform between the link that is getting the laser data and your base link/frame. This is accomplished with a URDF and robot_state_publisher, or a tf static_transform_publisher.

edit flag offensive delete link more

Question Tools



Asked: 2017-04-25 01:14:43 -0500

Seen: 1,674 times

Last updated: Jun 06 '17