Build a Map Using Logged Data

asked 2020-02-24 10:56:01 -0500

sinsinsinsin gravatar image

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 turtlebot3_gazebo turtlebot3_world.launch

roslaunch turtlebot3_teleop turtlebot3_teleop_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 "/tf_static" in where the node "/robot_state_publisher" will publish data.

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

roslaunch turtlebot3_gazebo turtlebot3_gazebo_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

edit retag flag offensive close merge delete