[IEEE ICRA'23] A new lightweight LiDAR-inertial odometry algorithm with a novel coarse-to-fine approach in constructing continuous-time trajectories for precise motion correction.
MIT License
521
stars
101
forks
source link
Many race conditions on published messages data #55
And then it is used as timestamp for published messages in the following callbacks:
in publishPose (timer callback)
in callbackCloud (lidar sensor data callback)
Since everything runs in parallel in multiple thread, you get a race condition. For example, by the time the latest LIDAR scan has been processed and is ready to be published, many IMU messages may have been received already, thus causing the published LIDAR stamp look further in time than it actually is.
The consequence is that some of the data DLIO publishes is not reliable.
For example, let's focus on
this->imu_stamp
:Its value is set in
callbackImu
here: https://github.com/vectr-ucla/direct_lidar_inertial_odometry/blob/bed8ae38dc7ccfa8b75a869f7afe83a83990a9c1/src/dlio/odom.cc#L866And then it is used as timestamp for published messages in the following callbacks:
publishPose
(timer callback)callbackCloud
(lidar sensor data callback)Since everything runs in parallel in multiple thread, you get a race condition. For example, by the time the latest LIDAR scan has been processed and is ready to be published, many IMU messages may have been received already, thus causing the published LIDAR stamp look further in time than it actually is.
The consequence is that some of the data DLIO publishes is not reliable.