zxl19 / Hand_Eye_Extrinsic_Calibration

MATLAB code for LiDAR-Camera-GNSS/INS extrinsic calibration based on hand-eye calibration method.
MIT License
37 stars 7 forks source link

What does the Coordinate Transformation do? #4

Closed JinXiangLai closed 2 years ago

JinXiangLai commented 2 years ago

I can't understand the following formula: ` %% Coordinate Transformation

% 取出第一帧数据 R0_1 = quat2rotm(pose_1_sync(1, 4 : 7)); % qw qx qy qz t0_1 = pose_1_sync(1, 1 : 3); [m, ~] = size(pose_1_sync); for i = 1 : m % 矩阵左除运算符, A*x = b, 那么 x = A\b % 这里是求相对位姿变换吗? % ???将坐标系原点平移到第1帧 pose_1_sync(i, 1 : 3) = R0_1 \ (pose_1_sync(i, 1 : 3)' - t0_1'); R = R0_1 \ quat2rotm(pose_1_sync(i, 4 : 7)); % qw qx qy qz quat = rotm2quat(R); % qw qx qy qz pose_1_sync(i, 4 : 7) = quat; % qw qx qy qz end ` Have any derivation process or explanation? Thanks.

zxl19 commented 2 years ago

Hi @JinXiangLai ! Your your understanding is correct, this is to calculate relative pose w.r.t. the first frame. x = A \ b is equivalent to x = inv(A) * b.