joy_mapper package¶
Contents
The joy_mapper package contains the JoyMapperNode. This node maps the standard ROS Joy messages sent by a (virtual) joystick to actionable items (e.g. start/pause a demo) or robot movement commands.
JoyMapperNode¶
-
class
JoyMapperNode
(node_name)¶ Interprets the Joystick commands.
The JoyMapperNode receives
Joy
messages from a phisical joystick or a virtual one, interprets the buttons presses and acts accordingly.Joystick bindings:
Physical joystick
Virtual joystick
Action
Directional controls
Arrow keys
Move the Duckiebot (if not in lane-following)
Start button
A key
Start lane-following
Back button
S key
Stop lane-following
Y button
E key
Toggle Emergency Stop
- Parameters
node_name (
str
) – a unique, descriptive name for the node that ROS will use
- Configuration:
~speed_gain (
float
): Gain for the directional joystick keys (forward/reverse) ~steer_gain (int
): Gain for the directional joystick keys (steering angle) ~bicycle_kinematics (bool
): True for bicycle kinematics; False for holonomickinematics. Default is False
~simulated_vehicle_length (
float
): Used in bicycle kinematics model- Subscriber:
joy (
Joy
): The command read from joystick emergency_stop (BoolStamped
): The emergency stop status- Publishers:
- ~car_cmd (
duckietown_msgs/Twist2DStamped
): Wheels command for Duckiebot, based on the directional buttons pressed
- ~joystick_override (
duckietown_msgs/BoolStamped
): Boolean that is used to control whether lane-following or joystick control is on
- ~car_cmd (