Getting failed to open device error for swissranger even after udev rules change
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 ...
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
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.
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,