PepperlFuchs / pf_lidar_ros_driver

ROS driver for Pepperl+Fuchs R2000 and R2300 laser scanners
https://www.pepperl-fuchs.com/global/en/23097.htm
Apache License 2.0
39 stars 38 forks source link

Fix timestamp: subtract packet time instead of full scan time #125

Open MichaelGrupp opened 6 months ago

MichaelGrupp commented 6 months ago

The previous timestamp patch in PR #104 subtracted the full scan time from the last point time of the first packet to determine the scan timestamp.

It has to be the time for a single packet instead. Otherwise, the timestamp is too far in the past.

This is especially noticeable when the scan frequency is in a lower range like 10Hz, i.e. the scan timestamp would be 100ms off compared to other sensor modalities.