Hi jakaskerl ,
Thank you for your reply. I'm a bit unclear with your response.
So let's take cam0's T_cam_imu, corresponding to OAK-D Cam left, as an example.
The cam0's T_cam_imu format are :
cam0:
T_cam_imu:
[-0.001827859233177992, -0.999909119974655, 0.013357047657805154, 0.030298330137844887,
0.0039387461853423456, -0.013364165204938133, -0.9999029379729119, 0.028682372533570984,
0.9999905725601166, -0.0017750717969459706, 0.003962816044752765, -0.014747523214162677,
0.0, 0.0, 0.0, 1.0]
The default imuExtrinsics matrixes format are :
"imuExtrinsics": {
"rotationMatrix": [
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
]
],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
The cam0's T_cam_imu
is in cam->imu, hence I need to inverse it, to have matrix imu->cam. Am I correct ?
cam0_T_cam_imu = np.array(T_cam_imu)
inverse = np.linalg.inv(cam0_T_cam_imu)
Asume I have the inverse matrix, it is in 4x4 matrix, so I take 3 first columns and fill to rotationMatrix
of imuExtrinsics
? Am I correct ? And of course, the toCameraSocket=-1
is change to toCameraSocket=1
to corresponding to OAK-D left camera number.
Please correct me if I'm wrong. Thanks in advance !
Best regards,
Hiep Nguyen