新建一个camchain.yaml文件,内容如下,将intrinsics和distortion_coeffs的数值改成之前标定的结果
点击(此处)折叠或打开
-
cam0:
-
camera_model: pinhole
-
intrinsics: [637.1779587247433, 633.7804879350356, 317.29745787695197, 222.79306023564143]
-
distortion_model: equidistant
-
distortion_coeffs: [0.12699077558547853, -0.2663283480947607, -0.003966617209275872, 0.002919700067058629]
-
T_cam_imu:
-
- [0.01779318, 0.99967549,-0.01822936, 0.07008565]
-
- [-0.9998017, 0.01795239, 0.00860714,-0.01771023]
-
- [0.00893160, 0.01807260, 0.99979678, 0.00399246]
-
- [0.0, 0.0, 0.0, 1.0]
-
timeshift_cam_imu: -8.121e-05
-
rostopic: /color
-
resolution: [640, 480]
再新建一个imu.yaml文件,内容如下,将下面的四个参数的值设置为imu标定的结果。
-
rostopic: /imu
-
update_rate: 200.0 #Hz
-
-
accelerometer_noise_density: 0.030017 #continous
-
accelerometer_random_walk: 0.000876
-
gyroscope_noise_density: 0.00294 #continous
-
gyroscope_random_walk: 3.14268e-05
进行标定
-
kalibr_calibrate_imu_camera --target ~/bagfiles/target.yaml --cam ~/bagfiles/camchain.yaml --imu ~/bagfiles/imu.yaml --bag ~/bagfiles/dynamic.bag --show-extraction
标定结果如下:
-
Calibration results
-
===================
-
Normalized Residuals
-
----------------------------
-
Reprojection error (cam0): mean 0.645979524406, median 0.55076768161, std: 0.441172957301
-
Gyroscope error (imu0): mean 0.632165457077, median 0.51915755434, std: 0.418834270707
-
Accelerometer error (imu0): mean 0.315519030434, median 0.26144132228, std: 0.220137274831
-
-
Residuals
-
----------------------------
-
Reprojection error (cam0) [px]: mean 0.645979524406, median 0.55076768161, std: 0.441172957301
-
Gyroscope error (imu0) [rad/s]: mean 0.026284098714, median 0.0215854698381, std: 0.017414240517
-
Accelerometer error (imu0) [m/s^2]: mean 0.133939243527, median 0.110983013877, std: 0.0934492604853
-
-
Transformation (cam0):
-
-----------------------
-
T_ci: (imu0 to cam0):
-
[[ 0.99914747 -0.03946207 -0.01212755 0.04307462]
-
[ 0.03965755 0.99907997 0.01632454 -0.01789784]
-
[ 0.0114722 -0.01679157 0.99979319 -0.01402533]
-
[ 0. 0. 0. 1. ]]
-
-
T_ic: (cam0 to imu0):
-
[[ 0.99914747 0.03965755 0.0114722 -0.04216722]
-
[-0.03946207 0.99907997 -0.01679157 0.01934568]
-
[-0.01212755 0.01632454 0.99979319 0.01483699]
-
[ 0. 0. 0. 1. ]]
-
-
timeshift cam0 to imu0: [s] (t_imu = t_cam + shift)
-
-0.0302255306475
-
-
-
Gravity vector in target coords: [m/s^2]
-
[-0.48824837 -9.78365493 -0.45840216]
-
-
-
Calibration configuration
-
=========================
-
-
cam0
-
-----
-
Camera model: pinhole
-
Focal length: [637.1779587247433, 633.7804879350356]
-
Principal point: [317.29745787695197, 222.79306023564143]
-
Distortion model: equidistant
-
Distortion coefficients: [0.12699077558547853, -0.2663283480947607, -0.003966617209275872, 0.002919700067058629]
-
Type: aprilgrid
-
Tags:
-
Rows: 6
-
Cols: 6
-
Size: 0.02 [m]
-
Spacing 0.006 [m]
-
-
-
-
IMU configuration
-
=================
-
-
IMU0:
-
----------------------------
-
Model: calibrated
-
Update rate: 200.0
-
Accelerometer:
-
Noise density: 0.030017
-
Noise density (discrete): 0.424504485018
-
Random walk: 0.000876
-
Gyroscope:
-
Noise density: 0.00294
-
Noise density (discrete): 0.0415778787338
-
Random walk: 3.14268e-05
-
T_i_b
-
[[ 1. 0. 0. 0.]
-
[ 0. 1. 0. 0.]
-
[ 0. 0. 1. 0.]
-
[ 0. 0. 0. 1.]]
-
time offset with respect to IMU0: 0.0 [s]
参考