OA-LICalib is a versatile and highly repeatable calibration method for the LiDAR-inertial system within a continuous-time batch-optimization framework, where the intrinsics of both sensors and the spatial-temporal extrinsics between sensors are calibrated comprehensively without explicit hand-crafted targets. To improve efficiency and cope with challenges from degenerate motions, we introduce two dedicated modules to enable observability-aware calibration. Firstly, a data selection policy based on the information-theoretic metric selects informative segments for calibration in unconscious data collection process. Secondly, an observability-aware state update mechanism in the back-end optimization is introduced to update only the identifiable directions of the calibrated parameters by leveraging truncated singular value decomposition. In this way, the proposed method can get accurate calibration results even under degenerate cases where informative enough data segments do not exist. Extensive evaluations by both simulated and real-world experiments are carried out. The results demonstrate the high accuracy and repeatability of the proposed method in common human-made scenarios and various robot platforms.
-
To use this tool, install Docker in your computer with this link. Make sure you follow the post-installation steps.
-
Below is what I used to run
Create persistent tmux session
tmux new -s calibTo start docker container (CPU cap so can login via ssh on 4 cores):
export REPO_PATH="$HOME/OA-LICalib"
sudo docker run -it \
--env="DISPLAY" \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="$REPO_PATH:/root/catkin_oa_calib/src/OA-LICalib" \
--volume="/2TB_drive/recordings/calibration/lidar_imu_cal_4_0.bag:/root/catkin_oa_calib/src/OA-LICalib/data/lidar_imu_cal_4_0.bag" \
--cpuset-cpus=0-2 \
oalicalib bashThen inside the container:
cd /root/catkin_oa_calib
catkin_make -DCATKIN_WHITELIST_PACKAGES=""
source devel/setup.bash
roslaunch oa_licalib li_calib.launch
The point cloud is the refined map/point cloud in the first lidar scan frame
python3 -m pip install --break-system-packages numpy matplotlib
sudo apt-get install -y pcl-tools # you already have this; for a clean machine
cd /home/ubuntu/OA-LICalib/data
pcl_voxel_grid figure8_full/refined_map-iter13-seg0.pcd map_ds.pcd -leaf 0.1,0.1,0.1
pcl_convert_pcd_ascii_binary map_ds.pcd map_ds_ascii.pcd 0python3 render_traj_overlay.py \
--pcd map_ds_ascii.pcd \
--traj figure8_full/trajectory-lidar-40.000000-80.000000-iter13.txt \
--out traj_overlay.png \
--margin 10 --zheight 8 --elev 35 --azim -60 --zexag 1 --point-size 1.0
# --azim / --elev — rotate / tilt the slant (e.g. --azim 30 --elev 20 for a lower, side-ish angle).
# --margin — zoom: smaller = closer (try --margin 8 to fill the frame with just the figure-8).
# --zexag — vertical exaggeration in the 3D panel (1 = true scale).
# --point-size — bump to e.g. 1.5 if the cloud looks too faint to judge alignment.
The intrinsics of an individual laser comprising a multi-beam 3D LiDAR.
A example to calibrate extrinsics between LiDAR and IMU while simultaneously calibrating intrinsics of both LiDAR and IMU in simulation. You can find simulated data at [./data/bag/simu_bag.bag].
The ground truth of intrinsics are at [./data/bag] and of extrinsics are as follows:
P_LinI [0.30, 0.15, 0.05] meter
euler_LtoI [1.0, 2.0, 5.0] degreeOA-LICalib works with rosbag files which contains sensor_msgs/PointCloud2 and sensor_msgs/Imu topics. Also you can collect nav_msgs/NavSatFix or nav_msgs/Odometry to visualize your calibration results on Rviz.
The calibration accuracy is affected by the data collection environment. You should collect your data in a place that contains a lot of flat surfaces, and indoor spaces are the best locations under these conditions. However, you can also achieve good results outdoors. When collecting data, make sure to draw figures of eights and grids, capturing data from every angle
To achieve the best calibration results, you should tune the parameters in the config/simu.yaml file. The parameters are as follows:
| Parameter | Value |
|---|---|
| ndtResolution | Resolution of NDT grid structure (VoxelGridCovariance) 0,5 for indoor case and 1.0 for outdoor case |
| ndt_key_frame_downsample | Resolutation parameter for voxel grid downsample function |
| map_downsample_size | Resolutation parameter for voxel grid downsample function |
| knot_distance | time interval |
| plane_motion | set true if you collect data from vehicle |
| gyro_weight | gyrometer sensor output’s weight for trajectory estimation |
| accel_weight | accelerometer sensor output’s weight for trajectory estimation |
| lidar_weight | lidar sensor output’s weight for trajectory estimation |
This code was developed by the APRIL Lab in Zhejiang University. For researchers that leveraged this work, please cite the following:
@Conference{lv2020targetless,
title={Targetless calibration of lidar-imu system based on continuous-time batch estimation},
author={Lv, Jiajun and Xu, Jinhong and Hu, Kewei and Liu, Yong and Zuo, Xingxing},
booktitle={2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
pages={9968--9975},
year={2020},
organization={IEEE}
}
@Journal{lv2022,
title={{OA-LICalib}: Observability-Aware Intrinsic and Extrinsic Calibration of LiDAR-IMU Systems},
author={Jiajun Lv, Xingxing Zuo, Kewei Hu, Jinhong Xu, Guoquan Huang, and Yong Liu},
journal={IEEE Transactions on Robotics},
year={2022},
publisher={IEEE}
}The code is provided under the GNU General Public License v3 (GPL-3).