Closed JinXiangLai closed 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.
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.
x = A \ b
x = inv(A) * b
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.