jetsonhacks / buildLibrealsense2Xavier

Build librealsense 2.0 library on the NVIDIA Jetson AGX Xavier Developer Kit. Intel RealSense D400 series cameras.
MIT License
56 stars 29 forks source link

realsense-viewer show backend in rs_open_multiple ... cannot allocate memory when streaming multiple D435i cameras #17

Closed szx0112 closed 4 years ago

szx0112 commented 4 years ago

I connect 4 d435i on xaver through usb hub. When I open more than 4 streams (no matter rgb or depth stream), the following error shows:

Backend in rs2_open_multiple(sensor:0x55a2a0c180, profile:0x55a50231b0, fail to start streaming. Last Error: Cannot allocate memory.

The xavier is installed with jetpack 4.3 and the librealsense is installed in the Debian fashion without kernel patch as mentioned in the documents.

Any comment is appreciated.

jetsonhacks commented 4 years ago

I believe the AGX Xavier has one internal USB 3 hub. Everything goes through there, regardless of how you get it there externally. A USB device reserves the amount of bandwidth it requires. Some of the devices reserve as much as there maximum settings require. "Cannot allocate memory" more than likely means that it cannot allocate as much USB bandwidth as is being requested. 4 D435i cameras with all streams enabled are well over what one USB 3 channel can handle.

szx0112 commented 4 years ago

Thanks for the reply. I tried to reduce the resolution to 640x480 now it seems be able to stream 4 cameras with both rgb and depth enabled. Only a minor frame loss observed, so I agree it is a USB bandwidth issue. But it is just annoying xavier with such computing power can technically just stream 2 d435i cameras.