2. Astra camera calibration

Wiki: http://wiki.ros.org/camera_calibration

Official website link: https://orbbec3d.com/develop/

Astra camera: https://github.com/orbbec/ros_astra_camera

Developer community: https://developer.orbbec.com.cn/download.html?id=53

Due to some internal and external reasons of the camera, the image will be greatly distorted, mainly radial deformation and tangential deformation, causing the straight line to become curved. The farther the pixel is from the center of the image, the more serious the distortion will be. In order to avoid errors caused by data sources, the parameters of the camera need to be calibrated. Calibration essentially uses a known and determined spatial relationship (calibration plate) to reversely deduce the inherent and real parameters of the camera (internal parameters) by analyzing the pixels of the photographed pictures.

Disadvantages of infrared depth camera ranging:

(1) It is impossible to accurately measure the distance of black objects because black substances can absorb infrared rays and the infrared rays cannot return, so the distance cannot be measured.

(2) It is impossible to accurately measure the distance of specular objects, because only when the depth camera is on the center vertical line of the specular object, the receiver can receive the reflected infrared rays, which will lead to overexposure.

(3) It is impossible to accurately measure the distance of transparent objects because infrared rays can pass through transparent objects.

(4) Unable to accurately measure distances for objects that are too close. Principle briefly

image-20210909103701194

2.1. Preparation before calibration

Checkerboard (calibration board)

image-20210907171706358

Obi mid-range camera model and corresponding launch file

Launch fileLaunch camera model
astra.launchAstra, Astra S, Astra mini, Astra mini S
astraproplus.launchAstra plus/Astraproplus
astrapro.launchAstra pro
embedded_s.launchDeeyea
dabai_u3.launchDabai
gemini.launchGemini

Device view

image-20210909092021734

Depth camera ID: [2bc5:0403]

Color camera ID: [2bc5:0501]

The appearance of these two IDs indicates that the device is connected.

2.2. Astra calibration

Start the camera before calibration, and then turn off the camera until all calibrations are completed.

Launch Astra Camera

This startup command includes an IR image conversion node. The conversion is because the IR infrared camera views a 16-bit image during calibration, and the picture cannot be clearly seen. The 16-bit needs to be normalized into a value range of 0-255. 8-bit picture so that you can see it clearly.

View Image Topics

image-20210908215708748

<PI5 needs to open another terminal and enter the same docker container

image-20240408144126098

2.2.1. Color icon definition

Start calibration node

size: Calibrate the number of internal corner points of the checkerboard, for example, 9X6, with a total of six rows and nine columns of corner points.

square: The side length of the checkerboard, in meters.

image and camera: Set the image topic published by the camera.

image-20210907180204879

Calibration interface

X: The left and right movement of the checkerboard in the camera field of view

Y: The checkerboard moves up and down in the camera field of view

Size: the movement of the checkerboard back and forth in the camera field of view

Skew: The tilt and rotation of the checkerboard in the camera's field of view

After successful startup, place the checkerboard in the center of the screen and change to different positions. The system will identify it independently. The best situation is that the lines under [X], [Y], [Size], and [Skew] will first change from red to yellow and then to green as the data is collected, filling them as fully as possible.

image-20210907183329713

image-20210908220248183

After the calibration is completed, you can move out the [/tmp/calibrationdata.tar.gz] file to see the content.

After decompression, there are the image just calibrated, an ost.txt file and an ost.yaml file.

2.2.2, ir infrared calibration

After the data normalization problem is dealt with, another problem will arise. Because the RGBD camera, which uses structured light as the depth imaging principle, the infrared light projected by it is a special disordered spot, causing the infrared receiving device to be unable to receive clear and complete images. screen content.

At this time we can have several special processing methods:

Choose the processing method according to your needs.

Start calibration node

size: Calibrate the number of internal corner points of the checkerboard, for example, 9X6, with a total of six rows and nine columns of corner points.

square: The side length of the checkerboard, in meters.

image and camera: Set the image topic published by the camera.

image-20220222103857148

The following operations are similar to color camera calibration, changing different poses. The system will identify it independently. The best situation is that the lines under [X], [Y], [Size], and [Skew] will first change from red to yellow and then to green as the data is collected, filling them as fully as possible.

After the calibration is completed, you can move out the [/tmp/calibrationdata.tar.gz] file to see the content.

After decompression, there are the image just calibrated, an ost.txt file and an ost.yaml file.

2.3. Single target setting

The principle of setting the color map in section [2.2.1] is the same, except that the startup command and topic name are different. This section is suitable for monocular color image calibration.

Start monocular camera

Start calibration node

The single-purpose calibration results are stored in the file [.ros/camera_info/head_camera.yaml].