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

Gmapping overwriting /tf

asked 2011-04-19 17:58:56 -0500

BlackManta gravatar image

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

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
2

answered 2011-04-21 04:54:48 -0500

eitan gravatar image

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.

edit flag offensive delete link more
0

answered 2011-04-20 22:13:50 -0500

dornhege gravatar image

I'm not sure, what stage provides. You can easily check with the tf tools, i.e. rosrun tf view_frames or maybe just in the documentation.

The commandline parameter is actually a general ros one that just remaps the scan topic to base_scan. When you run the node, you can list the topics is subscribes/publishes and remap them to what is available. In this case someone should publish laser on base_scan.

edit flag offensive delete link more
0

answered 2011-04-19 21:39:38 -0500

dornhege gravatar image

updated 2011-04-19 21:40:33 -0500

What do you mean with overwriting? gmapping (and others) publish to /tf, which is desired. Are you running something in parallel that outputs the same transform?

If it doesn't work/stays at the same position, are you inputting the required data as described here: gmapping

edit flag offensive delete link more
0

answered 2011-04-20 06:25:10 -0500

BlackManta gravatar image

hmm I thought these values were all set up from stage? Do I have to set a parameter when I start it?

Oh and another question where do I find what options I can use on the command line. (ie. scan:=base_scan) That is the only one that I can find, is there a list some where?

Also, it may be less confusing to post /tf under BOTH subscribed topic and published topic. Thanks for the clarification though I just wanted to make sure it was indeed suppose to be publishing /tf

Cheers, ~BM

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-04-19 17:58:56 -0500

Seen: 1,120 times

Last updated: Apr 21 '11