[Learning Summary] Kalibr calibration camera and IMU

This article is only used to record your own learning process.

Instructions

Kalibr includes: camera internal parameters, multi-camera external parameters, camera and IMU calibration (with known IMU and camera internal parameters), and extended Kalibr to support IMU internal parameter calibration.

When the IMU intrinsic parameters and camera intrinsic parameters are known, use the rosbag recorded in the specified way and use the following command to calibrate:

rosrun kalibr kalibr_calibrate_imu_camera \
	--bag /home/larrydong/imu_ws/data/imu_cam.bag \
	--cam /home/larrydong/imu_ws/data/imu_cam-camchain.yaml \
	--imu /home/larrydong/imu_ws/data/imu.yaml \
	--target /home/larrydong/imu_ws/data/aprilgrid.yaml

As you can see, the input parameters include: rosbag, camera internal parameters, imu internal parameters, and checkerboard configuration file.

Internal parameter acquisition

Obtain camera internal parameters

For personal use, first calibrate the camera's internal parameters separately to obtain xxx-camchain.yamlthe configuration file. You can use kalibr's code, but there are always some problems during initialization of this code and it cannot converge. Therefore, I used matlab for calibration first, and then modified the configuration file with the matlab calibration parameters camchain.yaml.

IMU internal reference calibration

IMU internal parameter calibration can theoretically be performed using Kalibr-extend, but here another tool is used imu_utilsfor calibration. For details, see: [Learning Record] IMU internal parameter calibration: Allan variance and code . Similarly, modify imu.yamlthe configuration file after calibration.

Operation process and results

It can be seen that an optimization was carried out,
Insert image description hereand the final result was obtained. The error is still quite large (after all, the camera and IMU are relatively poor), and the coordinate system transformation from IMU to camera is obtained: the rotation matrix is ​​basically [1, 0, 0 ; 0 , 0 , − 1 ; 0 , 1 , 0 ] [1,0,0; 0,0,-1; 0,1,0][1,0,0;0,0,1;0,1,0 ] , that is, rotated 90° around the positive x-axis:
Insert image description here

Insert image description here

Guess you like

Origin blog.csdn.net/tfb760/article/details/129262725