librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Using a single rs2::syncer to synchronize between devices?

Open evercoast-smm opened this issue 7 years ago • 6 comments

Camera Model: D415 Firmware Version: 05.11.15.00 OS: Ubuntu 18.04 with kernel 4.18.20-041820-generic Platform: PC SDK Version: librealsense-2.29.0 Segment: Telecommunications

https://github.com/IntelRealSense/librealsense/blob/master/doc/frame_lifetime.md

^^ The above doc states:

You can also use a single rs2::syncer to synchronize between devices, assuming it makes sense.

If you could please elaborate on this idea and how it might be utilized? Also, is there any documentation or example code related to the 'syncer' classes?

Thank you!

evercoast-smm avatar Oct 14 '19 13:10 evercoast-smm

There is a user-contributed script here for using rs2::syncer with multiple cameras:

https://github.com/IntelRealSense/librealsense/issues/4158#issuecomment-505559462

More documentation on syncer is here:

https://github.com/IntelRealSense/librealsense/wiki/Frame-Buffering-Management-in-RealSense-SDK-2.0#syncer

MartyG-RealSense avatar Oct 14 '19 19:10 MartyG-RealSense

As long as frame timestamp domain equals global time (or system time), it should be possible to use syncer to bundle frames from different sensors. It is problematic when using raw hardware clocks.

dorodnic avatar Oct 15 '19 14:10 dorodnic

Thank you @MartyG-RealSense and @dorodnic.

Is there a recommended queue size for the rs2::syncer? The constructor defaults to 1?

evercoast-smm avatar Oct 16 '19 19:10 evercoast-smm

Have you seen the advice Dorodnic provided yesterday in your frame queue best practices post please?

https://github.com/IntelRealSense/librealsense/issues/5041#issuecomment-542241323

MartyG-RealSense avatar Oct 16 '19 20:10 MartyG-RealSense

Yes, I have! And thank you for the links; very helpful.

evercoast-smm avatar Oct 17 '19 14:10 evercoast-smm

We fully understand this now, can close the ticket. Thank you to everyone for your help!

evercoast-smm avatar Oct 19 '19 14:10 evercoast-smm