Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ src/unilab/assets/motions/x2/*.csv
src/unilab/assets/robots/x2/meshes/*.STL
src/unilab/assets/robots/microduck/assets/*
!src/unilab/assets/robots/microduck/assets/.gitkeep
src/unilab/assets/robots/t800/assets/*
!src/unilab/assets/robots/t800/assets/.gitkeep
src/unilab/assets/robots/t800/textures/*
!src/unilab/assets/robots/t800/textures/.gitkeep
src/unilab/assets/robots/g1/assets/
src/unilab/assets/robots/g1/textures/
src/unilab/assets/robots/go2/assets/
Expand Down
17 changes: 8 additions & 9 deletions docs/sphinx/source/en/4-developer_guide/7-motion_assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Robot binary meshes and textures (for example `.STL`, `.obj`, and `.png`) are
externalized the same way, on the Hugging Face dataset repo
[unilabsim/unilab-robots](https://huggingface.co/datasets/unilabsim/unilab-robots).
The registered robots are a2, allegro_hand, g1, go2, go2_arm, microduck,
sharpa_wave, t800, and x2 (`ROBOT_ASSET_SPECS` in `src/unilab/assets/hub.py`).
sharpa_wave, and x2 (`ROBOT_ASSET_SPECS` in `src/unilab/assets/hub.py`).
Their mesh/texture directories download lazily on first use and land under
their original paths (for example `src/unilab/assets/robots/g1/assets/` and
`robots/g1/textures/` for G1), so the original relative XML paths remain
Expand All @@ -107,30 +107,29 @@ To add a new robot's binary assets:

1. Upload each directory to the HF repo while keeping the directory layout
identical. A robot with multiple asset directories requires one upload per
directory. For example, T800 uses:
directory. For example, G1 uses:

```bash
uv run hf upload unilabsim/unilab-robots \
src/unilab/assets/robots/t800/assets robots/t800/assets \
src/unilab/assets/robots/g1/assets robots/g1/assets \
--repo-type dataset
uv run hf upload unilabsim/unilab-robots \
src/unilab/assets/robots/t800/textures robots/t800/textures \
src/unilab/assets/robots/g1/textures robots/g1/textures \
--repo-type dataset
```

2. Ignore the downloaded directory contents in `.gitignore` (robots whose
entire directory is HF-hosted ignore the whole directory; the older
microduck/t800 entries keep a `.gitkeep`), exclude the directory in
microduck entry keeps a `.gitkeep`), exclude the directory in
`tool.uv.build-backend.source-exclude`, and register it in
`ROBOT_ASSET_SPECS`.
3. Scenes built through `create_backend` are then covered automatically:
`ensure_robot_assets_for_paths` resolves the registered directories on a
cold path before any backend parses the XML. Entry points that bypass
`create_backend` resolve explicitly, e.g. a T800 task factory calls:
`create_backend` resolve explicitly, e.g. the MicroDuck task factory calls:

```python
resolve_robot_asset_dir("robots/t800/assets", marker="LINK_BASE.obj")
resolve_robot_asset_dir("robots/t800/textures", marker="LINK_BASE.png")
resolve_robot_asset_dir("robots/microduck/assets", marker="trunk_base.stl")
```

## Architecture Notes
Expand All @@ -149,6 +148,6 @@ To add a new robot's binary assets:
original local path exactly.
- Robot binary assets use the same directory resolver
(`resolve_robot_asset_dir`). The
thin X2, MicroDuck, and T800 task factories resolve their directories once
thin X2 and MicroDuck task factories resolve their directories once
before delegating to the shared manager environment factory. The resolver is
also exposed through the `unilab-pull-assets` CLI.
12 changes: 4 additions & 8 deletions docs/sphinx/source/en/5-reference/5-support_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ in English. Do not infer support beyond the evidence grade shown below.
headless physics in an external Python 3.11 worker; its owner scope is
currently limited to the configured G1 walk-flat PPO/SAC paths.
- `--sim mjwarp` has completed training validation only on the `g1_walk_flat`
host adapter, where PPO (torch) and SAC (torch) are Tested; the SAC
`t800_walk_flat` mjwarp owner is Configured only, other entrypoints follow
the matrix below, and using it requires installing the `mjwarp` extra.
host adapter, where PPO (torch) and SAC (torch) are Tested; other
entrypoints follow the matrix below, and using it requires installing the
`mjwarp` extra.
- `--algo`, `--task`, and `--sim` jointly select the owner YAML.
- Do not treat `training.sim_backend` as a standalone backend switch.

Expand Down Expand Up @@ -53,9 +53,7 @@ owner may only cover training smoke and an explicitly enabled DR subset.
`mjwarp` has completed training validation only on the `g1_walk_flat` host
adapter: the PPO (torch) and SAC (torch) owners have completed training
validation and have backend, contract, and playback automated coverage, so
they are marked `Tested`. The SAC `t800_walk_flat` mjwarp owner only has an
owner YAML and compose coverage, so it is marked `Configured`, which does not
imply training validation. mjwarp playback
they are marked `Tested`. mjwarp playback
supports explicit, finite-step `record` and reuses the MuJoCo offline
renderer; `uv run eval --sim mjwarp --render-mode interactive` routes to the
MuJoCo interactive viewer (mjwarp physics, MuJoCo rendering of env[0], forced
Expand Down Expand Up @@ -110,7 +108,6 @@ rendering/playback paths remain unsupported.
| PPO (torch) | `go2w_joystick_flat` (go2w joystick flat) | Tested | - | Tested | - | - |
| PPO (torch) | `go2w_joystick_rough` (go2w joystick rough) | Tested | - | Tested | - | - |
| PPO (torch) | `stewart_balance` (stewart balance) | Tested | - | Tested | - | - |
| PPO (torch) | `t800_walk_flat` (t800 walk flat) | Tested | Registered | - | - | - |
| APPO (torch) | `go1_joystick_flat` (Go1 joystick) | Tested | - | Tested | - | - |
| APPO (torch) | `go2_joystick_flat` (Go2 joystick) | Tested | - | Tested | - | - |
| APPO (torch) | `g1_walk_flat` (G1 walk flat) | Tested | Registered | Registered | Registered | Registered |
Expand All @@ -137,7 +134,6 @@ rendering/playback paths remain unsupported.
| SAC (torch) | `g1_23dof_wall_flip_tracking` (g1 23dof wall flip tracking) | Tested | - | Registered | - | - |
| SAC (torch) | `g1_23dof_wbt_obs` (g1 23dof wbt obs) | Tested | - | Registered | - | - |
| SAC (torch) | `g1_wbt_obs` (g1 wbt obs) | Tested | - | Registered | - | - |
| SAC (torch) | `t800_walk_flat` (t800 walk flat) | Tested | Configured | - | - | - |
| TD3 (torch) | `go1_joystick_flat` (Go1 joystick) | Registered | - | Tested | - | - |
| TD3 (torch) | `go2_joystick_flat` (Go2 joystick) | Registered | - | Tested | - | - |
| TD3 (torch) | `g1_walk_flat` (G1 walk flat) | Tested | Registered | Registered | Registered | Registered |
Expand Down
19 changes: 9 additions & 10 deletions docs/sphinx/source/zh_CN/4-developer_guide/7-motion_assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ env:
托管在 Hugging Face 数据集仓库
[unilabsim/unilab-robots](https://huggingface.co/datasets/unilabsim/unilab-robots)。
已注册的机器人为 a2、allegro_hand、g1、go2、go2_arm、microduck、sharpa_wave、
t800、x2(见 `src/unilab/assets/hub.py` 的 `ROBOT_ASSET_SPECS`)。它们的
x2(见 `src/unilab/assets/hub.py` 的 `ROBOT_ASSET_SPECS`)。它们的
mesh/纹理目录在首次使用时按需下载,落盘到原始路径(例如 G1 的
`src/unilab/assets/robots/g1/assets/` 与 `robots/g1/textures/`),因此 XML 中的
原始相对路径保持有效。这些目录通过 `pyproject.toml` 的
Expand All @@ -97,28 +97,27 @@ uv run unilab-pull-assets --robot all # 所有已注册机器人
新增某个机器人的二进制资产:

1. 按目录上传到 HF 仓库,保持目录结构一致。一个机器人有多个资产目录时,
每个目录分别上传。例如 T800
每个目录分别上传。例如 G1

```bash
uv run hf upload unilabsim/unilab-robots \
src/unilab/assets/robots/t800/assets robots/t800/assets \
src/unilab/assets/robots/g1/assets robots/g1/assets \
--repo-type dataset
uv run hf upload unilabsim/unilab-robots \
src/unilab/assets/robots/t800/textures robots/t800/textures \
src/unilab/assets/robots/g1/textures robots/g1/textures \
--repo-type dataset
```

2. 在 `.gitignore` 中忽略下载目录(整个目录托管到 HF 的机器人直接忽略整个目录;
较早的 microduck/t800 条目保留 `.gitkeep`),在
较早的 microduck 条目保留 `.gitkeep`),在
`tool.uv.build-backend.source-exclude` 中排除该目录,并在 `ROBOT_ASSET_SPECS`
中注册。
3. 经由 `create_backend` 构建的 scene 会被自动覆盖:
`ensure_robot_assets_for_paths` 在 backend 解析 XML 之前的冷路径解析已注册目录。
绕过 `create_backend` 的入口需要显式解析,例如 T800 task factory 调用两次
绕过 `create_backend` 的入口需要显式解析,例如 MicroDuck task factory:

```python
resolve_robot_asset_dir("robots/t800/assets", marker="LINK_BASE.obj")
resolve_robot_asset_dir("robots/t800/textures", marker="LINK_BASE.png")
resolve_robot_asset_dir("robots/microduck/assets", marker="trunk_base.stl")
```

## 架构说明
Expand All @@ -131,6 +130,6 @@ uv run unilab-pull-assets --robot all # 所有已注册机器人
`ensure_robot_assets_for_paths`,然后再分发给具体 backend。
- 热路径(`step` / `reset`)**不会**触发任何文件下载或解析。
- `ASSETS_ROOT_PATH` 定义不变,下载落盘位置与原始本地路径完全一致。
- 机器人二进制资产使用同一目录 resolver(`resolve_robot_asset_dir`)。X2
MicroDuck 和 T800 的薄 task factory 都会先在冷路径解析一次,再委托给共享
- 机器人二进制资产使用同一目录 resolver(`resolve_robot_asset_dir`)。X2
MicroDuck 的薄 task factory 都会先在冷路径解析一次,再委托给共享
manager env factory;同一 resolver 也通过 `unilab-pull-assets` CLI 暴露。
4 changes: 1 addition & 3 deletions docs/sphinx/source/zh_CN/5-reference/5-support_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ uv run scripts/generate_support_matrix.py --write

`Tested` 只描述仓库中已有自动化覆盖或显式 maintainer 训练验证,不代表该组合具备同名 MuJoCo owner 的全部 backend capability;例如 phase-1 Motrix owner 可能只覆盖训练 smoke 和明确启用的 DR 子集。

`mjwarp` 完成训练验证的只有 `g1_walk_flat` host adapter:PPO (torch) 与 SAC (torch) owner 已完成训练验证,并有 backend、contract 与 playback 自动化覆盖,因此标记为 `Tested`。SAC `t800_walk_flat` 的 mjwarp owner 只有 owner YAML 与 compose 覆盖,标记为 `Configured`,不代表训练验证。mjwarp playback 默认仅支持显式、有限步数的 `record` 并复用 MuJoCo 离线 renderer;`uv run eval --sim mjwarp --render-mode interactive` 路由到 MuJoCo 交互 viewer(mjwarp 跑物理、MuJoCo 渲染 env[0],强制单 env);不支持 `auto` 或 native playback。其他 entrypoint 中出现的 `Registered` 只表示 env/backend registry identity,不代表对应算法、terrain、完整 DR 或 production training 支持。
`mjwarp` 完成训练验证的只有 `g1_walk_flat` host adapter:PPO (torch) 与 SAC (torch) owner 已完成训练验证,并有 backend、contract 与 playback 自动化覆盖,因此标记为 `Tested`。mjwarp playback 默认仅支持显式、有限步数的 `record` 并复用 MuJoCo 离线 renderer;`uv run eval --sim mjwarp --render-mode interactive` 路由到 MuJoCo 交互 viewer(mjwarp 跑物理、MuJoCo 渲染 env[0],强制单 env);不支持 `auto` 或 native playback。其他 entrypoint 中出现的 `Registered` 只表示 env/backend registry identity,不代表对应算法、terrain、完整 DR 或 production training 支持。

`isaacgym` 是 Python 3.8 子进程后端,当前只接入 `g1_walk_flat`。SAC (torch) owner 已在真机(external Python 3.8 worker runtime,不在仓库 CI 覆盖)完成训练与 record playback 验证,标记为 `Tested`;其余 isaacgym cell 最高只到 `Configured`(registry + owner YAML + compose/contract 覆盖),不代表任何训练或 play 验证。playback 走 IsaacGym 原生渲染(viewer + camera sensor 离屏录制),有显示器时 `play_render_mode=auto` 打开交互 viewer,无显示器时自动降级为离屏录制。

Expand Down Expand Up @@ -95,7 +95,6 @@ uv run scripts/generate_support_matrix.py --write
| PPO (torch) | `microduck_velocity_bam_flat` (microduck velocity bam flat) | Tested | - | - | - | - | - |
| PPO (torch) | `microduck_velocity_flat` (microduck velocity flat) | Tested | Configured | - | - | - | - |
| PPO (torch) | `stewart_balance` (stewart balance) | Tested | - | Tested | - | - | - |
| PPO (torch) | `t800_walk_flat` (t800 walk flat) | Tested | Registered | - | - | - | - |
| APPO (torch) | `go1_joystick_flat` (Go1 joystick) | Tested | - | Tested | - | - | - |
| APPO (torch) | `go2_joystick_flat` (Go2 joystick) | Tested | - | Tested | - | - | - |
| APPO (torch) | `g1_walk_flat` (G1 walk flat) | Tested | Registered | Registered | Registered | Registered | Registered |
Expand Down Expand Up @@ -123,7 +122,6 @@ uv run scripts/generate_support_matrix.py --write
| SAC (torch) | `g1_23dof_wbt_obs` (g1 23dof wbt obs) | Tested | - | Registered | - | - | - |
| SAC (torch) | `g1_wbt_obs` (g1 wbt obs) | Tested | - | Registered | - | - | - |
| SAC (torch) | `microduck_velocity_flat` (microduck velocity flat) | Tested | Configured | - | - | - | - |
| SAC (torch) | `t800_walk_flat` (t800 walk flat) | Tested | Configured | - | - | - | - |
| TD3 (torch) | `go1_joystick_flat` (Go1 joystick) | Registered | - | Tested | - | - | - |
| TD3 (torch) | `go2_joystick_flat` (Go2 joystick) | Registered | - | Tested | - | - | - |
| TD3 (torch) | `g1_walk_flat` (G1 walk flat) | Tested | Registered | Registered | Registered | Registered | Registered |
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ source-exclude = [
"/src/unilab/assets/robots/go2_arm/assets",
"/src/unilab/assets/robots/microduck/assets",
"/src/unilab/assets/robots/sharpa_wave/meshes",
"/src/unilab/assets/robots/t800/assets",
"/src/unilab/assets/robots/t800/textures",
"/src/unilab/assets/robots/x2/meshes",
]

Expand Down
2 changes: 0 additions & 2 deletions scripts/tools/support_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ def render_support_matrix(root: Path | None = None) -> str:
"",
"`mjwarp` 完成训练验证的只有 `g1_walk_flat` host adapter:PPO (torch) 与 SAC (torch) owner "
"已完成训练验证,并有 backend、contract 与 playback 自动化覆盖,因此标记为 `Tested`。"
"SAC `t800_walk_flat` 的 mjwarp owner 只有 owner YAML 与 compose 覆盖,标记为 `Configured`,"
"不代表训练验证。"
"mjwarp playback 默认仅支持显式、有限步数的 `record` 并复用 MuJoCo 离线 renderer;"
"`uv run eval --sim mjwarp --render-mode interactive` 路由到 MuJoCo 交互 viewer"
"(mjwarp 跑物理、MuJoCo 渲染 env[0],强制单 env);不支持 `auto` 或 native playback。"
Expand Down
4 changes: 0 additions & 4 deletions src/unilab/assets/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
"go2w": (("robots/go2/assets", "base_0.obj", "**/*", "asset"),),
"microduck": (("robots/microduck/assets", "trunk_base.stl", "*.stl", "STL"),),
"sharpa_wave": (("robots/sharpa_wave/meshes", "DP_HB1_4F.STL", "*.STL", "STL"),),
"t800": (
("robots/t800/assets", "LINK_BASE.obj", "*.obj", "OBJ"),
("robots/t800/textures", "LINK_BASE.png", "*.png", "PNG"),
),
"x2": (("robots/x2/meshes", "pelvis.STL", "*.STL", "STL"),),
}

Expand Down
29 changes: 0 additions & 29 deletions src/unilab/assets/robots/t800/LICENSE.engineai.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/unilab/assets/robots/t800/assets/.gitkeep

This file was deleted.

68 changes: 0 additions & 68 deletions src/unilab/assets/robots/t800/scene_flat.xml

This file was deleted.

Loading