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

Trying to understand gmapping and playback some bag

asked 2016-01-29 14:57:59 -0500

SeekerOfRos gravatar image

Hi all, I have a bag with scanner data. I am not trying to build a map.
THe scanner is in /scan.
So I ran
rosparam set use_sim_time true

rosrun gmapping slam_gmapping scan
rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link laser 100

Nothing seems to be published in /map.
In rviz, I see for map... transform:No transform from [] to [laser]
What am I missing?
From the doc, I can see base_link → odom is needed.. How?
Why is that needed? Is not the purpose of slam to determine just that? (the base_link relative to odom)?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2016-03-04 21:45:36 -0500

robustify gravatar image

In order to use gmapping, you have to generate an odometry estimate by integrating your encoder and/or inertial measurements, and publish the estimate as a TF transform from base_link --> odom. See my answer on another question for more details about how particle filter SLAM algorithms like gmapping work:

edit flag offensive delete link more

answered 2016-01-31 20:48:42 -0500

learner88 gravatar image

base_link -> odom can be gotten using your robot's odometry. gmapping requires odometry to do its calculation.

edit flag offensive delete link more


What if I do not have that?

SeekerOfRos gravatar image SeekerOfRos  ( 2016-02-01 02:53:39 -0500 )edit

then you may want to try other slam techniques eg hector slam.

learner88 gravatar image learner88  ( 2016-02-02 03:16:11 -0500 )edit

Question Tools

1 follower


Asked: 2016-01-29 14:57:01 -0500

Seen: 198 times

Last updated: Mar 04 '16