Skip to content

Teleop2servo: Gamepad and Keyboard Teleoperation for MoveIt 2 Servo

ROS Discourse — Community updates1macale

This article introduces teleop2servo, an open-source ROS 2 package that facilitates teleoperation of robots using gamepads or keyboards to send TwistStamped or JointJog commands to MoveIt 2 Servo. Developed by Antoni Radomiński-Lasek at AGH University of Krakow under the Apache 2.0 license, the tool supports multiple control modes (JOINT, BASE, TOOL), speed settings, safety blocking mechanisms, gripper control, and a live CLI UI. It is designed for ROS 2 Humble and aims to assist teams in preparing teleoperation demonstrations.

Hello there!

I’d like to present (yet another) tool, created because of the lack of similar ones: a ROS 2 package that takes gamepad :video_game: or keyboard :keyboard: input and sends TwistStamped or JointJog messages to MoveIt 2 Servo to control the robot :mechanical_arm:/:robot:.

It all started with the MoveIt 2 tutorial “Realtime Arm Servoing” for Humble. There was a time when the “entire code” link in the tutorial pointed to this file, but today it’s broken. Unfortunately, the new tutorial uses a keyboard instead of a gamepad. Of course, this is a trade-off: it’s easier to get a keyboard working than a gamepad, but you can’t drive multiple axes at the same time (with standard input). Since we wanted a way to teleoperate our robot, we took inspiration from these two examples and created a unified way to run and control it with MoveIt 2 Servo.

This project is a byproduct of our R&D work at the Center of Excellence in Artificial Intelligence at AGH University of Krakow, distributed under the Apache 2.0 license:

teleop2servo
teleop2servo logo hid controlers


Preview: Teleoperation in action

t2s_usage_preview

Preview: CLI UI

t2s_gamepad_preview t2s_keyboard_preview

Features :sparkles:

  • :video_game::keyboard: Two input devices, one package: a terminal keyboard (no extra drivers needed) or a gamepad via the joy package. Switch between them with a single launch argument: teleop_device:=keyboard (default) or teleop_device:=gamepad.
  • :mechanical_arm: Direct MoveIt 2 Servo integration: publishes TwistStamped (Cartesian) and JointJog (joint) commands to the Servo node.
  • Three control modes: JOINT (single joints), BASE (Cartesian, base frame), and TOOL (Cartesian, end-effector frame).
  • Two speed modes: STEP (one fixed step per press) and CONT (continuous motion at 5, 10, 25, 50, 75, or 100% of the configured maximum).
  • Safety first: the device starts blocked and has to be unblocked explicitly. Blocking it stops the motion immediately.
  • :counterclockwise_arrows_button: Optional automatic Servo activation: on unblock, it switches the controllers and calls start_servo. On block or Ctrl+C, it calls stop_servo and restores the original controllers.
  • :house: Go home: moves the robot to a joint position defined in the YAML file, planned and executed by MoveIt. Blocking the device cancels the move.
  • :pinching_hand: Gripper control: opens and closes the gripper through a GripperCommand action.
  • Live CLI UI: shows the current state (blocked/ready), mode, speed, and the controls available in the current mode.
  • Configurable via YAML: velocity steps and limits, frame names, joint names, publishing rate, and more (config/teleop_keyboard.yaml and config/teleop_gamepad.yaml).
  • :electric_plug: Extensible design: ready to be extended with other input devices.
  • :scroll: Apache 2.0 license, targeting ROS 2 Humble.

Thanks & feedback :raising_hands:

The project consists mostly of the work of Antoni Radomiński-Lasek (GitHub, LinkedIn), done during his first steps with ROS 2 and the MoveIt 2 ecosystem (reiterated multiple times).

I’d like to say, once again, that I’m proud of Antoni and his results on this project. We hope that this small tool will help other teams prepare their teleoperation demos. Feedback, issues, and PRs are warmly welcome!

Repository AGH-CEAI/teleop2servo

GitHub - AGH-CEAI/teleop2servo: A ROS 2 package to control the MoveIt actions from...

A ROS 2 package to control the MoveIt actions from human input devices.


See also our other open source projects:

Robotiq Hand-E gripper ROS 2 Humble driver


Wled_ros_driver: control WLED LED strips from ROS 2

Source notes

  1. Teleop2servo: gamepad and keyboard teleoperation for MoveIt 2 Servo↩
Source evidence

Reported by the source; not independently verified.

Control
Teleoperated[2]
License
Apache 2.0[3]
Version
ROS 2 Humble[4]
  1. Teleop2servo: gamepad and keyboard teleoperation for MoveIt 2 Servo
    Exact source↩
  2. of our R&D work at the Center of Excellence in Artificial Intelligence at AGH University of Krakow, distributed under the Apache 2.0 license: teleop2servo Preview: Teleoperation in action Preview: CLI UI Features Two input devices, one package : a terminal keyboard (no extra drivers needed) or a gamepad via the joy package. Switch between them with a single launch argument: teleop_device:=keyboard (default) or teleo
    Exact source↩
  3. demos. Feedback, issues, and PRs are warmly welcome! Repository AGH-CEAI/teleop2servo GitHub - AGH-CEAI/teleop2servo: A ROS 2 package to control the MoveIt actions from... A ROS 2 package to control the MoveIt actions from human input devices. See also our other open source projects: Robotiq Hand-E gripper ROS 2 Humble driver Wled_ros_driver: control WLED LED strips from ROS 2
    Exact source↩
  4. Hello there! I’d like to present (yet another) tool, created because of the lack of similar ones: a ROS 2 package that takes gamepad or keyboard input and sends TwistStamped or JointJog messages to MoveIt 2 Servo to control the robot / . It all started with the MoveIt 2 tutorial “Realtime Arm Servoing” for Humble. There was a time when the “entire code” link in the tutorial pointed to this file, but today it’s broken
    Exact source
  5. . Unfortunately, the new tutorial uses a keyboard instead of a gamepad. Of course, this is a trade-off: it’s easier to get a keyboard working than a gamepad, but you can’t drive multiple axes at the same time (with standard input). Since we wanted a way to teleoperate our robot, we took inspiration from these two examples and created a unified way to run and control it with MoveIt 2 Servo. This project is a byproduct
    Exact source
  6. p_device:=gamepad . Direct MoveIt 2 Servo integration : publishes TwistStamped (Cartesian) and JointJog (joint) commands to the Servo node. Three control modes : JOINT (single joints), BASE (Cartesian, base frame), and TOOL (Cartesian, end-effector frame). Two speed modes : STEP (one fixed step per press) and CONT (continuous motion at 5, 10, 25, 50, 75, or 100% of the configured maximum). Safety first : the device s
    Exact source
  7. tarts blocked and has to be unblocked explicitly. Blocking it stops the motion immediately. Optional automatic Servo activation : on unblock, it switches the controllers and calls start_servo . On block or Ctrl+C , it calls stop_servo and restores the original controllers. Go home : moves the robot to a joint position defined in the YAML file, planned and executed by MoveIt. Blocking the device cancels the move. Grip
    Exact source
  8. per control : opens and closes the gripper through a GripperCommand action. Live CLI UI : shows the current state (blocked/ready), mode, speed, and the controls available in the current mode. Configurable via YAML : velocity steps and limits, frame names, joint names, publishing rate, and more ( config/teleop_keyboard.yaml and config/teleop_gamepad.yaml ). Extensible design : ready to be extended with other input dev
    Exact source
  9. ices. Apache 2.0 license , targeting ROS 2 Humble . Thanks & feedback The project consists mostly of the work of Antoni Radomiński-Lasek ( GitHub , LinkedIn ), done during his first steps with ROS 2 and the MoveIt 2 ecosystem (reiterated multiple times). I’d like to say, once again, that I’m proud of Antoni and his results on this project. We hope that this small tool will help other teams prepare their teleoperation
    Exact source

Automatically extracted; no manual editorial approval recorded.

Article details
Signal

This publication introduces an open-source ROS 2 package named teleop2servo, developed by Antoni Radomiński-Lasek at AGH University of Krakow and distributed under the Apache 2.0 license, which enables gamepad or keyboard-based teleoperation for MoveIt 2 Servo by publishing TwistStamped or JointJog messages.

Timezone · UTC

Article dates follow your selected timezone. Briefing editions use Hong Kong time (UTC+8).