Skip to main content

Easy teleoperate tools for robotic devices control with VR headset

Project description

Easy Teleoperate Tools

EasyTeleop 是一个基于VR设备控制机械臂的遥操作工具集。该工具集支持多种设备的集成,包括RealMan机械臂、VR头显和RealSense摄像头,并提供接口进行设备管理和遥操作控制。

本项目已发布到PYPI,可以使用 pip 安装:pip install easyteleop

功能特性

  • 多设备管理:支持机械臂、VR头显和摄像头设备的统一管理
  • 遥操作组:可配置不同的遥操作组,灵活组合设备
  • 实时状态监控:实时显示设备连接状态和运行情况
  • 数据采集:支持遥操作过程中的数据采集和存储
  • WebRTC视频流传输:支持低延迟视频流传输
  • 可视化:提供姿态可视化功能
  • qpSWIFT优化:集成qpSWIFT二次规划求解器,用于机器人逆运动学求解

系统架构

本系统采用模块化架构,包含以下几个主要组件:

组件 (Components)

  • DataCollect: 数据采集模块
  • TeleopMiddleware: 遥操作中间件
  • Visualizer: 可视化模块
  • WebRTC: WebRTC视频流支持
  • VRPacketAnalyzer: VR数据包分析器
  • Interpolation: 插值算法
  • HandVisualizer: 手部可视化模块

设备模块 (Device)

详细使用参考设备模块文档

  • BaseDevice: 设备基类
  • Camera: 摄像头设备(RealSenseCamera, TestCamera等)
  • Robot: 机械臂设备(RealMan, TestRobot等)
  • Hand: 手部设备(Revo2OnRealMan等)
  • VR: VR设备(VRSocket, TestVR等)

遥操作组 (TeleopGroup)

详细使用参考遥操组模块文档

  • BaseTeleopGroup: 遥操作组基类
  • SingleArmWithTriggerTeleopGroup: 单臂触发遥操作组
  • TwoArmWithTriggerTeleopGroup: 双臂触发遥操作组

安装指南

环境要求

  • Python 3.10+
  • Windows/Linux/macOS
  • uv 包管理器

克隆仓库(包含子模块)

由于项目使用了 Git 子模块(qp-tools),需要特殊处理来完整克隆仓库:

# 方法1:克隆时初始化子模块
git clone --recurse-submodules https://github.com/Chain-Pray/EasyTeleop.git

# 方法2:克隆后手动初始化和更新子模块
git clone https://github.com/Chain-Pray/EasyTeleop.git
cd EasyTeleop
git submodule init
git submodule update

安装依赖

使用uv管理项目依赖:(不能uv sync因为编辑式安装不能编译C拓展)

# 安装uv(如果尚未安装)
pip install uv

# 安装项目依赖
uv pip install -e .

主要依赖

  • aiortc: WebRTC支持
  • opencv-python: 图像处理
  • pyrealsense2: RealSense摄像头支持
  • robotic-arm: 机械臂控制库
  • numpy, scipy: 科学计算
  • matplotlib: 数据可视化
  • qpSWIFT: 二次规划求解器(已集成到包中)

安装与依赖(新版)

环境要求

  • Python 3.10+
  • Windows/Linux/macOS(建议官方 Python 或 Conda)
  • 可选:uv 包管理器(更快的 pip 替代品)

正式安装(推荐)

  • 从 PyPI 安装(wheel 已内置 qpSWIFT 扩展,开箱即用)
pip install easyteleop

开发者安装(本地源码 + 编译内置 qpSWIFT)

  • 需要本地 C/C++ 构建环境:
    • Windows:Visual Studio Build Tools(含"使用 C++ 的桌面开发"组件)
    • Linux:gcc/clang 与基础构建工具
    • macOS:Xcode Command Line Tools
  • 注意:仅执行 uv sync 只会安装第三方依赖,不会安装(编译)本包本身;必须安装本包才会编译 qpSWIFT 扩展。

使用 uv(推荐):

pip install uv  # 如未安装
uv pip install -e .

或使用 pip:

pip install -e .

安装完成后验证:

python -c "import EasyTeleop, qpSWIFT; print('OK')"

从源码构建 Wheel(用于分发)

uv build            # 生成 sdist 与 wheel
# 或仅生成 wheel:
uv build --wheel

构建好的 wheel 中已内置编译完成的 qpSWIFT 扩展(与当前平台/解释器匹配)。

主要依赖(摘要)

  • aiortc, opencv-python, pyrealsense2, robotic-arm, numpy, scipy, matplotlib
  • qpSWIFT(二次规划求解器,已随包集成并在安装时编译/或随 wheel 分发)

使用方法

简单遥操

run文件夹下放有一些测试文件,用于直接启动遥操

  • run_test.py:双臂和摄像头都采用Test类,VR头显采用VRSocket类

启动服务

运行测试脚本:

# 在项目根目录下
uv run run/run_test.py

项目结构

.
├── run/                    # 运行脚本
│   ├── run_test.py         # 测试脚本示例
│   └── ...                 # 其他运行脚本
├── src/
│   └── EasyTeleop/
│       ├── Components/     # 核心组件模块
│       │   ├── DataCollect.py      # 数据采集模块
│       │   ├── TeleopMiddleware.py # 遥操作中间件
│       │   ├── WebRTC.py           # WebRTC支持
│       │   ├── VRPacketAnalyzer.py # VR数据包分析器
│       │   ├── Interpolation.py    # 插值算法
│       │   ├── Visualizer.py       # 可视化模块
│       │   ├── HandVisualizer.py   # 手部可视化模块
│       │   └── __init__.py
│       ├── Device/         # 设备相关模块
│       │   ├── BaseDevice.py       # 设备基类
│       │   ├── Camera/             # 摄像头设备
│       │   │   ├── BaseCamera.py
│       │   │   ├── RealSenseCamera.py
│       │   │   ├── TestCamera.py
│       │   │   └── __init__.py
│       │   ├── Robot/              # 机械臂设备
│       │   │   ├── BaseRobot.py
│       │   │   ├── RealMan.py
│       │   │   ├── TestRobot.py
│       │   │   └── __init__.py
│       │   ├── Hand/               # 手部设备
│       │   │   ├── BaseHand.py
│       │   │   ├── Revo2OnRealMan.py
│       │   │   └── __init__.py
│       │   ├── VR/                 # VR设备
│       │   │   ├── BaseVR.py
│       │   │   ├── TestVR.py
│       │   │   ├── VRSocket.py
│       │   │   └── __init__.py
│       │   └── __init__.py
│       ├── TeleopGroup/    # 遥操作组管理
│       │   ├── BaseTeleopGroup.py
│       │   ├── SingleArmWithTriggerTeleopGroup.py
│       │   ├── TwoArmWithTriggerTeleopGroup.py
│       │   └── __init__.py
│       └── __init__.py
├── test/                   # 测试文件
├── docs/                   # 文档
└── pyproject.toml          # 项目配置文件

开发指南

添加新设备类型

  1. 继承BaseDevice基类(或相应设备类型的基类)
  2. 实现必要的接口方法(start, stop等)
  3. 在TeleopMiddleware中注册相应的事件处理函数

扩展遥操作功能

  1. 在TeleopMiddleware中添加新的事件处理
  2. 创建新的遥操作组来组织设备

构建和发布

使用uv构建分发包:

uv build

配置好API密钥然后上传PYPI

uv publish

或者使用传统方法构建并发布

python -m build
python -m twine upload dist/*

注意事项

  1. 所有设备的主循环都需要放在多线程中运行
  2. 设备控制逻辑不能阻塞主线程
  3. 设备状态有三种:未连接(0)、已连接(1)、断开连接(2)
  4. 系统支持自动重连机制

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyteleop-0.2.3.tar.gz (130.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

easyteleop-0.2.3-cp312-cp312-win_amd64.whl (101.7 kB view details)

Uploaded CPython 3.12Windows x86-64

easyteleop-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl (171.6 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

easyteleop-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (172.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

easyteleop-0.2.3-cp311-cp311-win_amd64.whl (101.7 kB view details)

Uploaded CPython 3.11Windows x86-64

easyteleop-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl (170.8 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

easyteleop-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (171.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

easyteleop-0.2.3-cp310-cp310-win_amd64.whl (101.7 kB view details)

Uploaded CPython 3.10Windows x86-64

easyteleop-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl (169.6 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

easyteleop-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (170.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

File details

Details for the file easyteleop-0.2.3.tar.gz.

File metadata

  • Download URL: easyteleop-0.2.3.tar.gz
  • Upload date:
  • Size: 130.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for easyteleop-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0a94d5ed3a81fb7d2f33e6a19268b7619308e58d76d3b9d6603478b6639e3d07
MD5 5eae1bc265c941339955597ca43063b7
BLAKE2b-256 a78312e05001a371bfddba3eb099814880442e47e6619e9869589c78f3a8fdd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3.tar.gz:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: easyteleop-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 101.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for easyteleop-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2a3fd9f5d1604b364e68a636986d34e91c0d0751e127e9c6d8dea11ab1f72bdb
MD5 6b5c7e14d2065c35392fca9420b060d2
BLAKE2b-256 82a4cd6c42bd660431cb40426b48ac948aeebe3a126fb2d218db0b9dc56714e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp312-cp312-win_amd64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for easyteleop-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8f6ad0055ccaddf0559d7e5d66ac12810d1acad474350b98f909a462f9e32ff5
MD5 927fc1bb9ca64d3f7ae70e0f30fa5949
BLAKE2b-256 43976a1e0fffca685b5455fe4b204c58601bb51098a14a4a310a152ea27ee37b

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for easyteleop-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c700ca8cc8915a116e1c1c039ec7433cc8b55a50407c33e4d065cdcbb0f9fa3
MD5 cc6a6c0dc3c44387a0def06f0f04fd2a
BLAKE2b-256 c866bfaad2e166817302a5fad37ace5a91a0b30acf3a4d70d1656db853813a7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: easyteleop-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 101.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for easyteleop-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 acaedd4f027b1c2424572ccbb71e4b8a69b22edfb4556c0588878bf17435af2c
MD5 d3411cdcf0d1c40fdef8a4683b69e9df
BLAKE2b-256 10834a17bee4d5163905a65b494aa592ac572498b35c186978f3dcbb4885a872

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp311-cp311-win_amd64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for easyteleop-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f9ee2b6f69bc09109d0054de5087f927e0e76f3cb912e0330ccec3c84917c2f4
MD5 0cf04963de87d37ac0117951aeb3b0e1
BLAKE2b-256 d20250e3c2b6455f6b008378208cb45a131fc1d398be6e5b95d032c884f59139

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for easyteleop-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 62568fb4e78a74d8145f816fd6b10d3de3dc52cfb9805186ab661ec5d94e62a6
MD5 6cb72a91af2f24c46988a11b671e4ae4
BLAKE2b-256 b9453f67e16300759c2bff6b1f6f0c1b2681845f384a0dfc01f5371d485eaf83

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: easyteleop-0.2.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 101.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for easyteleop-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 166e9a0d9b6384f6bd7f68b4c61c9c584713ad9f5ddbf7e3fa803be233623ed6
MD5 a75500540ff5f553afcc080a3411e7a6
BLAKE2b-256 55e2ac365d95079b5a0eff794b06f4e8593effb7bf60582a9b60deea2898c026

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp310-cp310-win_amd64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for easyteleop-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9049e17f76170c066363179f44236a8aed7aa4d1f44bde1da35ec12d95398bd1
MD5 e8c99cd7e6e9a3148905bef1003e4a81
BLAKE2b-256 6767779ce7010ad1b2acce9c6524604264b7493e9e35e72d42c533a6b1524cd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyteleop-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for easyteleop-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1fd7699b75a9fde8696bd3bc7080acf094cf345b162ccb272aed0baa3bbeb7e6
MD5 c20a2a3cff446d5a129ac9a23daef9ed
BLAKE2b-256 3f5dbaab85f53923db17cf5e6d186515fc3cb8564c1363f5aa4df8cd86ff35f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyteleop-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on SZUEAILab/EasyTeleop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page