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

Getting failed to open device error for swissranger even after udev rules change

asked 2012-12-22 12:59:57 -0500

Nahkki gravatar image

I'm attempting to set up a swissranger TOF camera in ROS to be used in RVIZ. I'm fairly new to ROS and have been working through the tutorials. I have installed ROS using the tutorials on the site on a clean Ubuntu installation, single user machine, running 12.04. The ROS installation is Fuerte.

I have followed the instructions on the ros.org tutorial

as well as here some instructions I found on youBot.

And have done some digging but, I gotta admit, I am totally lost. I am able to run the libMesaSRTester if I run 'sudo /usr/bin/libMesaSRTester' but it does not run properly if it is not run with sudo. I changed the udev rules as recommended. Here's the current version of my 46-mesa.rules file:

BUS!="usb", SUBSYSTEM!=="usb_device", ACTION!="add", GOTO="kcontrol_rules_end"

#Swissranger SR3k(old),SR3k,SR4k
SYSFS{idVendor}=="0852", SYSFS{idProduct}=="0074", MODE="666", GROUP="usb"
SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0074", MODE="666", GROUP="usb"
SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0075", MODE="666", GROUP="usb"
SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="0852", SYSFS{idProduct}=="0074", MODE="660", GROUP="plugdev"
SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0074", MODE="660", GROUP="plugdev"
SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0075", MODE="660", GROUP="plugdev"

LABEL="kcontrol_rules_end"

I have also added myself to the usb group as recommended at the youBot page.

On running rosrun swissranger_camera swissranger_camera I get the following error:

usb_set_debug: Setting debugging level to 255 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
error obtaining child information: Operation not permitted
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 003
error obtaining child information: Operation not permitted
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 008 on 002
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 007 on 002
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 006 on 002
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 002
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 004 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 10 class/vendor specific interface descriptors
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 001
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error ...
(more)
edit retag flag offensive close merge delete

Comments

Did you finally solve the problem? I ran into similar problems as you had. Udev rules(46-mesa.rules) were set as recommended. Added my self to usb group. Got the error "Exception thrown while connecting to the camera: [SR::open]: Failed to open device!". Did "sudo chmod -R a+rwx /dev/bus/usb" as suggested by rasmusan, then everything seemed to be ok as long as SR-3000 was on and the USB cable was connected. However, if SR-3000 was powered off then powered on or the USB cable was disconnected then reconnected, then the error appeared, and "sudo chmod -R a+rwx /dev/bus/usb" was needed to get things going. I am wondering if there is any permanent solution to fix the permission issue. Thanks, CC

chyphen gravatar image chyphen  ( 2013-08-02 08:24:00 -0500 )edit

My permanent solution is pretty gross to be honest. I gave the user who is running the pipeline god rights. Given the extremely limited environment our system is running in it works ok, but it may not be a viable solution for anyone else.

Nahkki gravatar image Nahkki  ( 2013-08-02 12:58:24 -0500 )edit

Can you be more specific on "god' rights? I added myself to usb group, it didn't work without doing "sudo chmod -R a+rwx /dev/bus/usb" whenever SR-3000 was powered on or a USB cable was reconnected", Then I added myself to root group, and it didn't work, either. Thanks,

chyphen gravatar image chyphen  ( 2013-08-05 04:51:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-29 00:20:58 -0500

rasmusan gravatar image

I got this error too. The problem for me was, that the usb devices could only be accessed by root. The fix was:

sudo chmod -R a+rwx /dev/bus/usb

I'm running Kubuntu 12.04. Hope this can help.

edit flag offensive delete link more

Comments

This worked for me as well, I had the same problem. Thank you!

funas1 gravatar image funas1  ( 2013-05-15 23:27:46 -0500 )edit

@ the users of swissranger_camera, I have some questions. Are you guys running the "swissranger_camera" ROS package and using "PCL" from ROS as well? I noticed that the pointcloud message publish by "swissranger_camera" no longer supports by PCL. How did you guys solve the problem?

Gazer gravatar image Gazer  ( 2013-07-03 07:36:00 -0500 )edit

I got the same error, and the error was "temporarily" fixed by adding sudo chmod -R a+rwx /dev/bus/usb as suggested. However, I need to do it every time SR-3000 is turned back on or the USB cable is re-plugged in. Is there a permanent fix? I am running Ubuntu 12.04 + ROS fuerte on a 32-bit PC. Thanks, CC

chyphen gravatar image chyphen  ( 2013-08-01 04:32:07 -0500 )edit

Question Tools

Stats

Asked: 2012-12-22 12:59:57 -0500

Seen: 722 times

Last updated: Apr 29 '13