Package to teleoperate the AKROS2 robot.
- Uses the joy node with the teleop_twist_joy package to publish the status of the controller's buttons/joysticks, and Twist messages based on user-defined configuration in the config directory. The configuration currently supports PS4, Stadia, 8BitDo SN30 Pro and Steam Deck controllers. Similarly, mappings and mode/twist config files for other controllers can also be made. Then, the
joy_config
launch argument needs to be updated accordingly. - Implements the
joy_mode_handler
node, which subscribes to the joystick status, and publishes Mode messages to indicatestop
,auto
, orteleop
. Uses parametersestop_button
andauto_button
, which represent the mapping for the E-Stop and Auto/Teleop buttons for the joystick that is used. Joystick mappings and reference parameter values can be found in theconfig
directory (_mode_config.yaml
) - Implements the
twist_mixer
node that subscribes to the Mode messages fromds4_feedback
, the Twist messages fromds4_twist
and Twist messages from an external autonomous node. Based on the mode, it then publishes either the Twist message from the PS4 controller, or the autonomous node, or zero values if the emergency stop is pressed. The parametertimer_period
can be updated in the launch file (Default: 0.01 seconds). - Both the
joy_mode_handler
andtwist_mixer
nodes are composed into a singledrive_node
(multi-threaded) executable that is then launched from the launch file. Both nodes can also be run individually.
This is the main launch file that launches either the twist_mixer
and joy_mode_handler
separately or the drive_node
executable that runs both nodes using a multi-threaded executor. This launch file uses the following launch arguments:
joy
: Enable/Disable Joy related packages in the Joy launch file: joy_launch.py (Default:True
)joy_config
: Configures joystick mapping:ps4
(PS4),stadia
(Stadia),sn30pro
(8BitDo SN30 Pro,steamdeck
(Steam Deck: mapping is identical to PS3/Sixaxis controllers) (Default:steamdeck
)executor
: If True, runsdrive_node
, else runstwist_mixer
andjoy_mode_handler
separately.
This launch files launches joy
and teleop_twist_joy
nodes and uses the joy_config
launch argument to configure the controller. This node can be launched individually or via drive_launch.py
by setting the joy
launch argument.