Gutsgwh1997 / lidar_IMU_calib

浙大开源的Lidar IMU标定工具,适配了自己的数据集。
GNU General Public License v3.0
38 stars 12 forks source link

LI-Calib

Overview

LI-Calib is a toolkit for calibrating the 6DoF rigid transformation and the time offset between a 3D LiDAR and an IMU. It's based on continuous-time batch optimization. IMU-based cost and LiDAR point-to-surfel distance are minimized jointly, which renders the calibration problem well-constrained in general scenarios.

Prerequisites

Note that Kontiki and Pangolin are included in the thirdparty folder.

Install

Clone the source code for the project and build it.

# init ROS workspace
mkdir -p ~/catkin_li_calib/src
cd ~/catkin_li_calib/src
catkin_init_workspace

# Clone the source code for the project and build it. 
git clone https://github.com/APRIL-ZJU/lidar_IMU_calib

# ndt_omp
wstool init
wstool merge lidar_IMU_calib/depend_pack.rosinstall
wstool update
# Pangolin
cd lidar_imu_calib_beta
./build_submodules.sh
## build
cd ../..
catkin_make
source ./devel/setup.bash

Examples

Currently the LI-Calib toolkit only support VLP-16 but it is easy to expanded for other LiDARs.

Run the calibration:

./src/lidar_IMU_calib/calib.sh

The options in calib.sh the have the following meaning:

UI

Following the step:

  1. Initialization

  2. DataAssociation

    (The users are encouraged to toggle the show_lidar_frame for checking the odometry result. )

  3. BatchOptimization

  4. Refinement

  5. Refinement

  6. ...

  7. (you cloud try to optimize the time offset by choose optimize_time_offset then run Refinement)

  8. SaveMap

All the cache results are saved in the location of the dataset.

Note that the toolkit is implemented with only one thread, it would response slowly while processing data. Please be patient

Dataset

3imu

Dataset for evaluating LI_Calib are available at here.

We utilize an MCU (stm32f1) to simulate the synchronization Pulse Per Second (PPS) signal. The LiDAR's timestamps are synchronizing to UTC, and each IMU captures the rising edge of the PPS signal and outputs the latest data with a sync signal. Considering the jitter of the internal clock of MCU, the external synchronization method has some error (within a few microseconds).

Each rosbag contains 7 topics:

/imu1/data          : sensor_msgs/Imu           
/imu1/data_sync     : sensor_msgs/Imu           
/imu2/data          : sensor_msgs/Imu           
/imu2/data_sync     : sensor_msgs/Imu           
/imu3/data          : sensor_msgs/Imu           
/imu3/data_sync     : sensor_msgs/Imu           
/velodyne_packets   : velodyne_msgs/VelodyneScan

/imu*/data are raw data and the timestamps are coincide with the received time.

/imu*/data_sync are the sync data, so do /velodyne_packets .

Credits

This code was developed by the APRIL Lab in Zhejiang University.

For researchers that have leveraged or compared to this work, please cite the following:

Jiajun Lv, Jinhong Xu, Kewei Hu, Yong Liu, Xingxing Zuo. Targetless Calibration of LiDAR-IMU System Based on Continuous-time Batch Estimation. IROS 2020. [arxiv]

License

The code is provided under the GNU General Public License v3 (GPL-3).