一、roslaunch a-loam
source devel/setup.bash
roslaunch aloam_velodyne aloam_velodyne_HDL_64.launch
#另起终端运行rosbag
rosbag play xxx.bag
二、保存建图点云
1.在即将跑完的时候记录下来
rosbag record /laser_cloud_map
[ INFO] [1658836552.231858170]: Subscribing to /laser_cloud_map
[ INFO] [1658836552.252719750]: Recording to '2022-07-26-19-55-52.bag'.
2.将bag转化为pcd文件
1.切换到xxx.bag.active文件所在的目录下
2.命令行输入rosbag reindex xxx.bag.active
3.输入rosbag fix xxx.bag.active result.bag
4.rosrun pcl_ros bag_to_pcd result.bag /laser_cloud_surround lego.pcd