linuxjoystickThe linuxjoystick driver reads data from a standard Linux joystick and provides the data via the joystick interface. This driver can also control a position2d device by converting joystick positions to velocity commands.
- Compile-time dependencies
- joystick : joystick data
- position2d : joystick data represented as 2-D position data. Raw X- and Y-axis values are reported as xpos and ypos in the position packet (all other fields are zero).
- position2d : if present, joystick positions will be interpreted as velocities and sent as commands to this position2d device. See also max_xspeed, max_yawspeed, and deadman_button options below.
- Configuration requests
- Configuration file options
- port (string)
- Default: "/dev/js0"
- The joystick to be used.
- axes (integer tuple)
- Default: [0 1]
- Which joystick axes to call the "X" and "Y" axes, respectively.
- axis_maxima (integer tuple)
- Default: [32767 32767]
- Maximum absolute values attainable on the X and Y axes, respectively.
- axis_minima (integer tuple)
- Default: [0 0]
- Minimum values on the X and Y axes, respectively. Anything smaller in absolute value than this limit will be reported as zero. Useful for implementing a dead zone on a touchy joystick.
- deadman_button (integer)
- Default: -1
- When controlling a position2d device, if deadman_button is >= 0, this joystick button must be depressed for commands to be sent to that device.
- max_xspeed (length / sec)
- Default: 0.5 m/sec
- The maximum absolute translational velocity to be used when commanding a position device.
- max_yawspeed (angle / sec)
- Default: 30 deg/sec
- The maximum absolute rotational velocity to be used when commanding a position device.
- timeout (float)
- Default: 5.0
- Time (in seconds) since receiving a new joystick event after which the underlying position device will be stopped, for safety. Set to 0.0 for no timeout.
driver ( name "linuxjoystick" provides ["joystick:0"] port "/dev/js0" )
Provide a position interface, instead of a joystick interface.
driver ( name "linuxjoystick" provides ["position:0"] port "/dev/js0" )
Controlling a Pioneer, plus remapping joystick axes and setting various limits.
driver ( name "p2os" provides ["odometry::position:0"] port "/dev/usb/tts/0" ) driver ( name "linuxjoystick" provides ["joystick:0"] requires ["odometry::position:0"] max_yawspeed 50 max_xspeed 0.5 axes [3 4] axis_minima [5000 5000] port "/dev/js0" alwayson 1 )
- Add support for continuously sending commands, which might be needed for position devices that use watchdog timers.
- Andrew Howard, Brian Gerkey, Paul Osmialowski