ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Commands to build a map using slam_gmapping from logged bag $roscore
$rosparam set use_sim_time true
$rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link laser 100
$rosbag play --clock <your-ros-bag.bag>
For slam_gmapping you need tf and laserScan. after above commands, open a new terminal then execute $rostopic list
then look whether tf and laserScan are being published. if you see /scan then run $rosrun gmapping slam_gmapping scan:=scan
if you see /base_scan then run $rosrun gmapping slam_gmapping scan:=base_scan
to see map in rviz run $rosrun rviz rviz
then add a map then put topic /map
to save a map run $rosrun map_server map_saver -f map1
it will save a map named map1.pgm in current directory.
Let me know whether it works or not.