Skip to main content

teleopro_core

Teleoperate any robot with any input device, in pure Python (numpy only, no ROS). It turns the motion of a device (XR headset, tracker, mocap, ...) into a target pose for the robot, with clutch, speed limits and input-loss handling.

ROS users: use the teleopro_ros package, which wraps this library with TF.

Install

pip install "git+https://github.com/ShifeiDuan/teleopro#subdirectory=teleopro_core"

Usage

import time
from teleopro_core import Teleop, as_pos_quat

teleop = Teleop(translation_scale=0.5, max_lin_vel=0.1)

teleop.engage()                       # e.g. when a button is pressed
while True:
    device_pose = my_device.get_pose()       # ((x, y, z), (qx, qy, qz, qw)) or 4x4, None if not tracked
    robot_pose = my_robot.get_tcp_pose()     # same formats, in the robot base frame
    target = teleop.update(time.monotonic(), device_pose, robot_pose)
    if target is not None:
        my_robot.move_to(*as_pos_quat(target))
    time.sleep(0.01)
  • On engage() the target starts at the current robot pose, then follows the device's motion since that moment. disengage() holds it still (clutch).
  • If the device is not tracked (None) or its input_stamp is older than input_timeout, the target holds; when tracking returns it continues from where it stopped, without jumping.
  • Before the first engage, update() returns the robot pose latched once.

Velocity devices (keyboard, SpaceMouse) use update_twist() instead:

teleop = Teleop(twist_frame='tool')      # or 'base'
target = teleop.update_twist(time.monotonic(), ((vx, vy, vz), (wx, wy, wz)), robot_pose)

Parameters

Parameter Default Meaning
align_rpy (0, 0, 0) Rotation from device axes to robot axes
translation_scale, rotation_scale 1.0 Motion scaling
max_lin_vel, max_ang_vel 0.5, 1.0 Target speed limits (m/s, rad/s), 0 = off
dof_mask (1, 1, 1, 1, 1, 1) [x, y, z, roll, pitch, yaw]; 0 freezes a DoF
workspace_min, workspace_max None [x, y, z] box the target stays in
input_timeout 0.2 Seconds before a stale input_stamp counts as lost
twist_frame 'base' 'base' or 'tool', frame of the twist in update_twist()
logger logging Anything with .debug() / .info() / .warning()

License

Apache-2.0

Metadata

Release files for teleopro-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for teleopro-core 0.1.0
File Size Uploaded Provenance Actions
teleopro_core-0.1.0.tar.gz 14.8 kB Without provenance Details for teleopro_core-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for teleopro-core 0.1.0
File Interpreter ABI Platform Actions
teleopro_core-0.1.0-py3-none-any.whl Python 3 none any Details for teleopro_core-0.1.0-py3-none-any.whl

Total release size: 28.1 kB

Release files / teleopro_core-0.1.0.tar.gz

Download URL teleopro_core-0.1.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ef4ca2599b157d08d5cf6427e6498665e675688e44af6946d87a2685099bb4b4
BLAKE2b-256 checksum
How to use checksums
2853d95af2a594bdde508b544574ad4f25d682b54ede0aa8339dc195678c29c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / teleopro_core-0.1.0-py3-none-any.whl

Download URL teleopro_core-0.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3f7512115c3b403c103f6d23dab245581f91c0266901f54e260037c42721500
BLAKE2b-256 checksum
How to use checksums
f9229244760e4ef0a13b890219875c407e07837567ddd9dd275469f89a73bb05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for teleopro-core 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page