• Stars
    star
    176
  • Rank 216,987 (Top 5 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ROS package to calibrate the extrinsic parameters between LiDAR and Camera.

lidar_camera_calibrator

lidar_camera_calibrator is a semi-automatic, high-precision, feature-based camera and LIDAR extrinsic calibration tool. In general, feature-based calibration methods often require some manual intervention, such as manually selecting feature points, using a calibration board with a fixed pattern, etc., resulting in a low degree of automation in this method. The lidar_camera_calibrator can semi-automatically calibrate high-precision extrinsic parameters and provide an interactive Qt interface with less manual intervention.

Hope it helps you.

(中文说明)

Dependencies

  • ROS

  • Qt 5 (system)

  • Eigen 3 (3.3+)

  • ceres(commit: e51e9b4)

    # ceres dependencies
    $ sudo apt-get install  liblapack-dev libsuitesparse-dev libcxsparse3 libgflags-dev libgoogle-glog-dev libgtest-dev
  • g2o(tag: 20200410_git)

    # g2o dependencies
    $ sudo apt-get install qt5-qmake qt5-default libqglviewer-dev-qt5 libsuitesparse-dev libcxsparse3 libcholmod3
  • sophus(commit: 13fb328)

Build

$ mkdir -p ws_calibrator/src && cd ws_calibrator
$ git clone REPOSITORY_GIT_LINK src/lidar_camera_calibrator 
$ catkin_make

Test

We have tested this tool on real and simulated Velodyne-16 and normal cameras, and test data is provided under the data folder.

Test video 1(with AprilTag):Youtube link , Bilibili link

Test video 2(without AprilTag):Youtube linkBilibili link

# Calibration using a calibration board with AprilTag(Simulation)
roslaunch lidar_camera_calibrator calibrate.launch 

# Calibration using a calibration board without AprilTag(Real)
roslaunch lidar_camera_calibrator calibrate.launch input_path:=`rospack find lidar_camera_calibrator`/data/data-hitsz 

Usage

a. Prepare the Data

  • Calibration board: rectangular board(It is recommended to be about 1m*1m)

    If there is a AprilTag marker like data/data-sim on the calibration board, the image features can be automatically extracted.

  • Data collection:

    • During data collection, the calibration board should be placed obliquely, and the left and right points of the board can not be on the same horizontal plane i.e. any two points of the four corners can not be on the same altitude.

    • Collect data at different positions, it is recommended to get at least 4 pairs and include both far and near positions, as the following figure shows.

      demo_data
  • Create calibration data

    We provide a script to get soft-synced LiDAR and camera data to calibrate.

    Modify the topic names of Point cloud and image, as well as the output path in the launch file get_sync_data.launch, and press the space button in the terminal to save current synchronized data.

    $ roslaunch lidar_camera_calibrator get_sync_data.launch
  • Prepare the config.json

    Create a config.json and modify corresponding parameters in config.json according to data/data-sim/config.json.

    Parameter Description in config.json

    "cam": # Camera internal parameters
    "lidar_pose":"descend" # "descend" means the LiDAR is placed upright relative to the camera and "ascend" means the LiDAR is placed upside-down relative to the camera. 
    "pc": 
       "PerspectiveParams": # perspective of pcl_viewer
       "filter": # The following parameters represent an annular sector area, and the points inside the area will be used to extract the board point cloud.
              "angle_start":  # the starting angle
              "angle_size":   # the angle range
              "min_distance": # the inside radius
              "max_distance": # the outer radius
              "ceil_gap":     # the distance to the highest point of the point cloud
              "floor_gap":    # the distance to the lowest point of the point cloud
              "min_distance_threshold": # the upper limit of min_distance
              "max_distance_threshold": # the upper limit of max_distance
              "max_ceil_gap": # the upper limit of ceil_gap
              "max_floor_gap": # the upper limit of floor_gap
       "plane":  # parameters of extracting the board point cloud 
    "size": # the number of sides of the calibratoin board
    "tag_size": # the length, width and height of the calibration board
    "tf": # the calibrated extrinsic parameters, which need to be saved by 'save result'

    Note: Before running the program, the tag_size must be set according to the calibration board. Other parameters can be adjusted online while the program is running.

b. Calibrate

  1. Modify the input_path in the launch file to the absolute path of the prepared calibration data, then calibrate it according to the above tutorial.

    $ roslaunch lidar_camera_calibrator calibrate.launch
  2. Adjust the parameters in pointcloud control until the appropriate calibration board point cloud appears on the right, and then click extract. If the correct feature is extracted in the point cloud, click next pose, otherwise click skip pose.

  3. If the calibration board is with AprilTag, the image control part will automatically extract the corner points. If the detection is wrong or the calibration board is without AprilTag, you need to click start selection and then select the four corner points in the image sequentially, and finally click finish selection. Note: Be sure that the corner IDs shown in the image are consistent with those shown in the lidar points, and the calibration board is completely inside the FOVs of both camera and lidar

  4. Repeat steps 2 and 3 until each pair of data is processed. Finally, click calibrate, and you can see the output of extrinsic parameters in the terminal. The calibration result can be evaluated qualitatively through next pose and previous pose, and the extrinsic parameter can be saved to config.json with save result.

TODO

  • to support online data collection visualized by Rviz and online calibration(replace Qt with rviz plugins and image_view2).

License

lidar_camera_calibrator is released under GPL-3.0 License.

Acknowledgments

In this project, the image feature extraction part refers to AprilTag, the point cloud feature extraction refers to the work of Jiunn-Kai Huang, and the Qt interface and framework parts refer to plycal.

Many thanks for their work.

More Repositories

1

Dynamic-VINS

[RA-L 2022] RGB-D Inertial Odometry for a Resource-restricted Robot in Dynamic Environments
C++
323
star
2

long-term-localization

[ROBIO 2021] Pole-like Objects Mapping and Long-Term Robot Localization in Dynamic Urban Scenarios
C++
123
star
3

RIM

[ICRA 2024] Towards Large-Scale Incremental Dense Mapping using Robot-centric Implicit Neural Representation
C++
101
star
4

IGLOV

[TMECH 2023] Active View Planning for Visual SLAM in Outdoor Environments Based on Continuous Information Modeling
C++
63
star
5

ExposureControl

AuRo2022-For robots’ robust localization in varying illumination environments. The code proposes a novel automated camera-exposure control framework to capture the best-exposed images.
C++
41
star
6

De6D

[IEEE TIM] Det6D: A Ground-Aware Full-Pose 3D Object Detector for Improving Terrain Robustness
Python
32
star
7

Open3DExplorer

[JFR 2023] - Whole-Body Motion Planning and Tracking of a Mobile Robot with a Gimbal RGB-D Camera for Outdoor 3D Exploration
C++
28
star
8

active_mapping_dvc

[TIM-2023] Object-Aware View Planning for Autonomous 3D Model Reconstruction of Buildings Using a Mobile Robot
C++
25
star
9

HITSZ-AutoCourses

Course resource in Department of Automation in Harbin Institute of Technology Shenzhen
C++
21
star
10

yolox_for_cann_atlas200dk

Python
17
star
11

hitsz-automan.github.io

哈深自动化《自动化认知与实践》课堂讨论论坛
12
star
12

Atlas-perception-in-gazebo

A repo for atlas perception in gazebo simulation
Python
8
star
13

RCPCC

[ICRA 2025] Real-Time LiDAR Point Cloud Compression and Transmission for Resource-constrained Robots
3
star
14

DynaLOAM

Project for "DynaLOAM: Robust LiDAR Odometry and Mapping in Dynamic Environments" The source code will be released.
1
star