Closed sbrodeur closed 7 years ago
The joystick seems to disconnect when starting the roslaunch file:
[11807.520437] usb 1-1.4: USB disconnect, device number 34
[11807.521133] xpad 1-1.4:1.2: xpad_irq_in - usb_submit_urb failed with result -19
[11807.530237] xpad 1-1.4:1.4: xpad_irq_in - usb_submit_urb failed with result -19
[11807.539069] xpad 1-1.4:1.6: xpad_irq_in - usb_submit_urb failed with result -19
[11991.694815] l3gd20_gyr 2-006b: power off
[11994.652811] usb 1-1.4: new full-speed USB device number 35 using musb-hdrc
[11994.777445] usb 1-1.4: New USB device found, idVendor=045e, idProduct=0719
[11994.777464] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11994.777473] usb 1-1.4: Product: Xbox 360 Wireless Receiver for Windows
[11994.777481] usb 1-1.4: Manufacturer: ©Microsoft
[11994.777489] usb 1-1.4: SerialNumber: FF958890
[11994.782188] input: Xbox 360 Wireless Receiver as /devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb1/1-1/1-1.4/1-1.4:1.0/input/input77
[11994.788060] input: Xbox 360 Wireless Receiver as /devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb1/1-1/1-1.4/1-1.4:1.2/input/input78
[11994.790116] input: Xbox 360 Wireless Receiver as /devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb1/1-1/1-1.4/1-1.4:1.4/input/input79
[11994.796232] input: Xbox 360 Wireless Receiver as /devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb1/1-1/1-1.4/1-1.4:1.6/input/input80
Maybe we need a more updated xpad driver?
It appears the Xbox 360 Wireless Receiver is very sensible to high loads (USB bus or CPU), and automatically disconnects in such case. I have also tried the xboxdrv userspace driver (and blacklisted xpad), which seems a little more stable for a while but failed eventually during recording. At the end, the generic wired USB joystick was the most stable.
See commit 10e4455 for a more efficient joystick implementation (stateless) that doesn't require subscribing to the robot topics for manual control. Also with the optimization in message publishing to be done in #31, the load on the CPU will be greatly reduced and this should avoid having errors as below due to bad interrupt handling.
The rate set at the behavior controller seems to be 7 Hz. This is a little low and could be increased.