Intro

Enable gamepad support in WSL

Setup

  • Check device permissions and user group
ls -l /dev/bus/usb/001/002
crw-rw-r-- 1 root root 189, 1 Jan 15 04:14 /dev/bus/usb/001/002
  • Check for joystick device
ls /dev/input
by-id  by-path  event0  js0
  • run jstest
jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Generic X-Box pad) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 11 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:-32767  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:-32767  3:   278  4:     0  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:-32767  3:   278  4:   161  5:     0  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:-32767  3:   278  4:   161  5:-32767  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:-32767  3:   278  4:   161  5:-32767  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:oAxes:  0:     0  1:    90  2:-32767  3:   278  4:   161  5:-32767  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off

Enable Joystick integration with ROS