Robotics StackExchange | Archived questions

Build a Map Using Logged Data

Hi I am following the tutorial of How to Build a Map Using Logged Data

I tried to map with my own recod. Just run

roslaunch turtlebot3gazebo turtlebot3world.launch

roslaunch turtlebot3teleop turtlebot3teleop_key.launch

rosbag record -o bagname /tf /scan

Then, set sim time, run gmapping and rosbag play the recorded bag.

But it not working.

From another source, someone said the gmapping need subscribe to the topic "/tfstatic" in where the node "/robotstate_publisher" will publish data.

so I managed to start a "/robotstatpublisher" node and "/tf_static" topic by

roslaunch turtlebot3gazebo turtlebot3gazebo_rviz.launch

then record a bag including "/tf" "/tf_static" and "/scan".

It worked.

I test with that, found if a bag contains only "/tf" and "/scan". The gmapping will not work.

But if a bag contains "/tf", "scan" and "/tf_staic", the gmapping will work.

This status doesn't meet the gmapping summary Gmapping Package Summary

So am I missed anything?

Thank you

Asked by sinsinsinsin on 2020-02-24 11:56:01 UTC

Comments

Answers