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

Overview

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

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 height.

    • 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 in the 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'

b. Calibrate

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

Usage video 2(without AprilTag):Youtube linkBilibili link

  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.

  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.

Test

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

# 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 

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.

You might also like...
A Gazebo based LiDAR-Camera Data Simulator.
A Gazebo based LiDAR-Camera Data Simulator.

Livox-LiDAR-Camera System Simulator A package to provide plug-in for Livox Series LiDAR. This work is inherited from EpsAvlc and LvFengchi's work: liv

A composable container for Adaptive ROS 2 Node computations. Select between FPGA, CPU or GPU at run-time.

adaptive_component A composable stateless container for Adaptive ROS 2 Node computations. Select between FPGA, CPU or GPU at run-time. Nodes using har

Livox-Mapping - An all-in-one and ready-to-use LiDAR-inertial odometry system for Livox LiDAR
Livox-Mapping - An all-in-one and ready-to-use LiDAR-inertial odometry system for Livox LiDAR

Livox-Mapping This repository implements an all-in-one and ready-to-use LiDAR-inertial odometry system for Livox LiDAR. The system is developed based

A Robust LiDAR-Inertial Odometry for Livox LiDAR
A Robust LiDAR-Inertial Odometry for Livox LiDAR

LIO-Livox (A Robust LiDAR-Inertial Odometry for Livox LiDAR) This respository implements a robust LiDAR-inertial odometry system for Livox LiDAR. The

Lidar-with-velocity - Lidar with Velocity: Motion Distortion Correction of Point Clouds from Oscillating Scanning Lidars
Lidar-with-velocity - Lidar with Velocity: Motion Distortion Correction of Point Clouds from Oscillating Scanning Lidars

Lidar with Velocity A robust camera and Lidar fusion based velocity estimator to undistort the pointcloud. This repository is a barebones implementati

Two alphanumeric LCDs and 2 LED bars to show and manage some in-flight parameters
Two alphanumeric LCDs and 2 LED bars to show and manage some in-flight parameters

FS2020-LCD-Panel with Arduino Two alphanumeric LCDs and 2 LED bars to show and manage some in-flight parameters for FS2020. In this project you can pl

C-function for traversing files/directories effectively and calling a given function with each encountered file and a void-pointer as parameters

C-function for traversing files/directories effectively and calling a given function with each encountered file and a void-pointer as parameters

Jetson Nano camera driver extracted from the jetbot_ros package.

Jetson Cam Jetson Nano camera driver extracted from the jetbot_ros package. Dependencies System Dependencies GStreamer Typically preinstalled in jetso

image_projection is a ROS package to create various projections from multiple calibrated cameras.
image_projection is a ROS package to create various projections from multiple calibrated cameras.

image_projection Overview image_projection is a ROS package to create various projections from multiple calibrated cameras. Use cases involve: Rectify

Comments
  • How do I get LiDAR params?

    How do I get LiDAR params?

    "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

    opened by januarks14 10
  • How to choose apriltag

    How to choose apriltag

    Hi First of all, thank you very much for your calibration method and software. I would like to ask which series of AprilTag you are using.Can you provide the original AprilTag image of your choice or tell me the model number? I'm using tag36h11, do other images from the series work fine.Since the resolution of the original apriltag image is relatively small, what is the image resolution of the calibration plate of the 80×80cm calibration plate?

    Thank you very much xiao wang

    opened by wang6342 5
  • Example repetition creates wrong pose

    Example repetition creates wrong pose

    Hey,

    I followed the steps in your video and every step is pretty much the same, but in the end the pose is completely different. Any idea what I could have done wrong?

    image

    Best regards!

    opened by Janphr 7
Owner
Networked Robotics and Sytems Lab
Networked Robotics and Sytems Lab
calibrate a Livox LiDAR and a camera

Livox LiDAR-Camera Calibration This method is from the official method of Livox(https://github.com/Livox-SDK/livox_camera_lidar_calibration) It's just

null 9 Jul 23, 2022
This repository uses a ROS node to subscribe to camera (hikvision) and lidar (livox) data. After the node merges the data, it publishes the colored point cloud and displays it in rviz.

fusion-lidar-camera-ROS 一、介绍 本仓库是一个ROS工作空间,其中ws_fusion_camera/src有一个工具包color_pc ws_fusion_camera │ README.md │ └───src │ └───package: c

hongyu wang 21 Nov 23, 2022
This repository is used for automatic calibration between high resolution LiDAR and camera in targetless scenes.

livox_camera_calib livox_camera_calib is a robust, high accuracy extrinsic calibration tool between high resolution LiDAR (e.g. Livox) and camera in t

HKU-Mars-Lab 470 Nov 26, 2022
Fix some extrinsic parameter importing problems. 6-axis IMU works now. Lidar without ring works now.

LVI-SAM-MODIFIED This repository is a modified version of LVI-SAM. Modification Add function to get extrinsic parameters.The original code assumes the

null 86 Nov 9, 2022
A ros package for robust odometry and mapping using LiDAR with aid of different sensors

W-LOAM A ros package for robust odometry and mapping using LiDAR with aid of different sensors Demo Video https://www.bilibili.com/video/BV1Fy4y1L7kZ?

Saki-Chen 51 Nov 2, 2022
A ROS package for mobile robot localization with 2D LiDAR

mcl_ros About mcl_ros mcl_ros is a ROS package for mobile robot localization with 2D LiDAR. To implement localization, Monte Carlo localization (MCL)

Naoki Akai 47 Oct 13, 2022
📚🪛 Arduino library to calibrate and improve ADC measurements with the Raspberry Pi Pico.

Arduino-Pico-Analog-Correction Arduino library to calibrate and improve ADC measurements with the Raspberry Pi Pico. Can compensate ADC offsets, calcu

NuclearPhoenix 11 Nov 12, 2022
Fast and Accurate Extrinsic Calibration for Multiple LiDARs and Cameras

Fast and Accurate Extrinsic Calibration for Multiple LiDARs and Cameras The pre-print version of our paper is available here. The pre-release code has

HKU-Mars-Lab 240 Nov 24, 2022
Raspberry Pi Pico (RP2040) and Micro-ROS (ROS 2) Integration

The Pico is an amazing microcontroller and I couldn't wait for ROS 2 support or Arduino Core, so here is my approach. Once the Arduino Core for RP2040 is out it will be easier to use micro_ros_arduino.

Darko Lukić 19 Jun 19, 2022
Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation

?? RoboCop ?? Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation Made by Clemente Donoso, ?? Chile ???? RoboCop Lateral Fron

Clemente Donoso Krauss 2 Jan 4, 2022