Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intercam HW Sync No Timestamp Drift #3565

Closed
didory123 opened this issue Mar 22, 2019 · 8 comments
Closed

Intercam HW Sync No Timestamp Drift #3565

didory123 opened this issue Mar 22, 2019 · 8 comments

Comments

@didory123
Copy link

didory123 commented Mar 22, 2019


Required Info
Camera Model D400 }
Firmware Version 05.11.01.100
Operating System & Version Win 10
Platform PC
SDK Version 2.19
Language C++

Issue Description

Hi guys,

I'm attempting to hardware sync two different Intel D435 cameras together. According to the Intel whitepaper on multi camera configuration, I should be able to see a drift over time in the timestamps of frames, and this is how you should check for the validity of your hardware sync configuration. However, I wasn't quite sure how the devices should be set up in order to test out this drift.

Is it:

  1. When the cameras are connected by the HW sync circuit, but all the cameras/sensors have their RS2_OPTION_INTER_CAM_SYNC_MODE set to 0, the default mode (i.e. no master/slaves are set).
  2. When the cameras are connected by the HW sync circuit, with one camera set as the master and the others set as slaves.

I have my two cameras synced up according to the circuit diagram from the whitepaper, but I'm not able to see this drift happen. I'm measuring the difference between the hardware clock timestamps of each frame from the two cameras, and letting it run for over 10s of minutes (as again specified in the whitepaper). However, the difference in the timestamps remain the same and do not change. If anyone is able to help, I would be very grateful!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 22, 2019

One camera should be set as master and the other ones set as slave. For the master camera, inter cam sync should be set to '1', and the slaves should have inter cam sync set to '2'.

An easy way to check whether the timestamp sync is drifting is to do the sync in the RealSense Viewer program. Once your two cameras are added, you can set the inter cam sync value from a slider in a menu ('1' for the master camera and '2' for the slave). It is under the 'Controls section of the side-panel options.

image

A user on the Intel Support RealSense site recently found it useful to refer to a silent YouTube video guide to set up hardware sync in the RealSense Viewer.

https://www.youtube.com/watch?v=DSm7NYG5bZE&

@dorodnic has some advice about depth to color hardware sync on D435 in the link below, if that is the type of sync that you are attempting on your D435.

#2637 (comment)

@didory123
Copy link
Author

Hi Marty! Thanks for the response.

I'm still confused as to what exactly the time drift is supposed to be then. I've already checked out the Viewer before and tried the built-in inter cam sync mode tool, but to my understanding the drift is the difference in timestamp between the two devices; the streams in the viewer display the frame times very quickly, therefore I cannot tell if there is even a drift happening between the two cameras. Or is my understanding of this sync drift incorrect?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 22, 2019

The multiple camera white paper says that the extent of the drift may be a few milliseconds over the course of '10s of minutes'. So it may not be easily observable unless the camera is left running for a while.

In some ways it may be similar to an episode of the television show Star Trek The Next Generation where time was slowed down to an almost stop, and an explosion had occurred but it was moving so slowly that it was observable as a seemingly immobile cloud that appeared static but was just expanding at a rate too slow to see with the human eye.

@didory123
Copy link
Author

So let me just clarify some final things:

  1. To test this drift, I should let the two cameras run for 10s of minutes in the viewer tool with one as master and the other as slave. I should note the difference in timestamp of the two streams at the beginning of this run, and when I check back later after some time has elapsed this difference in timestamp should have changed?
  2. If I do the same thing as above, but with no hardware sync circuit and both cameras set to 0 (default mode), the timestamp difference between the two camera streams at the beginning of the run should be the same as the timestamp difference after 10s of minutes have elapsed?\

Thanks again for your response!

@MartyG-RealSense
Copy link
Collaborator

Your analysis sounds correct, yes. Good luck with your tests!

@didory123
Copy link
Author

@MartyG-RealSense Seems like it works, I saw a tiny amount of drift between my two cameras when hooked up via HW sync. Thanks for your help!

@MartyG-RealSense
Copy link
Collaborator

Awesome news, thanks so much for the update!

@kameel2311
Copy link

kameel2311 commented Apr 28, 2023

@MartyG-RealSense @didory123 I am currently trying to achieve the same observations but not managing to notice the drift. Different sources suggested that the Drift is between the same camera's own frames , which is confusing and makes more sense to measure between cameras.

Moreover, can you elaborate on which timeframe domain did you read from ? The Global Timeframe ? And if there were any tricks to get it working.

Would really appreciate your reply !

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

No branches or pull requests

4 participants