ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cannot launch 2 realsense camera D435 on one pc (Solved )

asked 2018-10-29 02:33:07 -0500

Jad gravatar image

updated 2018-10-29 09:01:02 -0500

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
edit retag flag offensive close merge delete

Comments

failed Last Error: Device or resource busy

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-29 03:10:52 -0500 )edit

Did you update the realsense ROS wrapper and which launch file are you using? Could you please provide us with the output of lsusb and lsusb -t while having both cameras connected?

dljubic gravatar image dljubic  ( 2018-10-29 07:49:56 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-10-29 08:43:07 -0500

AndyZe gravatar image

A couple things to check:

1) Are you using the "rs_multiple_devices" launch file?

2) Did you put the right serial numbers in the launch file? A sticker on the camera shows the serial number.

3) Are you using USB3 ports?

edit flag offensive delete link more

Comments

@AndyZe Thanks !! I just made it work. was launching the rs_multiple_devices without filling the serial numbers coz I though this will be automatically assigned once I run the launch file so it seemed that I was launching the same camera twice. Now it is working with the correct serial numbers.

Jad gravatar image Jad  ( 2018-10-29 08:53:16 -0500 )edit
0

answered 2018-10-29 08:26:49 -0500

Jad gravatar image

updated 2018-10-29 08:30:41 -0500

Thanks for your reply @dljubic : I am using realsense-2.1.0 and an usb 3.0 hub :

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
edit flag offensive delete link more

Comments

The output seems fine. The bandwidth is high enough for RealSense cameras. Could you also tell me which launch file are you using?

p.s. you should edit your question and place the outputs there.

dljubic gravatar image dljubic  ( 2018-10-29 08:55:03 -0500 )edit

@dljbic thanks !! the problem is solved I was launching the rs_multiple_devices without filling the serial numbers coz I though this will be automatically assigned once I run the launch file so it seemed that I was launching the same camera twice. Now it is working with the correct serial numbers.

Jad gravatar image Jad  ( 2018-10-29 09:00:48 -0500 )edit

Great, I am glad you solved it. :)

dljubic gravatar image dljubic  ( 2018-10-29 09:04:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-10-29 02:33:07 -0500

Seen: 2,308 times

Last updated: Oct 29 '18