一.保存地图
cd 到cartographer的安装目录
cd google_ws/
注意:1. source cartographer’workspace
source install_isolated/setup.bash
rosservice call /write_state ‘carto_map.pbstream’ ‘1’
2. 地图默认保存在 .ros中,将.pbstream文件生成对应的pgm和yaml文件
cd ~/.ros
mv carto_map.pbstream /home/utry/map
rosrun cartographer_ros cartographer_pbstream_to_ros_map -map_filestem=/home/utry/map/carto_map -pbstream_filename=/home/utry/map/carto_map.pbstream -resolution=0.05
生成的地下车库2D图
二. rosbag
播放bag
rosbag play mahao_110511.bag --clock
记录bag 并重命名
rosbag record -O mahao_1.bag /velodyne