HKUST-Aerial-Robotics / VINS-Mono

A Robust and Versatile Monocular Visual-Inertial State Estimator
GNU General Public License v3.0
4.83k stars 2.07k forks source link

Kalibr Extrinsic parameters between IMU and Camera #436

Open alperodabasi opened 10 months ago

alperodabasi commented 10 months ago

Hi,

I am using D435i for camera and IMU. I used Kalibr for calculate extrinsic parameters between IMU and Camera.

Kalibr Results are belew: Calibration results

Normalized Residuals

Reprojection error (cam0): mean 0.228997030901, median 0.191416620057, std: 0.16113606739 Gyroscope error (imu0): mean 1.80273207259, median 1.41933925519, std: 1.41959071786 Accelerometer error (imu0): mean 1.9661515366, median 1.47889525633, std: 1.81360494159 Residuals

Reprojection error (cam0) [px]: mean 0.228997030901, median 0.191416620057, std: 0.16113606739 Gyroscope error (imu0) [rad/s]: mean 0.00444238022651, median 0.00349760496186, std: 0.00349822462841 Accelerometer error (imu0) [m/s^2]: mean 0.0313104143646, median 0.02355099412, std: 0.0288811524228 Transformation (cam0):

_T_ci: (imu0 to cam0): [[ 0.99994418 -0.00621841 0.00854216 0.00722463] [ 0.00616542 0.99996168 0.00621569 -0.0021275 ] [-0.00858049 -0.00616268 0.9999442 -0.0188065 ] [ 0. 0. 0. 1. ]] Tic: (cam0 to imu0): [[ 0.99994418 0.00616542 -0.00858049 -0.00737248] [-0.00621841 0.99996168 -0.00616268 0.00205644] [ 0.00854216 0.00621569 0.9999442 0.01875696] [ 0. 0. 0. 1. ]]

timeshift cam0 to imu0: [s] (t_imu = t_cam + shift) 0.000504146910849 Gravity vector in target coords: [m/s^2] [-0.04110426 -9.80612558 0.08145265]

Now i have some questions how to update parameters in "euroc_config.yaml" Kalibr results are T_ci(imu0 to cam0) and T_ic(cam0 to imu0) and these tables are [4x4]

At euroc_config.yaml there are 2 matrix 1-extrinsicRotation 3x3 2-extrinsicTranslation 3x1

i will be very pleased if anybody tell me how to fill the euroc_config.yaml tables according Kalibr results. Thanks all. Alper. @xuhao1 @shaojie @qintonguav

omeredemen commented 3 months ago

T_ic and T_ci matrices involve your extrinsic rotation and translation matrices. I think the cam0 to imu0 matrix should be written on the yaml file image

in this matrices, the first three column represent rotation matrix (extrinsicRotation 3x3) and the last column represents transtlation matrix(extrinsicTranslation 3x1)

SerpentWindy commented 2 months ago

T_ic and T_ci matrices involve your extrinsic rotation and translation matrices. I think the cam0 to imu0 matrix should be written on the yaml file image

in this matrices, the first three column represent rotation matrix (extrinsicRotation 3x3) and the last column represents transtlation matrix(extrinsicTranslation 3x1)

I have doubts about this. Taking the Euroc dataset as an example. Using the conversion tool in https://www.andre-gaschler.com/rotationconverter/, we can calculate the pose angle of the rotation matrix corresponding to the ZYX order in the Euroc dataset as (x: 0.2 °, y: 1.5 °, z: 89.1 °). The camera and IMU coordinate axis in Euroc can be viewed in the official website images, as shown below. image In the figure, it can be seen that cam0 to imu0 represents a Z-axis rotation of -90 °, while imu0 to cam0 represents a Z-axis rotation of+90 °. This is inconsistent with the description of "# Rotation from camera frame to imu frame, imu ^ R_cam" in VINS yaml, so I would like to ask for your opinion.

SerpentWindy commented 1 month ago

T_ic and T_ci matrices involve your extrinsic rotation and translation matrices. I think the cam0 to imu0 matrix should be written on the yaml file image in this matrices, the first three column represent rotation matrix (extrinsicRotation 3x3) and the last column represents transtlation matrix(extrinsicTranslation 3x1)

I have doubts about this. Taking the Euroc dataset as an example. Using the conversion tool in https://www.andre-gaschler.com/rotationconverter/, we can calculate the pose angle of the rotation matrix corresponding to the ZYX order in the Euroc dataset as (x: 0.2 °, y: 1.5 °, z: 89.1 °). The camera and IMU coordinate axis in Euroc can be viewed in the official website images, as shown below. image In the figure, it can be seen that cam0 to imu0 represents a Z-axis rotation of -90 °, while imu0 to cam0 represents a Z-axis rotation of+90 °. This is inconsistent with the description of "# Rotation from camera frame to imu frame, imu ^ R_cam" in VINS yaml, so I would like to ask for your opinion.

Okay, I understand now.In the figure, cam0 to imu0 represents a Z-axis rotation of +90 °, while imu0 to cam0 represents a Z-axis rotation of-90 °.