一、 imu标定
- 使用生成的avg-axis中的数据进行联合标定。
- 在vins中是联合标定产生的(discrete)值。
比如联合标定产生数据:
IMU configuration
=================
IMU0:
----------------------------
Model: calibrated
Update rate: 200.0
Accelerometer:
Noise density: 0.0272600517598
Noise density (discrete): 0.385515349097
Random walk: 0.000579817988633
Gyroscope:
Noise density: 0.00302857381362
Noise density (discrete): 0.0428305016187
Random walk: 3.00373059934e-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]
在vins中:
#imu parameters The more accurate parameters you provide, the better performance
acc_n: 0.385515349097 # accelerometer measurement noise standard deviation. #0.2 0.04
gyr_n: 0.0428305016187 # gyroscope measurement noise standard deviation. #0.05 0.004
acc_w: 0.000579817988633 # accelerometer bias random work noise standard deviation. #0.002
gyr_w: 3.00373059934e-05 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.8065500033 # gravity magnitude
二、摄像头标定
- 网上教程博客都说的是apriltag比checkerboard更精准,但是我经过4次标定,每种标定板两次,获取的结果都是checkerboard更精确。重投影误差均值和方差如下:
使用checkerboard第一次:
cam0 (/infra_left):
reprojection error: [0.000005, 0.000011] +- [0.036071, 0.035218]
cam1 (/infra_right):
reprojection error: [0.000004, 0.000010] +- [0.037011, 0.035529]
使用checkerboard第二次:
cam0 (/infra_left):
reprojection error: [0.000001, 0.000000] +- [0.048439, 0.045730]
cam1 (/infra_right):
reprojection error: [-0.000001, -0.000000] +- [0.047342, 0.044493]
使用apriltag第一次(方差大):
cam0 (/infra_left):
reprojection error: [0.000001, -0.000000] +- [0.061405, 0.056376]
cam1 (/infra_right):
reprojection error: [-0.000001, 0.000000] +- [0.062390, 0.056922]
其实最主要还是联合标定更大了:
第二次找不到了。。
三、联合标定
- 录制rosbag的时候,要前后左右上下、roll/pitch/yaw都运动几遍。
- 使用好一点的显卡,标定时间会大大节约。
- 在标定结果中有Transformation矩阵,在vins中,前为y,右为x,所以right的红外摄像头应该在x方向为正,故而应该用标定结果的T_ic。
比如标定结果:
Transformation (cam0):
-----------------------
T_ci: (imu0 to cam0):
[[ 0.99996133 0.00810621 -0.00341111 -0.00190162]
[-0.0080871 0.99995172 0.00558147 -0.00841684]
[ 0.00345619 -0.00555367 0.99997861 -0.00942781]
[ 0. 0. 0. 1. ]]
T_ic: (cam0 to imu0):
[[ 0.99996133 -0.0080871 0.00345619 0.00186606]
[ 0.00810621 0.99995172 -0.00555367 0.00837949]
[-0.00341111 0.00558147 0.99997861 0.0094681 ]
[ 0. 0. 0. 1. ]]
timeshift cam0 to imu0: [s] (t_imu = t_cam + shift)
-0.00850749244575
Transformation (cam1):
-----------------------
T_ci: (imu0 to cam1):
[[ 0.99996368 0.00818542 -0.00237228 -0.05200772]
[-0.00817312 0.99995336 0.00514558 -0.00825517]
[ 0.00241429 -0.00512601 0.99998395 -0.00986848]
[ 0. 0. 0. 1. ]]
T_ic: (cam1 to imu0):
[[ 0.99996368 -0.00817312 0.00241429 0.05196219]
[ 0.00818542 0.99995336 -0.00512601 0.0086299 ]
[-0.00237228 0.00514558 0.99998395 0.00978742]
[ 0. 0. 0. 1. ]]
在vins-fusion中的参数应该配置为:
body_T_cam0: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 0.99996133, -0.0080871, 0.00345619, 0.00186606,
0.00810621, 0.99995172, -0.00555367, 0.00837949,
-0.00341111, 0.00558147, 0.99997861, 0.0094681,
0., 0., 0., 1. ]
body_T_cam1: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 0.99996368, -0.00817312, 0.00241429, 0.05196219,
0.00818542, 0.99995336, -0.00512601, 0.0086299,
-0.00237228, 0.00514558, 0.99998395, 0.00978742,
0., 0., 0., 1. ]