ROS map is recording but not playing
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
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.
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..
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