direct_lidar_inertial_odometry icon indicating copy to clipboard operation
direct_lidar_inertial_odometry copied to clipboard

`baselink2imu` and `baselink2lidar` are reversed

Open VRichardJP opened this issue 1 year ago • 3 comments

Despites their name, both baselink2imu and baselink2lidar are used as imu->baselink and lidar->baselink transformations in the code.

For example, this line:

https://github.com/vectr-ucla/direct_lidar_inertial_odometry/blob/77b356325dd629cc6f0f1a048bd867ca5ff3d5c3/src/dlio/odom.cc#L1386

converts IMU angular velocity measurement into baselink frame.

Another example:

https://github.com/vectr-ucla/direct_lidar_inertial_odometry/blob/77b356325dd629cc6f0f1a048bd867ca5ff3d5c3/src/dlio/odom.cc#L575-L576

Here, the original LIDAR scan (so in lidar frame) is first transformed by baselink2lidar, as if it was "lidar->baselink".

Not only it makes the code confusing, but it is also easy to miswrite the transforms in the dlio.yaml file. I think it would be better to rename these transforms to lidar2baselink and imu2baselink:

$ grep -rIl baselink2lidar | xargs sed -i 's/baselink2lidar/lidar2baselink/g'
$ grep -rIl baselink2imu | xargs sed -i 's/baselink2imu/imu2baselink/g'

?

VRichardJP avatar Jun 04 '24 02:06 VRichardJP

Good point -- technically yes they represent the transformation from sensor to baselink. Sorry for the confusion.

kennyjchen avatar Jun 05 '24 21:06 kennyjchen

Is the issue closed?

iampaulidrobo avatar Aug 25 '25 11:08 iampaulidrobo

but when you look the baselink2imu_t in imu transform it is right but baselink2imu_R is wrong

Tempest55 avatar Nov 12 '25 13:11 Tempest55