Skip to content

feat: add TRON2 training and runtime inference support - #21

Merged
Vertax42 merged 5 commits into
mainfrom
feat/tron2
Sep 26, 2026
Merged

Vertax42 merged 5 commits into
mainfrom
feat/tron2

Conversation

@Hubo1231

@Hubo1231 Hubo1231 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

概述

为 TRON2 双臂机器人补齐从 LeRobot 数据集训练到 OpenPI 实时推理的示例,包含当前 feat/tron2 分支相对 main 的 4 个提交。

主要改动

  • 新增 LeRobotTron2DataConfig:适配双臂 TCP 与夹爪的 20 维状态和动作,将 top 相机映射为策略的 head 视角,并支持笛卡尔动作的
    delta 编码。
  • 新增 PI 0.5 训练配置,采用 8×H100 训练模板。
  • 新增 TRON2 实时推理入口:接入相机观测、动作分块和 dry-run;发送动作前将策略输出的 TCP 位姿按工具标定转换为法兰位姿。
  • 新增机器人 bench recipe 和默认 dry-run 配置,便于配置设备参数并检查推理输出。

Review 修正(e2073bf)

  • 安全断开:Tron2Env.disconnect() 原先只在 robot.is_connected 为真时才调用 robot.disconnect()。但相机或夹爪任一异常时该聚合状态即为 False,导致运行中 TacCap/夹爪掉线后跳过复位、300 Hz 原生控制器不停止、SDK 和相机不释放。现改为无条件调用(驱动在无连接时本身就是 no-op)。
  • 驱动版本说明:recipes/default.yaml 使用的 taccap_remote_url / taccap_remote_auto_enable 仅存在于 XenseRobotics-AI/lerobot-tron2 的 feat/taccap_web 分支,main 分支的 Tron2RTConfig 没有这两个字段(draccus 会直接报错)。已在 recipe 和 main.py 文档中注明依赖该分支。

已验证:ruff 通过;tron2_config_test.py 2 passed;default recipe 可在 feat/taccap_web 驱动上正常解析为 Tron2RTConfig。

🤖 Generated with Claude Code

@Hubo1231
Hubo1231 requested a review from Vertax42 September 24, 2026 05:46
…er branch

env.disconnect() gated robot.disconnect() on robot.is_connected, which
turns False as soon as a camera or gripper is unhealthy. A mid-run
TacCap/gripper failure therefore skipped the reset-to-start and left the
300 Hz native controller running. Tron2RT.disconnect() is already a
no-op when nothing is connected, so call it unconditionally.

The default recipe sets taccap_remote_url / taccap_remote_auto_enable,
which only exist in lerobot-tron2's feat/taccap_web branch; say so in the
recipe and the entry-point docstring.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Vertax42
Vertax42 merged commit 6b9a30f into main Sep 26, 2026
1 check passed
@Vertax42
Vertax42 deleted the feat/tron2 branch September 26, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants