HKUST-Aerial-Robotics / D2SLAM

$D^2$SLAM: Decentralized and Distributed Collaborative Visual-inertial SLAM System for Aerial Swarm
297 stars 35 forks source link

配置文件参数含义问题 #42

Closed Tis-Wu closed 3 months ago

Tis-Wu commented 4 months ago

我发现配置文件的参数含义不明确,比如示例的配置文件quad_cam_calib-camchain-imucam-7-inch-n3.yaml中的T_cam_imu和T_cn_cnm1。按照普遍的理解:T_cam_imu代表imu到相机的变换,T_cn_cnm1代表cam_n-1到cam_n的变换,但我验证配置文件参数的时候发现cam0、cam1和imu之间的变换并不闭合,其他相机也一样。验证方式如下:

`import numpy as np

R_cam0_imu = np.array([ [0.6995150680047804, -0.006181389503964796, -0.7145911138952596], [-0.7145403512501514, -0.02077639601444403, -0.6992856553683635], [-0.01052407096032343, 0.9997650382927239, -0.01895025429831509] ])

R_cam1_imu = np.array([ [-0.7147794998773036, -0.009332937698944332, -0.6992876109506441], [-0.6984124144580395, -0.04223022429446699, 0.7144485338265667], [-0.03619897631209307, 0.9990643144612597, 0.02366705904859923] ])

R_cam1_cam0 = np.array([ [-0.00953816615977554, -0.0008626872194280964, 0.9999541385268998], [0.010536511115216777, 0.9999440255403149, 0.0009631820976882342], [-0.9998989975591693, 0.010545214886185546, -0.009528542552601715] ])

R_cam0_cam1 = np.dot(R_cam0_imu, np.linalg.inv(R_cam1_imu))

result = np.dot(R_cam1_cam0, R_cam0_cam1)

print(result) ` 输出的result为: [ 0.01058242 -0.03888021 0.99918784] [ 0.99988705 -0.01025317 -0.0109888 ] [ 0.01067209 0.99919127 0.03876732]

非单位矩阵,相邻相机与imu之间的旋转不闭合。请问配置文件中的T_cam_imu和T_cn_cnm1具体表示的是什么?