Joystick Plugin
Hardware driver plugin to enable access to a Joystick connected locally to the robot, e.g. wireless joystick, or the control machine. The plugin converts axes to the Fawkes coordinate system and supports force feedback. It currently works only on Linux using the Kernel joystick and input event device APIs.
The ffjoystick? tool can be used to show updates to the joystick interface to verify the joystick is working, and it can provide a joystick connected locally to a remote Fawkes instance, e.g. if the joystick is connected to a separate control machine and the robot is running Fawkes. The ffkbjoystick? tool can provide a fake joystick taking input from a keyboard.
The joystick must be connected on initial loading, or an exception is thrown. Once loaded, the joystick can be disconnected and reconnected. The plugin will notice this, update the blackboard interface accordingly (number of axes is 0 if no joystick is connected), and reopen the device when reconnected.
Joystick axes are labeled with respect to the Fawkes coordinate system. On standard joysticks, pushing the joystick "up" is positive, as is pushing "left". Use ffjoystick to see the actual output for your joystick, it can vary between models. Most six axis joystick seem to use the following axis mapping, already converted to Fawkes (tested with Logitech Cordless, Microsoft SideWinder Precision 2, and a cheap Trust joystick):
| Axis (in Interface) | Direction (positive, +1) | Direction (negative, -1) |
| 0 | left | right |
| 1 | up | down |
| 2 | twist left | twist right |
| 3 | max speed | min speed |
| 4 | hat left | hat right |
| 5 | hat up | hat down |
For a Logitech WingMan RumblePad with force feedback the mapping is:
| Axis (in Interface) | Direction (positive, +1) | Direction (negative, -1) |
| 0 | left stick/left | left stick/right |
| 1 | left stick/up | left stick/down |
| 2 | slider right | slider left |
| 3 | right stick/left | right stick/right |
| 4 | right stick/up | right stick/down |
| 5 | cross/left | cross/right |
| 6 | cross/up | cross/down |
Note that force feedback on this joystick is available only with Linux kernel 2.6.36 and later (and thus unfortunately not out-of-the box in Fedora 14, inclusion requested in bug #676577).
Requires
Config Values
| Path | Type | Description | Default | R |
| /hardware/joystick/device_file | string | Device file of the joystick | /dev/input/js0 | * |
Provides
BlackBoard Interfaces
- JoystickInterface::Joystick
Compilation and Runtime Requirements
- Linux-based operating system with kernel (presumably) 2.6.19 or later, tested with 2.6.35 and later
Usage Instructions
We assume you have one USB joystick connected to the machine running Fawkes. After loading the plugin, the joystick is immediately available. Run
ffjoystick -l
on the same host and move the joystick. You should see lines printing the different axes values.

