🎮 Gamepad¶
Your robot might come with a wireless gamepad. It allows you to perform simple teleoperation such as moving the mobile base, moving the head and the torso.
Note
A gamepad is included with the TIAGo base, TIAGo and TIAGo Pro robot packages. For other robots, you can use your own controller. Any wireless game controller compatible with the ROS package joy package using the game_controller driver should work.
Warning
Be careful when implementing your own gamepad controller, there is this bug that could result in the robot moving unexpectedly as some axes will be initialized to 1.0 until you move them: https://github.com/ros-drivers/joystick_drivers/issues/292
Gamepad modes¶
The gamepad has three different modes, which can be selected by pressing and holding the different trigger buttons on the back of the gamepad:
Mode |
Trigger Button |
|---|---|
🧭 Mobile Base Teleoperation Mode: |
RB |
🤖 Head + Torso Mode: |
LB |
🦾 Left Arm Mode: |
LT |
🦾 Right Arm Mode: |
RT |
Note
All the movements in the gamepad modes are relative to the robot’s point of view
The gamepad modes are mutually exclusive, meaning that you should only be activating one mode at a time
Some actions are incremental meaning that the robot will perform the action each time the button is pressed
🧭 Mobile Base Teleoperation Mode¶
Important
Before starting teleoperating the base, make sure that your robot is unplugged and press RB + START in order to give command priority to the gamepad.
Note
The LEDs on the base of the robot will change color depending on the teleoperation mode you are in:
Command |
Gamepad keys |
|---|---|
Take/Release control of the robot (via /joy_priority_action) |
RB + START |
Activate/deactivate assisted teleoperation (more information in 🕹️ Assisted Teleop) |
RB + BACK |
Planar Move: Linear velocity (lateral velocity only available for robot with omnidirectional bases) |
RB + (Left Joystick or Crosspad) (Check Linear MODE switch) |
Linear MODE switch |
Press MODE button (LED On the crosspad is selected/ LED Off the joystick is selected) |
Rotate: Angular velocity |
RB + Right Joystick |
Modify linear velocity (increase, decrease) (incremental) |
RB + (⬆️ Y, ⬇️ A) |
Modify angular velocity (increase, decrease) (incremental) |
RB + (⬆️ X, ⬇️ B) |
Reset velocity default settings |
RB + (Press Right Joystick or Left Joystick) |
Note
Keep in mind that you need to release the control of the robot before using autonomous navigation by pressing RB + START again.
🤖 Head and Torso Mode¶
Note
Before moving the head press LB + START in order to take control of the head if the gaze manager is active, more information in [‼️ROS 1] Controlling the attention and gaze of the robot
Command |
Gamepad keys |
|---|---|
Take control of the head (disables neck with /gaze_manager/disable_neck) |
RB + START |
Move Head (up, right, down, left) (incremental) |
RB + (Cross pad or Left Joystick) |
Release control of the head (enables neck with /gaze_manager/enable_neck) |
RB + BACK |
Move Torso (up, down) (incremental) |
RB + (⬆️ Y, ⬇️ A) or Right Joystick |
Note
After moving the head, you can release the control of the head by pressing RB + BACK. This will allow the gaze manager to take control of the head again.
🦾 Left/Right Arm Mode¶
Note
For TIAGo with a single arm, the right arm mode is the only one available.
Instructions |
Gamepad keys |
|---|---|
Switch Gravity compensation controller for the desired arm |
(LB or LT) + Y |
Switch to default controller for the desired arm |
(LB or LT) + X |
Open gripper for the desired arm (incremental) |
(LB or LT) + A |
Close gripper for the desired arm (incremental) |
(LB or LT) + B |
Troubleshooting¶
If the robot is not responding as expected to the gamepad, the following steps can be followed to troubleshoot the problem.
1. Gamepad battery: Press the vibration button on the gamepad. If the joystick does not vibrate, the batteries of the gamepad have to be changed (2X AA battery).
2. Gamepad button configuration: To ensure the correct configuration check if the input switch (on the top of the gamepad) is set to X and not to D. Otherwise, the gamepad will not be recognized by the robot.
3. Gamepad diagnostics: Open the diagnostics tab in the WebGUI and check under Diagnostics->Hardware->Gamepad. Ensure the diagnostics are OK.
Gamepad module: Use the following command to show the log of the gamepad module.
pal module log jostick cat
When the robot is in self-collision, e.g. the arms are touching the base, the head and torso cannot be controlled with the gamepad. The log of the gamepad will explain which joints are in self-collision. To get out of self-collision, change to gravity compensation to move the arms to a different position.
5. USB dongle: Check if the USB dongle is plugged in the robot. The dongle is not always plugged in an easily accessible place. By using the following command you can check if the dongle is connected to the robot:
ll /dev/joystick
# expected output:
# /dev/joystick -> input/js0
If an input device is found, this means the USB dongle is correctly plugged in the robot.
6. Gamepad connection: Check if robot is receiving commands by from the gamepad by listening
to the topic /joy while pressing buttons on the joystick:
ros2 topic echo /joy
If no output is shown, the gamepad might be out of reach of the robot or check again point 2.
See also¶
General information about your robot’s hardware
Documentation of the underlying
joyROS node: https://index.ros.org/p/joy/#humble