LI-Init is a robust, online initialization method for LiDAR-inertial system. The proposed method calibrates the temporal offset and extrinsic parameter between LiDARs and IMUs, and also the gravity vector and IMU bias. Our method does not require any target or extra sensor, specific structured environment, prior environment point map or initial values of extrinsic and time offset. Our package address following key issues:
- A robust LiDAR odometry (Fast LO) modified from FAST-LIO2.
- Fast and robust temporal offset and extrinsic parameter calibration between LiDAR and IMU without any hardware setup.
- Support multiple LiDAR types: both mechanical spinning LiDAR (Hesai, Velodyne, Ouster) and solid-state LiDAR ( Livox Avia/Mid360)
- Seamlessly merged into FAST-LIO2, as a robust initialization module.
Contributors: Fangcheng Zhu 朱方程, Yunfan Ren 任云帆, Wei Xu 徐威, Yixi Cai 蔡逸熙
our related papers are now available on arxiv: Robust Real-time LiDAR-inertial Initialization
If our code is used in your project, please cite our paper following the bibtex below:
@article{zhu2022robust,
title={Robust Real-time LiDAR-inertial Initialization},
author={Zhu, Fangcheng and Ren, Yunfan and Zhang, Fu},
journal={arXiv preprint arXiv:2202.11006},
year={2022}
}
our accompanying videos are now available on YouTube (click below images to open) and Bilibili.
Ubuntu >= 18.04.
ROS >= Melodic. ROS Installation
PCL >= 1.8, Follow PCL Installation.
Eigen >= 3.3.4, Follow Eigen Installation.
Follow livox_ros_driver Installation.
Remarks:
- Since the LI_Init must support Livox serials LiDAR firstly, so the livox_ros_driver must be installed and sourced before run any LI_Init luanch file.
- How to source? The easiest way is add the line
source $Livox_ros_driver_dir$/devel/setup.bash
to the end of file~/.bashrc
, where$Livox_ros_driver_dir$
is the directory of the livox_ros_driver workspace (should be thews_livox
directory if you completely followed the livox official document).
Our code has been tested on ceres-solver-2.0.0. Please download ceres-solver following the instructions.
Clone the repository and catkin_make:
cd ~/catkin_ws/src
git clone https://github.com/hku-mars/LiDAR_IMU_Init.git
cd ..
catkin_make
source devel/setup.bash
Please make sure the parameters in config/xxx.yaml are correct before running the project.
It is highly recommended to run LI-Init and record your own data simultaneously, because our algorithm is able to automatically detect the degree of excitation and instruct users how to give sufficient excitation (e.g. rotate or move along which direction).
Theoretically livox_avia.launch supports mid-70, mid-40 LiDARs.
Edit config/xxx.yaml
to set the below parameters:
-
lid_topic
: Topic name of LiDAR pointcloud. -
imu_topic
: Topic name of IMU measurements. -
cut_frame_num
: Split one frame into sub-frames, to improve the odom frequency. Must be positive integers. -
orig_odom_freq
(Hz): Original LiDAR input frequency. For most LiDARs, the input frequency is 10 Hz. It is recommended that cut_frame_num * orig_odom_freq = 30 for mechinical spinning LiDAR, cut_frame_num * orig_odom_freq = 50 for livox LiDARs. -
mean_acc_norm
($m/s^2$ ): The acceleration norm when IMU is stationary. Usually, 9.805 for normal IMU, 1 for livox built-in IMU. -
data_accum_length
: A threshold to assess if the data is enough for initialization. Too small may lead to bad-quality results. -
online_refine_time
(second): The time of extrinsic refinement with FAST-LIO2. About 15~30 seconds of refinement is recommended. -
filter_size_surf
(meter): It is recommended that filter_size_surf = 0.05~0.15 for indoor scenes, filter_size_surf = 0.5 for outdoor scenes. -
filter_size_map
(meter): It is recommended that filter_size_map = 0.15~0.25 for indoor scenes, filter_size_map = 0.5 for outdoor scenes.
After setting the correct topic name and parameters, you can directly run LI-Init with your own data..
cd catkin_ws
source devel/setup.bash
roslaunch lidar_imu_init roslaunch lidar_imu_init xxx.launch
After initialization and refinement finished, the result would be written into catkin_ws/src/LiDAR_IMU_Init/result/Initialization_result.txt
Download our test bags here: Lidar IMU Initialization Datasets.
Use rosbag info xxx.bag
to get the correct topic name.
Please note: if the tested IMU is Livox built-in IMU, mean_acc_norm should be 1. If the IMU is Pixhawk IMU, mean_acc_norm should be 9.805.
Here are the pointcloud map constructed by our LiDAR odometry (FAST-LO).
Thanks for HKU MaRS Lab, Fast-LIO2 (Fast Direct LiDAR-inertial Odometry) and ikd-tree.
Thanks for Livox Technology for equipment support.
The source code is released under GPLv2 license.
We are still working on improving the performance and reliability of our codes. For any technical issues, please contact us via email [email protected]. For commercial use, please contact Dr. Fu Zhang [email protected].