Skip to content

Commit

Permalink
modify calibration documents
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguohang committed Dec 14, 2021
1 parent fd66541 commit c520441
Show file tree
Hide file tree
Showing 46 changed files with 1,203 additions and 544 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ SensorsCalibration is a simple calibration toolbox and open source project, main

## Introduction

Sensor calibration is the foundation block of any autonomous system and its constituent sensors and must be performed correctly before sensor fusion may be implemented. Precise calibrations are vital for further processing steps, such as sensor fusion and implementation of algorithms for obstacle detection, localization and mapping, and control. Further, sensor fusion is one of the essential tasks in autonomous driving applications that fuses information obtained from multiple sensors to reduce the uncertainties compared to when sensors are used individually. To solve the problem of sensor calibration for autonomous vehicles, we provide a sensors calibration toolbox. The calibration toolbox can be used to calibrate sensors such as IMU, Lidar, Camera, and Radar.
Sensor calibration is the foundation block of any autonomous system and its constituent sensors and must be performed correctly before sensor fusion may be implemented. Precise calibrations are vital for further processing steps, such as sensor fusion and implementation of algorithms for obstacle detection, localization and mapping, and control. Further, sensor fusion is one of the essential tasks in autonomous driving applications that fuses information obtained from multiple sensors to reduce the uncertainties compared to when sensors are used individually. To solve the problem of sensor calibration for autonomous vehicles, we provide a sensors calibration toolbox. The calibration toolbox can be used to calibrate sensors such as **IMU, Lidar, Camera, and Radar**.

### Sensors calibration
This calibration toolbox provides some calibration tools based on road scenes. The specific contents are as follows. If you want to use one of the calibration tools in the list below, you can click the use link to enter the instruction page.

| calibration param |calibration type| calibration method | mannual calibration | auto calibration | usage |
| :--------------: |:--------------:| :------------: | :--------------: | :------------: | :------------: |
| camera intrinsice| intrinsic | target-based | | ✔ |[camera intrinsic](camera_intrinsic/README.md)|
| imu heading | extrinsic | target-less | | ✔ ||
| lidar2imu | extrinsic | target-less | ✔ | ✔ ||
| lidar2camera | extrinsic | target-less | ✔ | ✔ ||
| lidar2lidar | extrinsic | target-less | ✔ | ✔ ||
| radar2camera | extrinsic | target-less | ✔ | ||
| radar2lidar | extrinsic | target-less | ✔ | ||
| imu heading | extrinsic | target-less | | ✔ |[imu heaidng](imu_heading/README.md)|
| lidar2imu | extrinsic | target-less | ✔ | ✔ |[lidar2imu](lidar2imu/README.md)|
| lidar2camera | extrinsic | target-less | ✔ | ✔ |[lidar2camera](lidar2camera/README.md)|
| lidar2lidar | extrinsic | target-less | ✔ | ✔ |[lidar2lidar](lidar2lidar/README.md)|
| radar2camera | extrinsic | target-less | ✔ | |[radar2camera](radar2camera/README.md)|
| radar2lidar | extrinsic | target-less | ✔ | |[radar2lidar](radar2lidar/README.md)|


### Factory calibration
At the same time, the calibration toolbox also provides some factory calibration tools.

| calibration board type | calibration sensor | calibration board pattern | remove opencv | auto calibration | link |
| calibration board type | calibration sensor | calibration board pattern | remove opencv | auto calibration | usage |
| :--------------: |:--------------:| :------------: | :--------------: | :------------: | :------------: |
| chessboard | camera | | ✔ | ✔ ||
| circle board | camera | | ✔ | ✔ ||
| vertical board | camera | | ✔ | ✔ ||
| aruco marker board | camera | | ✔ | ✔ ||
| apriltag board | camera | | ✔ | ✔ ||
| round hole board | camera and lidar | | ✔ | ✔ ||
| chessboard | camera | | ✔ | ✔ |[factory calib](factory_calib/README.md)|
| circle board | camera | | ✔ | ✔ |[factory calib](factory_calib/README.md)|
| vertical board | camera | | ✔ | ✔ |[factory calib](factory_calib/README.md)|
| aruco marker board | camera | | ✔ | ✔ |[factory calib](factory_calib/README.md)|
| apriltag board | camera | | ✔ | ✔ |[factory calib](factory_calib/README.md)|
| round hole board | camera and lidar | | ✔ | ✔ |[factory calib](factory_calib/README.md)|

## Related paper
Related paper available on arxiv:
Expand Down
16 changes: 16 additions & 0 deletions camera_intrinsic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,19 @@ run command:
- **Intrinsic Calibration:** Program will automatically run intrinsic calibration. Corner-detect result will be displayed. All input calibration images will be undistorted and save to `<calibration_image_dir>/undistort/` dir.

- **Distortion Evaluation:** Sampled points of original and undistorted images will be displayed. Undistorted distortion_image will be save to `<output_dir>`.

## Citation
This distortion evaluation code is based on the research below:
```
@article{tang2012high,
title={High-precision camera distortion measurements with a “calibration harp”},
author={Tang, Zhongwei and von Gioi, Rafael Grompone and Monasse, Pascal and Morel, Jean-Michel},
journal={JOSA A},
volume={29},
number={10},
pages={2134--2143},
year={2012},
publisher={Optical Society of America}
}
```
52 changes: 52 additions & 0 deletions factory_calib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## Introduction

This is a project for intrinsic calibration and evalution.

It mainly includes two part: intrinsic calibration, distortion measurement.

## Prerequisites

- Cmake
- opencv 2.4
- eigen 3

## Compile
Compile in their respective folders

```shell
# mkdir build
mkdir -p build && cd build
# build
cmake .. && make
```

## Input data
- <calibration_image_dir>: contains only seleted chessboard calibration image
- <distortion_image_path>: distortion harp image

## Calibration targets

Camera intrinsic calibration board, size 900 * 1000 mm, each grid size 100 * 100 mm

<img src="./images/board2.jpg" width="20%" height="20%" alt="checkerboard" div align=center /><br>

Camera intrinsic calibration board, size 900 * 1000 mm, each grid size 50 * 50 mm

<img src="./images/board1.jpg" width="20%" height="20%" alt="checkerboard" div align=center /><br>

Camera distortion measurement board, size 900 * 1000 mm

<img src="./images/board3.jpg" width="20%" height="20%" alt="distortion" div align=center /><br>

## Run
run command:
```shell
# run intrinsic calibration
./bin/run_intrinsic_calibration <calibration_image_dir>
# run distortion measurement
./bin/run_distortion_measure <distortion_image_path>
```

- **Intrinsic Calibration:** Program will automatically run intrinsic calibration. Corner-detect result will be displayed. All input calibration images will be undistorted and save to `<calibration_image_dir>/undistort/` dir.

- **Distortion Evaluation:** Sampled points of original and undistorted images will be displayed. Undistorted distortion_image will be save to `<output_dir>`.
36 changes: 36 additions & 0 deletions imu_heading/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Introduction

This is a project for imu heading angle calibration and evalution.

<img src="./images/imu_heading.png" width="20%" height="20%" alt="checkerboard" div align=center /><br>

## Prerequisites

- Cmake
- eigen 3

## Compile
Compile in their respective folders

```shell
# mkdir build
mkdir -p build && cd build
# build
cmake .. && make
```

## Calibration data collection

According to the figure below for data collection, the calibration vehicle records IMU and GPS data in a straight line.

<img src="./images/data_collect.png" width="20%" height="20%" alt="checkerboard" div align=center /><br>

## Run
run command:
```shell
# run imu heading calibration
./bin/run_imu_heading method_id <data_dir>
```
- **Imu heading calibration:** The imu heading angle is obtained by the registration calculation of GPS trajectory and imu data.

- **Imu heading evaluation:** Speed projection verification of imu through the calibrated heading angle of imu.
3 changes: 1 addition & 2 deletions imu_heading/auto_calib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set(CMAKE_CXX_FLAGS "-std=c++11 -g -Wall")
find_package(PCL REQUIRED)
find_package(Boost REQUIRED system)

include_directories(${PCL_INCLUDE_DIRS})
include_directories(${EIGEN_ROOT})
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/src)
Expand All @@ -15,7 +14,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)

file(GLOB_RECURSE PARSER_PATH src/*.cpp)
add_library(${PROJECT_NAME} STATIC ${PARSER_PATH})
target_link_libraries(${PROJECT_NAME} libjsoncpp.a ${PCL_LIBRARIES} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(${PROJECT_NAME} libjsoncpp.a ${Boost_SYSTEM_LIBRARY})

add_executable(run_imu_heading src/run_imu_heading.cpp )
target_link_libraries(run_imu_heading ${PROJECT_NAME})
2 changes: 1 addition & 1 deletion imu_heading/auto_calib/data/calibration/imu_heading.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
roll_offset_degree,pitch_offset_degree,yaw_offset_degree,roll_offset_rad,pitch_offset_rad,yaw_offset_rad
0.000000,0.000000,0.303795,0.000000,0.000000,0.005302
-0.574228,0.310852,0.430412,-0.010022,0.005425,0.007512
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/include/imu_heading.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2020 by SenseTime Group Limited. All rights reserved.
* Liu Zhuochun <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/

#pragma once
Expand Down
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/src/imu_heading.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2020 by SenseTime Group Limited. All rights reserved.
* Liu Zhuochun <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/
#include "imu_heading.hpp"

Expand Down
9 changes: 5 additions & 4 deletions imu_heading/auto_calib/src/run_imu_heading.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Copyright (C) 2020 by SenseTime Group Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/

#include <dirent.h>
Expand All @@ -17,7 +18,7 @@ const char usage[] = "\t./bin/run_imu_heading method_id <data_dir>\n"

int main(int argc, char **argv) {
if (argc < 3) {
std::cout << argv[0] << usage;
std::cout << usage;
return 1;
}
int method_id = std::stod(argv[1]);
Expand Down
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/src/utils/GPS_time.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2019 by SenseTime Group Limited. All rights reserved.
* Li WenQiang <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/

#include "time.h"
Expand Down
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/src/utils/GPS_time.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2019 by SenseTime Group Limited. All rights reserved.
* Li WenQiang <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/

#pragma once
Expand Down
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/src/utils/Ransac_fitline.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2020 by SenseTime Group Limited. All rights reserved.
* Liu Zhuochun <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/
#include "utils/Ransac_fitline.h"

Expand Down
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/src/utils/Ransac_fitline.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2020 by SenseTime Group Limited. All rights reserved.
* Liu Zhuochun <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/
#pragma once

Expand Down
6 changes: 4 additions & 2 deletions imu_heading/auto_calib/src/utils/common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2019 by SenseTime Group Limited. All rights reserved.
* Li WenQiang <[email protected]>
* Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory
* Limited. All rights reserved.
* Yan Guohang <[email protected]>
* Liu Zhuochun <[email protected]>
*/
#pragma once

Expand Down
Binary file added imu_heading/images/data_collect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imu_heading/images/imu_heading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c520441

Please sign in to comment.