Skip to content

Conversation

@MichaelGrupp
Copy link
Contributor

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.

The previous timestamp patch in PR PepperlFuchs#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.
msg->header.stamp = packet.last_acquired_point_stamp - scan_time;
msg->angle_increment = packet.header.angular_increment / 10000.0 * (M_PI / 180.0);

{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off-topic: why is this part in its own scope?

MichaelGrupp added a commit to magazino/pf_lidar_ros_driver that referenced this pull request May 22, 2024
This is almost the same as the patch for master, but the timestamping
has changed between these versions (and both are wrong).

Patch for master: PepperlFuchs#125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant