|
upkie
11.0.0
Open-source wheeled biped robots
|
Joystick class used by mock spines to mimick the C++ Joystick sensor. More...
Public Member Functions | |
| def | __init__ (self, str device_path, str prefix="joystick") |
| Initialize joystick input reader. More... | |
| def | write (self, dict observation) |
| Write joystick readings to an observation dictionary. More... | |
Public Attributes | |
| axis_map | |
| List of axis names in order. | |
| axis_states | |
| Dictionary mapping axis names to their current values. | |
| button_map | |
| List of button names in order. | |
| button_states | |
| Dictionary mapping button names to their current states. | |
| jsdev | |
| File descriptor for the joystick device. | |
| prefix | |
| Prefix string for observation keys. | |
Static Public Attributes | |
| dictionary | AXIS_NAMES |
| Mapping from axis codes to axis names (borrowed from linux/input.h). More... | |
| dictionary | BUTTON_NAMES |
| Mapping from button codes to button names. | |