参考链接
https://www.ncnynl.com/archives/201904/2915.html
操作步骤
- 不再接受进一步数据
rosservice call /finish_trajectory 0
- 序列化保存其当前状态
rosservice call /write_state "{filename: '${HOME}/Downloads/mymap.pbstream'}"
- 将pbstream转换为pgm和yaml
rosrun cartographer_ros cartographer_pbstream_to_ros_map -map_filestem=${HOME}/Downloads/mymap -pbstream_filename=${HOME}/Downloads/mymap.pbstream -resolution=0.05
生成对应的pgm和yaml,放于${HOME}/Downloads/mymap目录下
这是建好后保存的地图