ROS map is recording but not playing

asked 2020-06-04 11:25:41 -0500

kamal.kld11 gravatar image

updated 2022-01-22 16:10:35 -0500

Evgeny gravatar image

Hello there, I'm using ROS Melodic in my ubuntu mate 18.04. I'm recording gazebo (turtlebot's sensor's data) using

rosbag record -O data.bag /scan /tf

and after the above command i move my turtle bot for get map data and it successfully create a data.bag file. Now i close the gazebo simulator and fire the following two commands in one terminal

rosparam set use_sim_time true rosrun

gmapping slam_gmapping

and now in other terminal i hit the following command

rosbag play --clock data.bag

the about command run for some seconds but nothing happen in the first terminal where gmapping slam_gmapping running and after complete the rosbag play --clock data.bag when i hit rosrun map_server map_saver it show

[ INFO] [1591287787.691958726]: Waiting for the map

The conclusion is i m not able to create a map in ros. Please Help Thank you

edit retag flag offensive close merge delete

Comments

I would asume you need a launchfile for gmapping with all the appropriate settings. Also a - rosrun tf view_frames - print might be helpful. After all you could try gmapping direct without the bag file straight out of gazebo.

Dragonslayer gravatar image Dragonslayer  ( 2020-06-04 12:53:42 -0500 )edit

Hey Thank you for quick reply.. I m new in ros so can you please give me some more details. which launchfile i need and for what it is required?

Thank you again..

kamal.kld11 gravatar image kamal.kld11  ( 2020-06-04 23:42:08 -0500 )edit

You could try "rosnode info gmapping"(or whatever it is really called), and post that info. Als as noted above a "rosrun tf view_frames" print would be nice. As well you can follow gmapping in rviz as it builds the map. A launchfile is used as to get rid of the need to type all the rosrun commands to startup all the necessary nodes and upload parameters. You can find plenty of launchfiles on github and here is the gmapping wiki to get a clue about its parameters. link text

Dragonslayer gravatar image Dragonslayer  ( 2020-06-05 08:42:53 -0500 )edit