自己基于livox mid40跑FAST-LIO2
livox mid40没有内置IMU,所以,用飞控IMU,订阅/mavros/imu/data话题即可
avia.yaml里面,imu_topic改为 /mavros/imu/data ,time_sync_en需要改为true,默认是false,如果是用livox自己的Imu是可以是false,如果不是,得改为true,不然fast-lio2跑不起来,一直有警告(现在清楚为什么了,外置的IMU可能存在时间戳同步的问题,livox内置的IMU跟你做好了时间戳同步,所以time_sync_en可以为false,不需要在软件层面再去做同步)
改好的avia.yaml内容
common:
lid_topic: "/livox/lidar"
imu_topic: "/mavros/imu/data"
time_sync_en: true # ONLY turn on when external time synchronization is really not possible
preprocess:
lidar_type: 1 # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR,
scan_line: 6
blind: 4
mapping:
acc_cov: 0.1
gyr_cov: 0.1
b_acc_cov: 0.0001
b_gyr_cov: 0.0001
fov_degree: 90
det_range: 450.0
extrinsic_est_en: false # true: enable the online estimation of IMU-LiDAR extrinsic
extrinsic_T: [ 0.04165, 0.02326, -0.0284 ]
extrinsic_R: [ 1, 0, 0,
0, 1, 0,
0, 0, 1]
publish:
path_en: false
scan_publish_en: true # false: close all the point cloud output
dense_publish_en: true # false: low down the points number in a global-frame point clouds scan.
scan_bodyframe_pub_en: true # true: output the point cloud scans in IMU-body-frame
pcd_save:
pcd_save_en: true
interval: -1 # how many LiDAR frames saved in each pcd file;
# -1 : all frames will be saved in ONE pcd file, may lead to memory crash when having too much frames.
启动命令是(前提是把avia.yaml改好了)
roslaunch livox_ros_driver livox_lidar_msg.launch 注意起这个launch文件,才能发出fastlio需要的点云话题类型
roslaunch fast_lio mapping_avia.launch