Ask Your Question
0

gmapping with depthimage_to_laserscan

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

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.

Cheers!

edit retag flag offensive close merge delete

Comments

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

MarkyMark2012 gravatar imageMarkyMark2012 ( 2017-04-25 01:44:39 -0600 )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 imagehamed ( 2017-04-25 03:04:09 -0600 )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 imageMarkyMark2012 ( 2017-04-26 01:10:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

matwilso gravatar image

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

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

Seen: 974 times

Last updated: Jun 06 '17