研究 telegrip - SO100 Robot Arm Teleoperation System

0. 前言

最初是在关注XLerobot工作时,发现他们有通过VR遥操实体机器人的代码,他们声称修改了telegrip相关代码,所以我现在来研究一下telegrip,看看有什么异同,哪些模块是必要的,在迁移到自研机械臂上需要什么。

1. 前置准备

1.1 项目特征

功能统一架构:单一入口点协调所有组件

多种输入方式:支持 VR 控制器(Quest/WebXR)和键盘控制

共享 IK/FK 逻辑:基于 PyBullet 的双臂逆向和正向运动学

实时可视化:使用坐标系和标记进行 3D PyBullet 可视化

安全功能:关节限制约束、优雅关闭和错误处理

异步/非阻塞:所有组件同时运行且互不阻塞

1.2 前提条件

机器人硬件:一台或两台带有 USB-串口连接的 SO100 机械臂

Python 环境:Python 3.8 及以上版本,并安装所需的包

VR 设置(可选):Meta Quest 或其他支持 WebXR 的头显(无需安装应用)

1.3 安装

首先需要安装lerobot,我之前安装过,不想破坏原有环境,所以复制一份代码,然后复制一个环境

在复制的 lerobot 目录中:

bash 复制代码
git clone https://github.com/DipFlip/telegrip.git
conda create --name telegrip --clone lerobot0.3.3
conda activate telegrip
cd telegrip
pip install -e .
# 手动生成cert.pem and key.pem
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=Test/L=Test/O=Test/OU=Test/CN=localhost"

1.4 启动telegrip


先不连接真实机器人,选择:

bash 复制代码
telegrip --no-robot

一切正常。

尝试 telegrip:

bash 复制代码
❌ Left arm connection failed: 
Could not connect on port '/dev/ttySO100red'. Make sure you are using the correct port.
Try running `python -m lerobot.find_port`

❌ Right arm connection failed: 
Could not connect on port '/dev/ttySO100blue'. Make sure you are using the correct port.
Try running `python -m lerobot.find_port`

修改config.ymal:

bash 复制代码
robot:
  left_arm:
    enabled: true
    name: Left Arm
    port: /dev/ttyACM0
  right_arm:
    enabled: true
    name: Right Arm
    port: /dev/ttyACM1

然后第一次启动时,发现pybullet也不启动了,然后运行telegrip --log-level info,发现是校准问题

bash 复制代码
(telegrip) strawberry@strawberry-E500-G9-WS760T:~/zzy/project/lerobot/telegrip$ telegrip --log-level info 
pybullet build time: Jan 29 2025 23:16:28
2025-10-20 17:05:32,945 - telegrip.main - INFO - Starting with configuration:
2025-10-20 17:05:32,945 - telegrip.main - INFO -   Robot: enabled
2025-10-20 17:05:32,945 - telegrip.main - INFO -   PyBullet: enabled
2025-10-20 17:05:32,945 - telegrip.main - INFO -   Headless mode: disabled
2025-10-20 17:05:32,945 - telegrip.main - INFO -   VR: enabled
2025-10-20 17:05:32,945 - telegrip.main - INFO -   Keyboard: enabled
2025-10-20 17:05:32,945 - telegrip.main - INFO -   Auto-connect: disabled
2025-10-20 17:05:32,945 - telegrip.main - INFO -   HTTPS Port: 8443
2025-10-20 17:05:32,945 - telegrip.main - INFO -   WebSocket Port: 8442
2025-10-20 17:05:32,945 - telegrip.main - INFO -   Robot Ports: {'left': '/dev/ttyACM0', 'right': '/dev/ttyACM1'}
2025-10-20 17:05:32,947 - telegrip.main - INFO - HTTPS server started on 0.0.0.0:8443
2025-10-20 17:05:32,948 - telegrip.inputs.vr_ws_server - INFO - SSL certificate and key loaded successfully for WebSocket server
2025-10-20 17:05:32,953 - websockets.server - INFO - server listening on 0.0.0.0:8442
2025-10-20 17:05:32,953 - telegrip.inputs.vr_ws_server - INFO - VR WebSocket server running on wss://0.0.0.0:8442
2025-10-20 17:05:32,953 - telegrip.inputs.keyboard_listener - INFO - Keyboard listener started
2025-10-20 17:05:32,953 - telegrip.inputs.keyboard_listener - INFO - 
============================================================
2025-10-20 17:05:32,953 - telegrip.inputs.keyboard_listener - INFO - DUAL-ARM KEYBOARD TELEOPERATION CONTROLS
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO - ============================================================
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO - LEFT ARM (WASD + QE):
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO -   W/S: Move Forward/Backward
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO -   A/D: Move Left/Right
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO -   Q/E: Move Down/Up
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO -   Z/X: Wrist Roll
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO -   R/T: Wrist Flex (Pitch)
2025-10-20 17:05:32,954 - telegrip.inputs.keyboard_listener - INFO -   F: Toggle Left Gripper Open/Closed
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   Tab: Manual Toggle Left Arm Position Control On/Off
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - 
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - RIGHT ARM (UIOJKL):
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   I/K: Move Forward/Backward
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   J/L: Move Left/Right
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   U/O: Move Up/Down
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   N/M: Wrist Roll
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   H/Y: Wrist Flex (Pitch)
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   ; (semicolon): Toggle Right Gripper Open/Closed
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   Enter: Manual Toggle Right Arm Position Control On/Off
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - 
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - Global:
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -   ESC: Exit
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - 
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - Note: Position control is automatically activated when you press
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO -       movement keys. Idle for 1 second to reset target position.
2025-10-20 17:05:32,955 - telegrip.inputs.keyboard_listener - INFO - ============================================================
2025-10-20 17:05:32,956 - telegrip.inputs.keyboard_listener - INFO - Left arm position control: INACTIVE
2025-10-20 17:05:32,956 - telegrip.inputs.keyboard_listener - INFO - Right arm position control: INACTIVE
2025-10-20 17:05:32,956 - telegrip.main - INFO - All system components started successfully
2025-10-20 17:05:32,956 - telegrip.inputs.keyboard_listener - INFO - Dual-arm keyboard control loop started
2025-10-20 17:05:32,956 - telegrip.core.robot_interface - INFO - Setting up robot configs with ports: {'left': '/dev/ttyACM0', 'right': '/dev/ttyACM1'}
2025-10-20 17:05:32,956 - telegrip.core.robot_interface - INFO - Connecting to robot...
2025-10-20 17:05:32,971 - lerobot.robots.so100_follower.so100_follower - INFO - Mismatch between calibration values in the motor and the calibration file or no calibration file found
2025-10-20 17:05:32,971 - lerobot.robots.so100_follower.so100_follower - INFO - 
Running calibration of left_follower SO100Follower
Move left_follower SO100Follower to the middle of its range of motion and press ENTER....

完成校准后,仿真启动成功,通过键盘控制小球,末端执行器就会靠近抓取,求出关节的逆解

但是真实的机械臂并没有动作,只是锁电机了。需要在打开的web端点击 connect robot ,这时就可以使用键盘控制 real 机械臂了。

VR也是同理的,那么我现在来用VR试一下

相关推荐
darkb1rd16 小时前
claurst:Rust 重构终端编码代理实战指南
开源·github·好物分享
AI自动化工坊17 小时前
实战教程:使用CapCut AI免费视频编辑器2小时制作专业宣传视频
人工智能·ai·开源·编辑器·音视频
AI成长日志17 小时前
【GitHub开源项目】Harness CI/CD平台深度解析:架构设计、核心功能与实战指南
ci/cd·开源·github
VBsemi-专注于MOSFET研发定制18 小时前
面向水稻插秧机器人的功率MOSFET选型分析——以高可靠、高效率电源与驱动系统为例
机器人
lulu121654407818 小时前
谷歌Gemma 4实战指南:Apache 2.0开源,移动端AI新时代来临
java·开发语言·人工智能·开源·apache·ai编程
kobesdu18 小时前
laser_line_extraction线段提取开源功能包解读和使用例程
人工智能·算法·机器人·ros
NocoBase18 小时前
为 Excel 数据快速构建 Web 应用:4 种方法对比
前端·人工智能·低代码·开源·excel
kyle~18 小时前
C++---Boost库(准标准库)
开发语言·c++·机器人·ros·boost
最新快讯18 小时前
云端商用vs端侧开源:微软谷歌同日发布新一代AI模型
人工智能·microsoft·开源
BFT白芙堂19 小时前
基于旋量理论的 Franka 机械臂逆运动学求解器 GeoFIK 研究
人工智能·机器学习·机器人·具身智能·frankaresearch3·旋量理论·机械臂逆运动学