Skip to content

Phw9/livox_camera_calib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 4, 2023
785329b · Nov 4, 2023

History

18 Commits
Jul 31, 2023
Nov 4, 2023
Nov 4, 2023
Nov 4, 2023
Mar 3, 2023
Nov 4, 2023
Nov 4, 2023
Mar 3, 2023
Nov 4, 2023
Jul 31, 2023
Mar 3, 2023
Nov 4, 2023
Mar 3, 2023

Repository files navigation

lidar_camera_calib

lidar_camera_calib is a robust, high accuracy extrinsic calibration tool between high resolution LiDAR (e.g. Livox) and camera in targetless environment. Our algorithm can run in both indoor and outdoor scenes, and only requires edge information in the scene. If the scene is suitable, we can achieve pixel-level accuracy similar to or even beyond the target based method.

1. Prerequisites

1.1 Ubuntu and ROS

Ubuntu 64-bit 16.04 or 18.04. ROS Kinetic or Melodic. ROS Installation and its additional ROS pacakge:

    sudo apt-get install ros-XXX-cv-bridge ros-xxx-pcl-conversions

1.2 Eigen

Follow Eigen Installation

1.3 Ceres Solver

Follow Ceres Installation.

1.4 PCL

Follow PCL Installation. (Our code is tested with PCL1.7)

2. Build

Clone the repository and catkin_make:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
source /opt/ros/(ros-version)/setup.sh
git clone this repo
cd ../
catkin_make
source ~/catkin_ws/devel/setup.bash

3. Run on your own sensor set

3.1 Record data

Record the point cloud and image with rosbag. You need to record about 20 seconds of an environment that is not moving and has no dynamic objects.

rosbag record <topic_name1> <topic_name2> ...

3.2 Convert bag to pcd

Convert the data in the rosbag to pcd file.

launch/bag_to_pcd.launch file

Change the file path and topic name. Lidar points must be filtered by the FoV of the camera.

min_angle, max_angle : filter your horizon angle of pointcloud.
blind : removes surrounding lidar points with a radius of x(m).
roslaunch livox_camera_calib bag_to_pcd.launch

3.3 Convert bag to img

You need to extract image on your rosbag file.

pylib/extract_img.py file

Change the file path and topic name. Run the extract_img.py after running roscore

roscore

cd ~/catkin_ws/src/livox_camera_calib/pylib
python extract_img.py

3.3 Modify the calib.yaml

Change the data path to your local data path.
Provide the instrinsic matrix and distort coeffs for your camera.

3.4 Use multi scenes calibration

Change the params in multi_calib.yaml, name the image file and pcd file from 0 to (data_num-1).

4. Run

4.1 Single scene calibration

roslaunch livox_camera_calib single_calib.launch

4.2 Multi scenes calibration

roslaunch livox_camera_calib multi_calib.launch

The projected images obtained by initial extrinsic parameters.

An example of multi scenes calibration. The projected image obtained by theinitial extrinsic parameters
Rough calibration is used to deal with the bad extrinsic.
The projected image obtained by the extrinsic parameters after rough calibration
Then we finally get a fine extrinsic after final optimization.
The projected image obtained by the extrinsic parameters after fine calibration

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published