-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Multi Camera HW Sync Questions #2637
Comments
Quick question before I try to dive into all the individual items - are you getting the |
Thanks for the quick response! I should've included some example output. The attached files are both with 3 cameras plugged in through a powered USB hub. I am getting the |
What do you mean by "grayed out"? The Viewer should show either combo-box (or a slider sometimes) named Inter-Camera Sync, starting from firmware 5.9.13.6 for the D435 and 5.9.15.1 for D415.
Perhaps @agrunnet would be able to comment
You are doing it correctly, I think at the time of writing of the white paper there was a typo in the Doxygen that leaked into the white-paper.
As far as I know D415 allows Depth+Color sync to another Depth+Color. D435 allows Depth to Color sync, and Depth to another Depth sync, but not Color to another Color, so at least one (or both) of the color sensors will not be synced. Perhaps firmware / hardware people will be able to find a solution in future update, but for now it is a limitation. For the D415, setting option on the depth sensor will also propagate to color (assuming regular checklist for sync is green - AE Priority Off and same FPS)
I don't know the answer to that.
I would get rid of
Not yet, unfortunately.
I don't think we have a date we can communicate.
Perhaps @RealSense-Customer-Engineering can offer more answers, I'm not 100% sure.
It is always of the depth sensor, but I don't recommend to rely on this.
Not at the moment, but we are implementing it right now (together with more options). So within couple of weeks. If you will really need it before, we can help you "hack" the wrapper to add it. I wish I could be more helpful, this is a complex multidisciplinary topic, but I hope my colleagues will be able to fill the gaps. |
As far as I know, I'm using the newest firmware version available. I did a source build from
Got it, thanks.
How does the Depth to Color sync work in D435? More specifically, what do I need to do to enable it? Also, if color can't be synced to depth, does that mean I should have a separate
Will do. I had set that originally because I noticed in the
I understand. Glad to know that it's being worked on, though!
Got it. I guess the data on the
I was hoping to have this project completed for a demo on December 1st. Does that sound like a realistic timeline for the ROS wrapper, or should we investigate hacks?
You've been plenty helpful. Thank you so much! |
When working with a single camera, hardware sync between color and depth kicks-in once they run at the same actual FPS. To ensure it, you can disable Another hardware quirk is that color frames get their timestamp at a different time (mid exposure, I think?), so the timestamps are not perfectly aligned. We try to work around that in
Yes, if you enable all depth streams (synced) and all color streams, the color streams might introduce some unwanted latency to the depth streams (since every wait for frame will try to match depth frame to a color frame). This should not create delays greater than the frame interval, but if this is unacceptable, you can switch to directly controlling each sensor (see sensor-control example) |
Also, the control for hardware sync is under |
All of that makes sense. Thanks again :). I had a few more questions regarding the details of the synchronization and triggering. Specifically:
To your earlier points - I'll definitely look at controlling sensors directly, as in that example. Based on our discussion, I believe our current approach for the application is to use a different RGB sensor which can be triggered externally in combination with the RealSense for depth images. If you'd like (or more appropriately, have the time), I'd be happy to discuss more specifics of our application with you offline. |
@RealSense-Customer-Engineering Are there any updates here? |
Have you solved the hardware sync problem? I set up the hardware sync setting as what whitepaper says and used the codes you posted. But I did not see the same time stamp from the cameras. |
[Realsense Customer Engineering Team Comment] When different cameras are sync'd, you will see all cameras capture an image at same time. The depth sensor can run as low as 6 fps. |
Now the I set the depth cameras synced but have no luck with color cameras. I am using realsense D415. I found even for one camera, the depth and color timestamps are not the same. I tried to found how to sync the internal sensors for D415 but still have no luck. |
Have you fixed the sync problem? |
Is it possible to run the sensors at another framerate while triggered by external pulse (e.g. 20/40 fps, instead of 15/30/60/90)? |
Issue Description
I'm trying to develop a robot perception system which uses 4x hardware synced RealSense D435 cameras. However, I'm having some trouble actually getting the hardware sync to work properly. I've also stumbled across some (what I think are) discrepancies in the documentation that I'd like to get addressed if possible.
This is what my setup currently looks like.
There are currently only 3 cameras on the board. I figured I'd get those to work before adding a fourth. Each camera is configured to stream at 848x480 at 30fps on both depth (Z16) and color (RGB8). All of the cameras have been wired such that their pins 5 (VSYNC) and 9 (GROUND) are connected. No other pins on the cameras have been connected. The 3 cameras are plugged in to a powered USB 3.0 hub, which is then plugged into the USB 3.0 port on my laptop.
I read this version of the multi camera whitepaper, as well as a number of different GitHub issues and other forum posts when trying to develop the following code. I also referred to the Doxyen documentation. This code should, in theory, do the following:
Assuming everything is configured correctly in hardware and in software, I should observe a drift in the timestamps (according to the whitepaper). However, that doesn't seem to be happening. As a result, I have a number of questions:
realsense-viewer
, but I've been unable to trigger sync with multiple cameras in the viewer (the option remains grayed out).RS2_OPTION_INTER_CAM_SYNC_MODE
on anything other than the depth sensor. Furthermore, since I'm unable to set any flags on RGB, how does the RGB image sensor get hardware synced?RS2_OPTION_FRAMES_QUEUE_SIZE
that I'm currently setting to 1 for each sensor? Along the same lines, I saw some references to using a frame queue to poll for frames, rather than thers2::pipeline
. However, I wasn't able to find any sample code using it in the library. Is there a simple example available?rs2::frameset
containing both a depth image and a color image? Is it always the data corresponding to a particular type of frame, random, or a different timestamp and frame number altogether? My program seems to indicate that the frameset always has the depth image's data.I do apologize for the long set of questions. I'm hoping this issue can become a reference for anyone else trying to set up a multi camera hardware sync.
Source code:
P.S. If there are better ways of using the RealSense API than what I've demonstrated above, please let me know.
The text was updated successfully, but these errors were encountered: