Transform your phone into a robot arm teleoperation device in three simple steps:
- Install and launch the server on your computer.
- Open the provided URL on your phone.
- Tap
Start
, then press and hold theMove
button to control the robot arm.
Important
Your phone has to support the WebXR API. Unfortunately, the iPhone doesn't support the WebXR API.
The web application leverages the WebXR API, which combines your phone’s sensors to detect its orientation and position in 3D space. The server receives this data and sends it to the robot arm controller.
Teleoperation of a physical Lite6 robot | Teleoperation of a simulated UR5e robot in Webots |
The package is available on PyPI. You can install it using pip:
pip3 install teleop
We provide some ready-to-use robot arm interfaces, but you can also create your own by incorporating the teleop.Teleop
class into your project.
A simple interface that prints the teleop responses. You can use it as a reference to build your own interface.
python3 -m teleop.basic
The ROS 2 interface is designed primarily for use with the cartesian_controllers package, but it can also be adapted for MoveIt Servo or other packages.
python3 -m teleop.ros2
Published topics:
target_frame
(geometry_msgs/PoseStamped): The target pose of the robot arm’s end effector in the robot base frame.tf
(tf2_msgs/TFMessage): The transform between the robot base frame and the target frame for visualization.
Subscribed topics:
current_pose
(geometry_msgs/PoseStamped): The current pose of the robot arm’s end effector in the robot base frame. Used to update the reference pose.
You can override the default topic names using standard ROS 2 arguments:
python3 -m teleop.ros2 --ros-args -r target_frame:=/some_other_topic_name
For most applications, you will need to create a custom interface to interact with your robot arm. Here’s an example:
import numpy as np
from teleop import Teleop
def callback(pose: np.ndarray, message: dict) -> None:
"""
Callback function triggered when pose updates are received.
Arguments:
- np.ndarray: A 4x4 transformation matrix representing the end-effector target pose.
- dict: A dictionary containing additional information.
"""
print(f'Pose: {pose}')
print(f'Message: {message}')
teleop = Teleop()
teleop.subscribe(callback)
teleop.run()
Explore the examples to learn how to use the package in various scenarios:
- examples/webots: Teleoperation of a UR5e robot arm using ikpy in the Webots simulator.
If you’d like to contribute, install the package in editable mode:
# Install the package in editable mode
git clone https://github.com/SpesRobotics/teleop.git
cd teleop
pip3 install -e .
# Run the tests
python3 -m pytest