robot-learning-freiburg / LCDNet

PyTorch code for training LCDNet for loop closure detection in LiDAR SLAM. http://rl.uni-freiburg.de/research/lidar-slam-lc
GNU General Public License v3.0
178 stars 23 forks source link

question about the pose transformation #3

Closed KN-Zhang closed 2 years ago

KN-Zhang commented 2 years ago

Hello! In generate_loop_GT_KITTI.py, why there is pose = np.linalg.inv(T_cam_velo) @ (pose @ T_cam_velo)?

I know that _T_camvelo means the transformation matrix from velodyne to camera0, while pose is that from camera0 to the world. Thus the transformation between velodyne to the world can be just calculated by _pose @ T_camvelo. I can not understand why there is still a term of _np.linalg.inv(T_camvelo). Could you help me with this question? Thanks!

cattaneod commented 2 years ago

Hi @KN-Zhang,

as we used the SemanticKITTI ground truth poses, we followed their development kit to convert poses from camera to lidar frame (https://github.com/PRBonn/semantic-kitti-api/blob/c2d7712964a9541ed31900c925bf5971be2107c2/generate_sequential.py#L66).

From my understanding, the first part of the multiplication np.linalg.inv(T_cam_velo) is converting the origin (World frame) from camera to lidar, which is probably unnecessary. However, I haven't tested without it.