Multi-LiDAR time synchronization with phase_lock

Hi,

I’m currently facing an issue about time synchronization. I’m using 4 Ouster OS1 LiDARs with ROS2 humble driver, but the time synchronization between the sensors is not working correctly. Both PTP and phase_lock are enabled on all devices. Do you know any solutions to this problem?

I have four Ouster LiDARs installed at 90-degree angles from each other, and I’ve set their phase lock offsets to 0, 90000, 180000, and 270000, respectively. In this configuration, I observe timestamp differences of 0, 25, 50, and 75 ms between the sensors. However, if I set all offsets to 0, the timestamps from all sensors are almost identical.

According to the documentation, the phase lock offset should be configured based on each sensor’s transform from ego vehicle. But in that case, the timestamps are no longer synchronized. Is this still considered the correct configuration?

Yes, the lidars sound like they are configured correctly and are time synched. Because you have changed each sensor’s phase offset, the start-of-frame times are also phase offset by the same amounts.

Keep in mind that the lidars begin their frames at the zero degree position. Phase locking the lidars to different angles means that they hit the zero degree frame boundary at different times as you are noticing. If you would like to align the frame boundaries of the lidars, then you can set all their phase offsets to the same value.

Applying different phase offsets to different lidars is typically useful when you are combining data from multiple lidars that have overlapping fields of view to improve perception coverage. When combining data from multiple lidars with overlapping data, it’s important to try to temporally align the overlapping data which means adjusting the lidar phase lock angles so they point in the same direction at the same time.

If you are processing each lidar’s data independently, or the lidar data is non-overlappin - which sounds like it may be the case in your setup with lidars point in each cardinal direction - then it is probably better to keep all phase offsets the same (all zero for instance).

Let me know if this helps

If I want to merge data from 4 LiDARs into a single frame, should I compensate for their start-of-frame times?
For example, if I receive scans with timestamps 100, 125, 150, and 175 (ms), should I subtract those offsets (like 25, 50, 75), or treat the latest timestamp (175) as the start of the next frame (e.g., 200)?
I’m a bit unsure about how phase offset works. My understanding is that phase offset makes all sensors pass the frame start (with offsets applied) at the same time — is that correct?

To answer your last question: phase offset means that at the particular offset angle, the lidar’s should read the same timestamp. So if you have 4 lidar frames you would need to compare the timestamp for the column of data that corresponds to the phase offset setting for each lidar. Those timestamps should all read similar times.

This is not the same thing as comparing the start-of-frame times (the 0th column timestamp). These timestamps are expected to be different when you set different phase offsets.

So if we have two LiDARs, A and B, with phase_offset=0 and phase_offset=180 respectively, then LiDAR A would have a timestamp_offset=0, and LiDAR B would have a timestamp_offset=50ms, right?

In that case, LiDAR A collects data from 0–100ms and stores it in the 0ms frame, while LiDAR B collects data from 50–150ms and stores it in the 50ms frame. At 50ms, both LiDARs are observing the scene at the same point in time.

Does that mean when we want to merge the data, we can only align the range between 50ms and 100ms, where the offsets overlap?

You are hitting on a fundamental issue with any multi-sensor system: temporally and spatially aligning data from multiple sources and building alogithms that are resilient to inevitable misalignments. Ultimately, how you engineer your system is up to you and your use case. If you described what you were trying to accomplish we could help you better.

Many systems like ROS treat all data sources asynchronously and process whatever data is received from different sensors on a fixed frequency. The challenge being that you may receive different amounts of data from each sensor on each processing loop and your algorithms need to account for that.

The ouster-sdk is designed with a different, frame-synchronous, approach in mind. Data is processed once a complete frame-set is received from all sensors. In this case, you always have all the data from all sensors, but the system has more latency when sensors are producing frames at different times like when phase offsets are used.