Skip to main content
Version: ROS 2 Jazzy

Controller

We support the following types of controllers on all platforms:

  • ps4: standard Playstation4 controller (bluetooth).
  • ps5: standard Playstation5 controller (bluetooth).
  • logitech: Logitech F710 (USB dongle).
  • xbox: Xbox controller (bluetooth).

Switching between each is done by setting the controller parameter under the platform tag.

controller: ps4 # one of ps4, ps5, logitech, xbox

Default Button Mappings

By default, Clearpath platforms use the left and right triggers (typically buttons L1, R1) as the normal deadman and turbo deadman buttons respectively. The vertical axis of the left joystick will control linear speed in the X direction, and the horizontal axis controls angular speed. For omnidirectional robots, the horizontal axis of the right joystick will control linear speed in the Y direction.

Changing Button Mappings

If you wish to change the default button mappings, this can be modified by using the extras.ros_parameters field in robot.yaml. First, find the default configuration file for your controller. The comments at the top of the file will describe the axis mappings relative to the controller buttons. This varies between controllers.

Next, modify the teleop_twist_joy_node parameters with your updated button mappings. Here are some examples:

extras:
ros_parameters:
teleop_twist_joy_node:
axis_linear.x: 4
axis_angular.yaw: 3
enable_button: 5
enable_turbo_button: 4

Teleop Speeds

By default, holding the left trigger button of the controller enables driving at "normal" speeds while holding the right trigger button enables driving at "turbo" speeds.

The table below shows the default linear and angular speeds for each platform:

PlatformLinear speed (normal, m/s)Linear speed (turbo, m/s)Angular speed (normal, rad/s)Angular speed (turbo, rad/s)
Husky A3000.41.50.51.0
Husky A2000.41.00.61.2
Jackal0.42.00.61.4
Warthog0.51.02.42.4
Dingo-D0.41.00.61.0
Dingo-O0.41.00.51.4
Ridgeback0.40.40.50.5

Changing Teleop Speeds

The normal and turbo teleop speeds can be adjusted by modifying the controller node's ROS parameters by using the extras.ros_parameters field in robot.yaml.

extras:
ros_parameters:
teleop_twist_joy_node:
scale_linear.x: 0.6
scale_angular.z: 0.75
scale_linear_turbo.x: 2.0
scale_angular_turbo.z: 1.0

Normal speed parameters

  • scale_linear.x sets the maximum forward/reverse velocity
  • scale_linear.y sets the maximum left/right velocity (Omnidirectional control only)
  • scale_angular.z sets the maximum angular velocity

Turbo speed parameters

  • scale_linear_turbo.x sets the maximum forward/reverse velocity
  • scale_linear_turbo.y sets the maximum left/right velocity (Omnidirectional control only)
  • scale_angular_turbo.z sets the maximum angular velocity
warning

Do not set the normal or turbo velocity limits higher than the robot's maximum velocity. Doing so may make the robot difficult to control. The robot will not exceed its maximum speed, but the scaling on the joystick may result in awkward clipping, causing teleoperation to be jerky.

Changing the joy device

By default the joy_node will open one of the following devices, created by a udev rule included in the clearpath_robot package:

Controller typeLinux joy device
ps4/dev/input/ps4
ps5/dev/input/ps5
xbox/dev/input/xbox
logitech/dev/input/f710

To manually specify a different device file or symlink, use the extras.ros_parameters field in robot.yaml, for example:

extras:
ros_parameters:
joy_node:
dev: /dev/input/js0