本文主要是介绍cartographer保存地图,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
参考链接
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目录下
这是建好后保存的地图
这篇关于cartographer保存地图的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!