Stretch 4 ships with a gamepad controller for teleoperation.
You can start the gamepad teleop script by running stretch_gamepad_teleop in the command line, or from the Stretch Tray icon in the system tray.
Note:
stretch_gamepad_teleopuses a RobotClient. Make sure the Stretch Body Server is running usingstretch_body_server --status.
When you boot Stretch 4, the robot needs to be homed (auto-calibrated). You may notice that the controller vibrates and does not allow you to move the robot. If this happens, make sure the robot's surroundings are clear, and press the Start button on the controller to Home (calibrate) the joints.
You can keep the stretch_gamepad_teleop application script running in the background while you run other RobotClient applications. The stretch_gamepad_teleop script will timeout and stop sending commands to the server after a few milliseconds of not receiving inputs.
Note that
stretch_gamepad_teleophas a higher priority on the RobotClient command queue, so commands from it will override other scripts by default.
By default, stretch_gamepad_teleop has two control mapping modes that you can switch between using Y.
The first is Joint Control, which allows you to control each joint individually.
The second is Flying Gripper Control, which allows you to use the Right Stick to move the wrist, and move towards where the gripper is pointing using the Left Stick. This mode is useful for manipulation and grasping objects.
{% tabs %} {% tab title="Joint Control Mode" %}
{% endtab %}{% tab title="Flying Gripper Mode" %}
{% endtab %} {% endtabs %}Tap or hold the Right Trigger + A to change or cycle the speed of Stretch 4. By default it is Medium speed. This cycles between Low, Medium and High speed presets.
Be careful when navigating with Medium or High speed. It is a good idea to keep the arm retracted or Stow the robot (Hold
Select) while the robot is moving in the environment.
Tap or hold the Right Trigger + B to change or cycle the strength of Stretch 4. By default it is Medium strength. This cycles between Low, Medium and High strength presets. Use Low strength when manipulating the robot near people, and High strength when trying to manipulate objects that require more force, like opening a door.
Strength affects the contact sensitivity thresholds. Low strength will stop joint motion when encountering a small motor effort.
- Homing: If the robot is not homed, press the
Startbutton to home the robot. - Gripper Handedness: If the robot is homed, hold the
Startbutton for 3 seconds to switch gripper handedness (Left/Right). - Stowing: Hold the
Selectbutton for 3 seconds to stow the robot.
You can customize the behavior by:
- Modifying
gamepad_control_mappings.pyto add or edit mappings. - Setting
params['function_cmd']in user parameters to execute a shell command via theXbutton.

.png)