ouster-lidar / ouster-ros

Official ROS drivers for Ouster sensors (OS0, OS1, OS2, OSDome)
https://ouster.com
Other
116 stars 139 forks source link

't' timestamp field content is not plausible #350

Open lukasj-imar opened 1 month ago

lukasj-imar commented 1 month ago

Describe the bug I'm switching from community driver to this driver. In my application I use the content of the t data field for pointcloud deskewing. The value of this field by the community driver contents the relative timeshift of each point since start of frame in nanoseconds. So for a OS1-128 in 1024x20 operation mode, the timestamp of the first and each 1024th point is zero. The ofifcial driver outputs the following timestamp values for the corresponding clouds:

point[0] = 49416704 point[12] = 0 point[1024] = 49806592

I don't have any idea of the meaning of these timestamps. Please let me know if you need further information.

To Reproduce Configure with native or original pointcloud profile.

Platform (please complete the following information):

Samahu commented 1 month ago

Hi @lukasj-imar,

I want to look further into this but my gut feeling this happens when the lidar packet stream have some missing packets which means there is no proper time for these points. You can tell if this is the case by examining any of the XYZ values for any NANs. Another occasion of when this could happen is if you are using PTP clock and a sync event causes the shift to occur mid of the lidarscan. This would definitely result in some of the timestamps being zeros. What clock do you use?