Closed benemer closed 2 weeks ago
I now introduce the TimeStampsHandler
module, which implements the logic discussed with @benemer, that is:
In both cases, the end stamp of one odometry query will become the begin stamp of the following query.
The only breaking point I see until now is if the scan is stamped at the end and the relative timestamps in the PointField
have a negative value. In that case, our motion compensation will break very severely... This shouldn't happen (last famous words).
The current implementation misses the combination of stamping at the beginning of the scan and having relative timestamps. Right now, we assume you stamp at the end, even though you can get the duration from the timestamps.
Also, having negative timestamps for de-skewing does not work when using the KISS deskewing because we subtract the mid_pose_timestamp=0.5
from it, see here.
There are some inconsistencies in our timestamping that this PR addresses to fix.
First, we currently query the TF tree for the odometry from the beginning to the end of the current scan. This is incorrect because the sensor might drop frames, and we, in that case, ignore the odometry during that time.
Second, we assume that the timestamps of the points are absolute, which is not necessarily the case.
We can still not cover one case: if the timestamp of the ROS message is the beginning of the scan and no timestamps are provided for the points. In such a case, there is no way to query the correct odometry from TF because the exact timestamp at the scan's end is unknown.