Realsense Camera Recognition in Docker

Hello everyone,

I am currently using a Jetson AGX Orin 64GB Developer Kit with Jetpack 6.1 and Isaac ROS 3.2. My goal is to perform visual SLAM with a Realsense D435i camera.

However, I’ve encountered an issue when running Docker with the Realsense camera connected via USB. The camera is not recognized within the container immediately after Docker starts. To make it work, I have to disconnect and reconnect the camera, which is inconvenient.

Is there a way to resolve this issue? Below is the log output from the rs-enumerate-devices command executed right after starting Docker, showing that the camera is not detected:

 16/01 10:25:42,031 ERROR [281473541064768] (handle-libusb.h:53) failed to open usb interface: 0, error: RS2_USB_STATUS_ACCESS
 16/01 10:25:42,032 ERROR [281473582876736] (uvc-sensor.cpp:412) acquire_power failed: failed to set power state
 16/01 10:25:42,033 ERROR [281473582876736] (rs.cpp:237) [rs2_create_device( info_list:0xaaaacac6ba90, index:0 ) UNKNOWN] failed to set power state
 16/01 10:25:42,034 ERROR [281473582876736] (rs.cpp:237) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device"
Could not create device - failed to set power state . Check SDK logs for details
 16/01 10:25:42,041 ERROR [281473549518912] (handle-libusb.h:53) failed to open usb interface: 0, error: RS2_USB_STATUS_ACCESS
 16/01 10:25:42,041 ERROR [281473582876736] (uvc-sensor.cpp:412) acquire_power failed: failed to set power state
 16/01 10:25:42,042 ERROR [281473582876736] (rs.cpp:237) [rs2_create_device( info_list:0xaaaacac6ba90, index:1 ) UNKNOWN] failed to set power state
 16/01 10:25:42,042 ERROR [281473582876736] (rs.cpp:237) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device"
Could not create device - failed to set power state . Check SDK logs for details
No device detected. Is it plugged in?
admin@ubuntu:/workspaces/isaac_ros-dev$ rs-enumerate-devices
 16/01 10:25:59,265 ERROR [281473624229952] (handle-libusb.h:53) failed to open usb interface: 0, error: RS2_USB_STATUS_ACCESS
 16/01 10:25:59,265 ERROR [281473666054208] (uvc-sensor.cpp:412) acquire_power failed: failed to set power state
 16/01 10:25:59,266 ERROR [281473666054208] (rs.cpp:237) [rs2_create_device( info_list:0xaaaafb2ff4e0, index:0 ) UNKNOWN] failed to set power state
 16/01 10:25:59,266 ERROR [281473666054208] (rs.cpp:237) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device"
Could not create device - failed to set power state . Check SDK logs for details
No device detected. Is it plugged in?

I would greatly appreciate any suggestions or solutions to address this problem. Thank you in advance for your help!

Hi @jmin2

Thank you for your post and the details.

Please check if this realsense camera is functional with realsense-viewer outside of docker.

If it also can not be recognized, the issue might be …

  1. Intel RealSense depth cameras may lose connection and cause errors unless connected to a USB 3 port with a high-quality USB cable, especially if the cable length exceeds 1 meter.
  2. Use of multiple RealSense depth cameras may demand more power than the USB 3 ports on Jetson AGX Orin can reliably provide, leading to instability. If this occurs, consider using a powered USB hub meeting the USB 3.2 Gen 1+ standard (e.g., StarTech model HB30A7AME)
  3. Damaged realsense camera.

If this module can work outside of docker, please check the versions. It is required to use RealSense firmware version 5.13.0.50, librealsense SDK version 2.55.1 and realsense-ros driver version 4.51.1-isaac.
https://nvidia-isaac-ros.github.io/getting_started/hardware_setup/sensors/realsense_setup.html

Best,
Ahung

Hi @Ahung,

Thank you for your helpful response!

The camera is recognized and working fine outside of Docker, and it is also detected properly inside Docker most of the time. However, I occasionally experience an issue where the camera is not recognized immediately after Docker starts, or at unexpected moments, and I have to disconnect and reconnect the USB cable to get it working again.

I would appreciate any guidance on how to resolve this, especially regarding the issue where the USB connection is recognized outside of Docker, but after Docker is started, I need to disconnect and reconnect the USB to make it work inside the container.

Thank you once again for your assistance.

Hi @jmin2

For occasionally case, would you try the mentioned USB suggestions above?

Best,
Ahung

Thank you for your follow-up!

I have ensured that all the recommended versions are correctly matched. Among the three suggestions you provided, I have not yet tried the second one (using a powered USB hub). Currently, I am using one camera connected to a USB-C port and another to a USB 3.2 port.