# mlcc **Repository Path**: rogers34/mlcc ## Basic Information - **Project Name**: mlcc - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-07 - **Last Updated**: 2026-08-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Targetless Extrinsic Calibration of Multiple Small FoV LiDARs and Cameras using Adaptive Voxelization Our journal paper is available on [IEEE TIM](https://ieeexplore.ieee.org/document/9779777). The pre-release code has been updated. Our experiment video is available on [YouTube](https://youtu.be/PaiYgAXl9iY) and [Bilibili](https://www.bilibili.com/video/BV1p64y1h7ae?spm_id_from=333.999.0.0). Please consider citing our paper if you find our code useful. ``` @ARTICLE{9779777, author={Liu, Xiyuan and Yuan, Chongjian and Zhang, Fu}, journal={IEEE Transactions on Instrumentation and Measurement}, title={Targetless Extrinsic Calibration of Multiple Small FoV LiDARs and Cameras Using Adaptive Voxelization}, year={2022}, volume={71}, number={}, pages={1-12}, doi={10.1109/TIM.2022.3176889} } ``` ## Introduction In this paper, we propose a fast, accurate, and targetless extrinsic calibration method for multiple LiDARs and cameras based on adaptive voxelization. On the theory level, we incorporate the LiDAR extrinsic calibration with the bundle adjustment method. We derive the second-order derivatives of the cost function w.r.t. the extrinsic parameter to accelerate the optimization. On the implementation level, we apply the adaptive voxelization to dynamically segment the LiDAR point cloud into voxels with non-identical sizes, and reduce the computation time in the process of feature correspondence matching. ![](figure/dense_map.jpg) Fig. 1 Dense colorized point cloud reconstructed with LiDAR poses and extrinsic calibrated with our proposed method. ## Adaptive Voxelization In both LiDAR-LiDAR and LiDAR-camera extrinsic calibration, we implement adaptive voxelization to accelerate the feature correspondence matching process. The point cloud map is dynamically segmented into voxels with non-identical sizes, such that only one plane feature is contained in each voxel. This process sufficiently saves the execution time of k-d tree searching from our previous [work1](https://ieeexplore.ieee.org/document/9361153) (see Fig. 2) and [work2](https://ieeexplore.ieee.org/document/9495137?source=authoralert) (see Fig. 3). ![](figure/lidar_voxel.png) Fig. 2 Adaptive voxelization in LiDAR-LiDAR extrinsic calibration. ![](figure/camera_voxel.png) Fig. 3 Adaptive voxelization in LiDAR-camera extrinsic calibration. A) real-world image. B) raw point cloud of this scene. C) voxelization of [previous work](https://ieeexplore.ieee.org/document/9495137?source=authoralert) where the yellow circles indicate the false edge estimation. D) edges extracted with our proposed method. ## 1. Prerequisites This vendor branch targets ROS 2 and uses `rclcpp`, `ament_cmake`, ROS 2 launch, `pcl_conversions`, Ceres, OpenCV, Eigen and PCL. The original upstream branch targeted ROS 1 Kinetic through Noetic. ## 2. Build and Run MLCC is a standalone ROS 2 package under the workspace's `src` directory. It is discovered by a normal workspace build, or can be selected on its own: ``` cd /path/to/loader_map_ws colcon build --packages-select mlcc source install/setup.bash ``` ## 3. Run Our Example The parameters base LiDAR (`AVIA` or `MID`), test scene (`scene-1` or `scene-2`), `adaptive_voxel_size`, etc., could be modified in the corresponding launch file. We also provide the original rosbag files ([scene-1](https://drive.google.com/file/d/1x6wGXzZHTZiM9oz7_c4DludH0Q7sgy0e/view?usp=sharing) and [scene-2](https://drive.google.com/file/d/1cwjf2Uei2vX2Uqcz5DJtDTPlRcl592sn/view?usp=sharing)) for your reference. ### 3.1 Multi-LiDAR Extrinsic Calibration Step 1: base LiDAR pose optimization (the initial pose is stored in `scene-x/original_pose`) ``` ros2 launch mlcc pose_refine.launch.py ``` Step 2: LiDAR extrinsic optimization (the initial extrinsic is stored in `config/init_extrinsic`) ``` ros2 launch mlcc extrinsic_refine.launch.py ``` `extrinsic_refine` preserves the upstream one-LiDAR-at-a-time workflow. For each run, `ref.json` must contain exactly one line (`T_base_ref`) for the `ref_lidar` selected in the launch file. The refined transform overwrites that single line. Save each reference LiDAR's result separately; after all reference LiDARs have been refined, concatenate the results in `ref_lidar1`, `ref_lidar2`, ... order to form the multi-line `ref.json` consumed by `global`. Step 3: pose and extrinsic joint optimization ``` ros2 launch mlcc global.launch.py ``` ### 3.2 Multi-LiADR-Camera Extrinsic Calibration ``` ros2 launch mlcc calib_camera.launch.py ``` ### 3.3 Single LiDAR-Camera Calibration We have added code for single LiDAR-camera extrinsic calibration using adaptive voxelization, which supports both `pinhole` and `fisheye` camera models. The `FISHEYE` macro is defined in `calib_single_camera.hpp`. You can try our provided fisheye camera [data](https://drive.google.com/drive/folders/1fpk-eDX5nCi7UkkYKialHD-fgGdUGelk?usp=sharing). ``` ros2 launch mlcc calib_single_camera.launch.py ``` ![](figure/fisheye_cloud.jpg) Fig. 4 Extrinsic calibration of the fisheye camera and LiDAR in a single scene using adaptive voxelization. Left: distorted image. Right: colorized point cloud. ## 4. Run Your Own Data To test on your own data, you need to save the LiDAR point cloud in `.pcd` format. Please only collect the point cloud and images when the LiDAR (sensor platform) is not moving for optimal precision (or segment them from a complete rosbag). The base LiDAR poses and initial extrinsic values shall also be provided (in `tx ty tz qw qx qy qz` format). These initial values could be obtained by general SLAM and hand-eye calibration algorithms. You may need to modify the parameters `voxel_size` (adaptive voxel size), `feat_eigen_limit` (feature eigen ratio), and `downsmp_sz_base` (downsampling size) for LiDAR-LiDAR extrinsic calibration to adjust the precision and speed. You need to change the corresponding path and topic name in the yaml files in the `config` folder. ## 5. Known Issues Currently, we separate the LiDAR extrinsic calibration process into three steps for debug reasons. In future release, we wish to combine them together to make them more convenient to use. ## 6. License The source code is released under [GPLv2](http://www.gnu.org/licenses/) license. We are still working on improving the performance and reliability of our codes. For any technical issues, please contact us via email and . For commercial use, please contact Dr. Fu Zhang .