Hi, I am writing a port [1] to control the Lego NXT brick with ROS, but when I run a test program it fails (permissions for the USB device are 666). This is on:
% uname -a FreeBSD acer 9.0-CURRENT FreeBSD 9.0-CURRENT #5 r216351M: Fri Dec 10 14:13:33 CET 2010 r...@acer:/usr/obj/usr/src/sys/ACER amd64 % rosrun nxt_python color_sensor_test.py Traceback (most recent call last): File "/usr/local/ros/stacks/nxt/nxt_python/sensor_tests/color_sensor_test.py", line 42, in <module> test_sensors(sock.connect()) File "/usr/local/ros/stacks/nxt/nxt_python/src/nxt/usbsock.py", line 44, in connect self.handle.reset() usb.USBError: Unknown error Looking into usbsock.py: self.handle = self.device.open() self.handle.setConfiguration(1) self.handle.claimInterface(0) self.handle.reset() where self.device points to the USB end point for the NXT device (vendor 0x694, product 0x2) However, if I run the same program as root it fails a bit later: # rosrun nxt_python color_sensor_test.py -1 Traceback (most recent call last): File "/usr/local/ros/stacks/nxt/nxt_python/sensor_tests/color_sensor_test.py", line 42, in <module> test_sensors(sock.connect()) File "/usr/local/ros/stacks/nxt/nxt_python/sensor_tests/color_sensor_test.py", line 11, in test_sensors cs = ColorSensor(b, PORT_1) File "/usr/local/ros/stacks/nxt/nxt_python/src/nxt/sensor.py", line 256, in __init__ self.set_light_color(None) File "/usr/local/ros/stacks/nxt/nxt_python/src/nxt/sensor.py", line 278, in set_light_color self.set_input_mode() File "/usr/local/ros/stacks/nxt/nxt_python/src/nxt/sensor.py", line 71, in set_input_mode self.mode) File "/usr/local/ros/stacks/nxt/nxt_python/src/nxt/brick.py", line 22, in poll self.sock.send(str(ogram)) File "/usr/local/ros/stacks/nxt/nxt_python/src/nxt/usbsock.py", line 65, in send self.handle.bulkWrite(self.blk_out.address, data) usb.USBError: Unknown error where self.handle is initialized in the same way as above. It works in Ubuntu 10.10, both native and when running from VirtualBox 4 (which has USB passthrough) under the above FreeBSD. Does anybody have an idea what could be wrong? Thanks, Rene [1] ftp://rene-ladan.nl/pub/freebsd/ros-nxt-0.1.0.tar.bz2 SIZE = 3842 SHA256 = a7a30bc5ef77230d6846577d3a4b1c7262d1c654ed32fcf0d8701c07c0867bea -- http://www.rene-ladan.nl/ GPG fingerprint = ADBC ECCD EB5F A6B4 549F 600D 8C9E 647A E564 2BFC (subkeys.pgp.net) _______________________________________________ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"