This algorithm uses Multi-Livox LIDAR and originated from https://github.com/hku-mars/FAST_LIO
FAST-LIO (Fast LiDAR-Inertial Odometry) is a computationally efficient and robust LiDAR-inertial odometry package. It fuses LiDAR feature points with IMU data using a tightly-coupled iterated extended Kalman filter to allow robust navigation in fast-motion, noisy or cluttered environments where degeneration occurs. Our package addresses many key issues:
FAST-LIO Prerequisites
MID-360 Prerequisites
Ex) LiDAR1: MID70 (SDK1), LiDAR2: MID360 (SDK2)
and set the IP for ethernet port of your computer as 192.168.1.xx
and set the IP for ethernet of your computer as 192.158.1.xx.
Points IP, IMU IP, LiDAR Info IP should be same as the IP of your computer.
roslaunch livox_ros_driver livox_lidar_msg.launch
roslaunch livox_ros_driver2 msg_MID360.launch
First, ifconfig to identify connected IPs of your LiDARs. (ex. enx00e04d6afc2e, eno2)
Use ptpd command to synchronize
sudo ptpd -M -i enx00e04d6afc2e -C # Terminal 1
sudo ptpd -M -i eno2 -L -V # Terminal 2
You can see two lidars are synchronized to the local computer in each viewer.
Also, check that the timestamps in rostopics are changing according to the current time.
The algorithm from https://github.com/TIERS/tiers-lidars-dataset is utilized.
git clone https://github.com/TIERS/tiers-lidars-dataset.git
You should change some parts of the code in lidars_extrinsic_comp.cpp
Change the line 338~342
Eigen::AngleAxisf init_rot_x( 0.0 , Eigen::Vector3f::UnitX());
Eigen::AngleAxisf init_rot_y( 0.0 , Eigen::Vector3f::UnitY());
Eigen::AngleAxisf init_rot_z( M_PI / 4 , Eigen::Vector3f::UnitZ());
Eigen::Translation3f init_trans(0.0,0.0,0.0);
Eigen::Matrix4f init_tf = (init_trans * init_rot_z * init_rot_y * init_rot_x).matrix();
to
Eigen::AngleAxisf init_rot_x( 0.0 , Eigen::Vector3f::UnitX());
Eigen::AngleAxisf init_rot_y( 0.0 , Eigen::Vector3f::UnitY());
//Eigen::AngleAxisf init_rot_z( M_PI / 4 , Eigen::Vector3f::UnitZ());
Eigen::Translation3f init_trans(0.0,0.0,0.0);
Eigen::Matrix4f init_tf = (init_trans * init_rot_y * init_rot_x).matrix();
Then, run your calibration bagfile to match pointclouds
catkin build
roslaunch dataset_tools lidars_extri_comp.launch
rosbag play calib3.bag /livox/lidar:=/livox_avia /livox/lidar_192_158_1_110:=/os_cloud_node/points
Two pointclouds from MID360(yellow) and MID70(green) are matched using GICP
You can get relative transformation information as x, y, z, yaw, pitch, roll apply the information to the config file in our package
In mid360.yaml,
set lid_topic as body topic (mid 360 topic here) as same as IMU topic,
and set multi_lidar configuration from additional livox LiDAR.
common:
lid_topic: "/livox/lidar_192_158_1_110" # lidar_192_158_1_110
imu_topic: "/livox/imu_192_158_1_110"
time_sync_en: false # ONLY turn on when external time synchronization is really not possible
preprocess:
lidar_type: 0 # 0 for MID360, 1 for Livox SDK1, 2 for Velodyne LiDAR, 3 for ouster LiDAR,
scan_line: 1
timestamp_unit: 3 # 0-second, 1-milisecond, 2-microsecond, 3-nanosecond.
blind: 0.1
multi_lidar:
use_multi: true
lidar_type: 1 # 0 for MID360, 1 for Livox SDK1, 2 for Velodyne LiDAR, 3 for ouster LiDAR,
lid_topic: "/livox/lidar"
scan_line: 1
R_m360_child_r: 3.13459
R_m360_child_p: 3.1383
R_m360_child_y: 3.13954
T_m360_child_x: 0.03035962
T_m360_child_y: 0.0257171
T_m360_child_z: -0.0890391
roslaunch fast_lio mapping_mid360.launch
rosbag play data.bag