Effective use of the Emitter Toggle and USB bandwidth
We currently are using the D435 for two operations simultaneously:
- The camera IR stream needs to reliably read fiducials such as Aruco or April tags. This requires the emitter to be off.
- The sensor is also reading depth and this does require the emitter on to be reliable.
We have a configuration that works well that takes advantage of the toggle_emitter mode. We run the sensor at 30 fps and effectively have a clean depth and clean IR image output both at 15 fps.
Question to the community/feature request. Is there a way to configure the sensor to only send the depth channel on the USB if the emitter is on and likewise only send the IR stream when the emitter is off? As it is currently I check the data after is has already passed from the camera to the host via the USB effectively throwing half my bandwidth away. I would like to recover this USB bandwidth and allow me to put more than one sensor on the USB3 port.
Any ideas?
-
You can control camera sensors directly at the point of capture using the Low-Level API
https://github.com/IntelRealSense/librealsense/blob/master/doc/api_arch.md
The low level can be accessed with scripting callbacks, as demonstrated by the example program rs-data-collect
https://github.com/IntelRealSense/librealsense/tree/master/tools/data-collect
I am not personally aware of an existing scripting means to prevent transmission of a stream type from the camera hardware on a per-frame basis though (since depth and IR are active simultaneously in your particular project).
Intel tested bandwidth consumption for various combinations of stream modes and number of cameras from 1-4 for their multiple camera white paper. This may provide useful guidance for bandwidth estimation.
-
Thanks for the links and references. We are aware of the white paper and low-level api and use both. We have found as confirmed by the white paper that at 30fps and the resolution our application needs we cannot put two D4xx's streams into a single USB3 port via an external USB switch. We have sampled various switches and some are better than others. In general there is too much bandwidth and dropped frames occur.
It would be a good feature enhancement to have the sensor proactively drop IR and Depth frames at the source in sync with the emitter being toggled automatically.
-
Thanks very much for the additional information. The usual approach to having multiple RealSense cameras on the same port would be to use a USB hub. If the amount of space a hub would take up and excessive cable length is a concern, 'mini hubs' are available. Google for usb 3.0 mini hub for more details.
The RealSense SDK can produce a device list by querying for all attached devices that can be detected (e.g all the cameras on a USB hub) so that individual cameras can be configured.
https://intelrealsense.github.io/librealsense/doxygen/classrs2_1_1context.html
Being able to start and stop individual cameras on a hub using SDK programming may have a similar effect in your project to switching between devices on a USB switch box to set the currently detectable camera.
Please sign in to leave a comment.
Comments
3 comments