{"id":15042593,"url":"https://github.com/spesrobotics/teleop","last_synced_at":"2025-04-28T11:22:17.011Z","repository":{"id":257792812,"uuid":"845753481","full_name":"SpesRobotics/teleop","owner":"SpesRobotics","description":"Turns your phone into a robot arm teleoperation device by leveraging the WebXR API","archived":false,"fork":false,"pushed_at":"2024-09-27T10:42:39.000Z","size":27116,"stargazers_count":55,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T09:09:19.804Z","etag":null,"topics":["imitation-learning","ros2","teleoperation","webxr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpesRobotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T21:34:18.000Z","updated_at":"2025-03-18T09:20:46.000Z","dependencies_parsed_at":"2024-11-13T12:36:51.718Z","dependency_job_id":"cfbc5086-868d-4222-83bd-67272f684fdb","html_url":"https://github.com/SpesRobotics/teleop","commit_stats":null,"previous_names":["spesrobotics/teleop"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpesRobotics%2Fteleop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpesRobotics%2Fteleop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpesRobotics%2Fteleop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpesRobotics%2Fteleop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpesRobotics","download_url":"https://codeload.github.com/SpesRobotics/teleop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296619,"owners_count":20754635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["imitation-learning","ros2","teleoperation","webxr"],"created_at":"2024-09-24T20:47:33.466Z","updated_at":"2025-03-30T09:09:27.257Z","avatar_url":"https://github.com/SpesRobotics.png","language":"Python","readme":"![Teleop](./media/teleop.png)\n\nTransform your phone into a robot arm teleoperation device in three simple steps:\n\n1. Install and launch the server on your computer.\n2. Open the provided URL on your phone.\n3. Tap `Start`, then press and hold the `Move` button to control the robot arm.\n\n\u003e [!IMPORTANT]  \n\u003e Your phone has to support the [WebXR API](https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API). Unfortunately, the iPhone doesn't support the WebXR API.\n\nThe 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.\n\n| ![Lite6 Physical Teleoperation](./media/lite6_physical_teleop.gif)  | ![UR5e Webots Teleoperation](./media/ur5e_webots.gif) |\n|:-------------------------------------------------------------------:|:----------------------------------------------------:|\n| Teleoperation of a physical Lite6 robot                             | Teleoperation of a simulated UR5e robot in Webots    |\n\n## Installation\n\nThe package is available on [PyPI](https://pypi.org/project/teleop/). You can install it using pip:\n\n```bash\npip3 install teleop\n```\n\n## Usage\n\nWe provide some ready-to-use robot arm interfaces, but you can also create your own by incorporating the [`teleop.Teleop`](./teleop/__init__.py) class into your project.\n\n### Basic Interface\n\nA simple interface that prints the teleop responses. You can use it as a reference to build your own interface.\n\n```bash\npython3 -m teleop.basic\n```\n\n### ROS 2 Interface\n\nThe ROS 2 interface is designed primarily for use with the [cartesian_controllers](https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers) package, but it can also be adapted for [MoveIt Servo](https://moveit.picknik.ai/main/doc/examples/realtime_servo/realtime_servo_tutorial.html) or other packages.\n\n```bash\npython3 -m teleop.ros2\n```\n\n**Published topics:**\n- `target_frame` ([geometry_msgs/PoseStamped](https://docs.ros2.org/latest/api/geometry_msgs/msg/PoseStamped.html)): The target pose of the robot arm’s end effector in the robot base frame.\n- `tf` ([tf2_msgs/TFMessage](https://docs.ros2.org/latest/api/tf2_msgs/msg/TFMessage.html)): The transform between the robot base frame and the target frame for visualization.\n\n**Subscribed topics:**\n- `current_pose` ([geometry_msgs/PoseStamped](https://docs.ros2.org/latest/api/geometry_msgs/msg/PoseStamped.html)): The current pose of the robot arm’s end effector in the robot base frame. Used to update the reference pose.\n\nYou can override the default topic names using standard ROS 2 arguments:\n\n```bash\npython3 -m teleop.ros2 --ros-args -r target_frame:=/some_other_topic_name\n```\n\n### Custom Interface\n\nFor most applications, you will need to create a custom interface to interact with your robot arm. Here’s an example:\n\n```python\nimport numpy as np\nfrom teleop import Teleop\n\n\ndef callback(pose: np.ndarray, message: dict) -\u003e None:\n    \"\"\"\n    Callback function triggered when pose updates are received.\n    Arguments:\n        - np.ndarray: A 4x4 transformation matrix representing the end-effector target pose.\n        - dict: A dictionary containing additional information.\n    \"\"\"\n    print(f'Pose: {pose}')\n    print(f'Message: {message}')\n\nteleop = Teleop()\nteleop.subscribe(callback)\nteleop.run()\n```\n\n## Examples\n\nExplore the examples to learn how to use the package in various scenarios:\n\n- [examples/webots](./examples/webots): Teleoperation of a UR5e robot arm using [ikpy](https://github.com/Phylliade/ikpy) in the [Webots](https://github.com/cyberbotics/webots/) simulator.\n\n## Development\n\nIf you’d like to contribute, install the package in editable mode:\n\n```bash\n# Install the package in editable mode\ngit clone https://github.com/SpesRobotics/teleop.git\ncd teleop\npip3 install -e .\n\n# Run the tests\npython3 -m pytest\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspesrobotics%2Fteleop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspesrobotics%2Fteleop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspesrobotics%2Fteleop/lists"}