Closed reinzor closed 3 years ago
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
cb(msg)
File "/opt/ros/melodic/lib/python2.7/dist-packages/fadecandy_driver/fadecandy_node.py", line 41, in _set_leds
self._driver.set_colors(led_array_colors)
File "/opt/ros/melodic/lib/python2.7/dist-packages/fadecandy_driver/fadecandy_driver.py", line 144, in set_colors
self._device.write(1, packet)
File "/usr/lib/python2.7/dist-packages/usb/core.py", line 948, in write
self.__get_timeout(timeout)
File "/usr/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 824, in bulk_write
timeout)
File "/usr/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 920, in __write
_check(retval)
File "/usr/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
USBError: [Errno 19] No such device (it may have been disconnected)
Not sure why this is happening but I think we should at least be robust against something like this. For example trying to reconnect if this occurs. @jonbinney what do you think?
Tested unplugging and re-plugging the USB device. This was not handled properly and the driver would not recover. With #17 , the driver recovers from a reconnection.
@reinzor I'm not working on this anymore - @wongkaiweng what do you think?
Thanks @jonbinney. @reinzor We have seen this problem recently as well. Let's move our conversation to the PR.
Found the following error in our logs:
Not sure how to reproduce this yet.