Cannot launch 2 realsense camera D435 on one pc (Solved )
I am trying to use two realsense camera D435 on one pc and I am using a usb3.0 hub but I am getting this error, Knowing that I have updated the firmware of the cameras and I am using ubuntu 16.04 and ROS kinetic :
[ERROR] [1540797812.593350082]: An exception has been thrown: xioctl(VIDIOC_S_FMT) failed Last Error: Device or resource busy
[FATAL] [1540797812.714744205]: Failed to load nodelet '/camera1/realsense2_camera` of type `realsense2_camera/RealSenseNodeFactory` to manager `realsense2_camera_manager'
[camera1/realsense2_camera_manager-2] process has died [pid 3081, exit code -11, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/jad/.ros/log/8900c75c-db4b-11e8-899e-e4a471c99bc7/camera1-realsense2_camera_manager-2.log].
log file: /home/jad/.ros/log/8900c75c-db4b-11e8-899e-e4a471c99bc7/camera1-realsense2_camera_manager-2*.log
[camera1/realsense2_camera-3] process has died [pid 3082, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load realsense2_camera/RealSenseNodeFactory realsense2_camera_manager __name:=realsense2_camera __log:=/home/jad/.ros/log/8900c75c-db4b-11e8-899e-e4a471c99bc7/camera1-realsense2_camera-3.log].
log file: /home/jad/.ros/log/8900c75c-db4b-11e8-899e-e4a471c99bc7/camera1-realsense2_camera-3*.log
Edit :
lsusb:
Bus 002 Device 039: ID 8086:0b07 Intel Corp.
Bus 002 Device 038: ID 8086:0b07 Intel Corp.
Bus 002 Device 037: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.
lsusb -t:
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
|__ Port 1: Dev 37, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 38, If 2, Class=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 38, If 0, Class=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 38, If 3, Class=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 38, If 1, Class=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 38, If 4, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 39, If 0, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 39, If 1, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 39, If 2, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 39, If 3, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 39, If 4, Class=Video, Driver=uvcvideo, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 1: Dev 54, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 45, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 45, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 5: Dev 53, If 0, Class=Imaging, Driver=usbfs, 480M
|__ Port 7: Dev 3, If 0, Class=Video, Driver=, 480M
|__ Port 7: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 12: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 12: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
I don't use any realsense hw myself, but this error seems to indicate that both driver instances are trying to open the same device.
You'll probably need to figure out some way to configure the driver instances to open different cameras.
Did you update the realsense ROS wrapper and which launch file are you using? Could you please provide us with the output of
lsusb
andlsusb -t
while having both cameras connected?