realsense-ros: Multiple RS (D435) cameras couldn't work consistently every time when launched by roslaunch

Hardware Configuration:

  • Intel Tiger Lake (with i5-1135G7)
  • RealSense D435 x 2

Software Configuration:

How to reproduce:

  1. roslaunch realsense2_camera rs_multiple_devices.launch serial_no_camera1:=$SN_1 serial_no_camera2:=$SN_2;
  2. Ctrl + C to terminate;
  3. Repeat Step 1 & 2.

Tthe random issue happens with the log:

[ERROR] [1614725788.584507682]: An exception has been thrown: failed to set power state
[ERROR] [1614725788.584532752]: Exception: failed to set power state
 02/03 22:56:28,584 ERROR [140219894437632] (handle-libusb.h:95) failed to claim usb interface: 0, error: RS2_USB_STATUS_BUSY
 02/03 22:56:28,584 ERROR [140219919615744] (sensor.cpp:523) acquire_power failed: failed to set power state
 02/03 22:56:28,584 WARNING [140219919615744] (rs.cpp:372) null pointer passed for argument "list"

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Great news @Austin-Hu that -DFORCE_LIBUVC=OFF solved your multiple camera problem with Failed to set power state. I have added notes to my research records so that they come up when researching future cases similar to this one. Thanks!

Hi @leopck It is the same SDK in both cases but it will have different behaviors depending on which build method was used.

RSUSB backend (a build method previously known as libuvc backend) has the advantage when set to True of installing librealsense over an internet connection without dependence on Linux versions or kernel versions and without the need for patching. This can be useful in situations where some element of the RealSense user’s Linux configuration such as the kernel version conflicts with librealsense.

It does have some limitations though and is not recommended for use in commercial projects. For more information about this, please visit the link below and scroll down through the linked-to comment to the section headed What are the advantages and disadvantages of using libuvc vs patched kernel modules?

https://github.com/IntelRealSense/librealsense/issues/5212#issuecomment-552184604

V4L2 backend can be considered to be a build mode where libuvc backend (installation without kernel patching) is set to False.

https://github.com/IntelRealSense/librealsense/issues/6841#issuecomment-660859774