While perhaps less important for our autonomous application, one of the most critical features of the driver station is the ability to interface with USB gamepads and pass the data to the robot.
These will be published in an array of sensor_msgs/Joy msgs, wrapped in a msg that also contains a few bonus fields such as each stick's name and HIDType.
This should be done in a fashion as similar to the real driver station as possible. We want up to 6 USB joysticks, re-orderable in the UI, with a gamepad-viewer debug tool for the currently selected stick. We should take care to ensure that our button, axis, and POV enumeration is identical to that of the NI Driver Station, so that we don't get weirdness when going back and forth.
One hiccup to this parity is the fact that the sensor_msgs/Joy messages do not contain POV hats, only axes and buttons. My suggestion is to append the POV hat state in both the axis and button arrays, since it's kinda neither but also kinda both. Alternatively/additionally, we could pass either info about the POV (ie. "The POV is mapped to axes 4 and 5, as well as buttons 6, 7, 8, and 9") and/or the POV itself alongside the joystick messages.
🚀 Feature Request
Part of #13.
While perhaps less important for our autonomous application, one of the most critical features of the driver station is the ability to interface with USB gamepads and pass the data to the robot.
These will be published in an array of
sensor_msgs/Joy
msgs, wrapped in a msg that also contains a few bonus fields such as each stick's name and HIDType.This should be done in a fashion as similar to the real driver station as possible. We want up to 6 USB joysticks, re-orderable in the UI, with a gamepad-viewer debug tool for the currently selected stick. We should take care to ensure that our button, axis, and POV enumeration is identical to that of the NI Driver Station, so that we don't get weirdness when going back and forth.
One hiccup to this parity is the fact that the
sensor_msgs/Joy
messages do not contain POV hats, only axes and buttons. My suggestion is to append the POV hat state in both the axis and button arrays, since it's kinda neither but also kinda both. Alternatively/additionally, we could pass either info about the POV (ie. "The POV is mapped to axes 4 and 5, as well as buttons 6, 7, 8, and 9") and/or the POV itself alongside the joystick messages.