2. Astra camera calibration 2.1 Preparation before calibration 2.2 Astra calibration 2.2.1 Color icon setting 2.2.2.IR infrared calibration2.3 Single target targeting
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 straight lines to become curved. The farther away from the center of the image, the more serious the distortion. 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) It is impossible to accurately measure the distance of objects that are too close. The principle is omitted .
A large [chessboard] of known dimensions (http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration?action=AttachFile&do=view&target=check-108.pdf). This tutorial uses a 9x6 checkerboard and a 20mm square, which needs to be flattened when calibrating.
The calibration uses the internal vertices of the checkerboard, so a "10x7" checkerboard uses the internal vertex parameters "9x6", as shown in the example below.
Any calibration board can be used, as long as the parameters are changed.
An open area without obstacles and calibration board patterns.
Monocular camera that publishes images via ROS.
Checkerboard(calibration board)
Aobi Zhongguang camera model and the corresponding launch file
Launch file | Start the camera model |
---|---|
astra.launch | Astra,Astra S,Astra mini,Astra mini S |
astraproplus.launch | Astra plus/Astraproplus |
astrapro.launch | Astra pro |
embedded_s.launch | Deeyea |
dabai_u3.launch | Dabai |
gemini.launch | Gemini |
device view
lsusb
Depth Camera ID:【2bc5:060f】
Color Camera ID:【2bc5:050f】
These two IDs appear, indicating that the device is connected.
Turn on the camera before calibration and turn off the camera until all calibrations are complete.
Start Astra Camera
xxxxxxxxxx
roslaunch yahboomcar_visual astra_calibration.launch
This startup command includes an IR image conversion node. The conversion is because the IR infrared camera is viewing a 16-bit image when it is calibrated, and the image cannot be clearly seen. It is necessary to normalize the 16-bit into a value range of 0-255. 8-bit picture, so you can see it clearly.
View Image Topics
xxxxxxxxxx
rostopic list
Start calibration node
xxxxxxxxxx
rosrun camera_calibration cameracalibrator.py image:=/camera/rgb/image_raw --size 9x6 --square 0.02
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:Set the image topic released by the camera.
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 back and forth movement of the checkerboard in the camera field of view
Skew:The tilt and rotation of the checkerboard in the camera 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 autonomously. 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.
xxxxxxxxxx
sudo mv /tmp/calibrationdata.tar.gz ~
After decompression, there are the image just calibrated, an ost.txt file and an ost.yaml file.
After the data normalization problem is dealt with, another problem will arise. Because of the RGBD camera, which uses structured light as the depth imaging principle, the infrared light it projects is a special disordered spot.As a result, the infrared receiving device cannot receive clear and complete picture content.
At this time we can have several special processing methods:
Choose the treatment method according to your needs.
Modify the astraproplus.launch file,
xxxxxxxxxx
gedit /home/jetson/software/library_ws/src/orbbec-ros-sdk/launch/astraproplus.launch
Change enable_color inside to false, change enable_ir to true, save and exit.
Start Astra Camera
xxxxxxxxxx
roslaunch yahboomcar_visual astra_calibration.launch
Start calibration node
xxxxxxxxxx
rosrun camera_calibration cameracalibrator.py image:=/camera/ir/image_mono8 --size 9x6 --square 0.02
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和camera:Set the image topic published by the camera.
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, you can move out the [/tmp/calibrationdata.tar.gz] file to see the content
xxxxxxxxxx
sudo mv /tmp/calibrationdata.tar.gz ~
After decompression, it contains the image just calibrated, an ost.txt file and an ost.yaml file.
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 calibration of monocular color images.
Start monocular camera
xxxxxxxxxx
roslaunch usb_cam usb_cam-test.launch
Start calibration node
xxxxxxxxxx
rosrun camera_calibration cameracalibrator.py image:=/usb_cam/image_raw --size 9x6 --square 0.02
The single-purpose calibration results are stored in the [.ros/camera_info/head_camera.yaml] file.