Teleop2servo: Gamepad and Keyboard Teleoperation for MoveIt 2 Servo
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 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. 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:
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
joypackage. Switch between them with a single launch argument:teleop_device:=keyboard(default) orteleop_device:=gamepad.Direct MoveIt 2 Servo integration: publishes
TwistStamped(Cartesian) andJointJog(joint) commands to the Servo node.- Three control modes:
JOINT(single joints),BASE(Cartesian, base frame), andTOOL(Cartesian, end-effector frame). - Two speed modes:
STEP(one fixed step per press) andCONT(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.
Optional automatic Servo activation: on unblock, it switches the controllers and calls
start_servo. On block orCtrl+C, it callsstop_servoand 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.
Gripper control: opens and closes the gripper through a
GripperCommandaction.- 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.yamlandconfig/teleop_gamepad.yaml). Extensible design: ready to be extended with other input devices.
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 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