当前位置: 代码迷 >> 综合 >> cartographer-保存.pbstream地图
  详细解决方案

cartographer-保存.pbstream地图

热度:4   发布时间:2023-12-16 04:29:35.0

保存.pbstream地图-.pbstream地图转pgm,yaml文件

在线或离线生成pbstream文件,

roslaunch cartographer_ros my_demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/***.bag

打开一个新终端,停止接收数据:

rosservice call /finish_trajectory 0

生成pbstream文件:

rosservice call /write_state "filename: '/home/hyper/Downloads/***.pbstream' include_unfinished_submaps: false" 

然后将pbstream文件转pgm,yaml文件:

roslaunch cartographer_ros assets_writer_ros_map.launch bag_filenames:=${HOME}/Downloads/***.bag pose_graph_filename:=${HOME}/Downloads/***.pbstrea

或使用命令:

rosrun cartographer_ros cartographer_pbstream_to_ros_map -map_filestem=/home/hyper/Downloads/savemap -pbstream_filename=/home/hyper/Downloads/***.pbstream -resolution=0.05