0
$\begingroup$

Rosanswers logo

I am trying to use Gmapping to work with rosstage
However, when I run gmapping:

rosrun gmapping slam_gmapping scan:=base_scan

gmapping overwrites the /tf topic. The resulting metadata and the new /tf topic from gmapping claims the robot is not moving. Thus the map and the locations are worthless. When I look at the /tf directly from stage I am getting the odometry values which look like they are pretty accurate. The problem with using odometry is when I do move to a real robot there is no way I am going to get an accurate map. However, gmapping is not giving me any results in either /map or /map_metadata. (It claims the robot is at -100 -100).

So I guess my first question is why gmapping is overwriting the /tf topic and 2) why is it not changing the location of the robot.

Originally I was trying to get move_base working but now I am just trying to get gmapping to work. I have gone through the tutorials and visualized the map sure enough it is all from one point.

Thanks in advance, ~BM


Originally posted by BlackManta on ROS Answers with karma: 56 on 2011-04-19

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Stage, by default, will publish transforms up through the odometric frame of the robot. There is a "fake_localization" node (http://www.ros.org/wiki/fake_localization) brought up by default in some of the example launch files for navigation, that publishes the ground truth "map" to "odom" transform. When you run gmapping, you'll want to make sure that the "fake_localization" node is not being run as gmapping also publishes the "map" to "odom" transform. For an example of running navigation with gmapping, you might want to check out the navigation_stage package in the navigation_tutorials stack (http://www.ros.org/wiki/navigation_stage). There's a launch file there called move_base_gmapping_5cm.launch that should give a nice example of how to set things up.


Originally posted by eitan with karma: 2743 on 2011-04-21

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.