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
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ src/unilab/assets/bots/
src/unilab/assets/robots/x2/meshes/*.STL
src/unilab/assets/robots/g1/assets/
src/unilab/assets/robots/g1/textures/
src/unilab/assets/robots/go1/assets/
src/unilab/assets/robots/go2/assets/
src/unilab/assets/robots/a2/assets/
src/unilab/assets/robots/allegro_hand/assets/
src/unilab/assets/robots/sharpa_wave/meshes/

Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/api_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PPO / APPO / SAC / TD3 variants moved to the uni_rl package (issue #1480).
:::{grid-item-card} 🏋 `unilab.training`
:link: training/index
:link-type: doc
Runtime helpers, monitoring, reward bookkeeping, runner orchestration.
Runtime helpers, reward bookkeeping, runner orchestration.
:::

:::{grid-item-card} 🔗 Shared-memory runtime → `uni_rl.ipc`
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/api_reference/training/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Glue between `algos`, `envs` and `ipc`: experiment lifecycle and the
top-level `run` helpers invoked by the `train` / `eval` / `demo` CLI
entrypoints. Layer-0 helpers (seeding, monitoring, reward bookkeeping,
entrypoints. Layer-0 helpers (seeding, reward bookkeeping,
checkpoint resolution, sim2sim contracts) live in `unilab.utils`; resolved
env config adaptation lives in `unilab.base.config_adapter`.

Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/source/api_reference/utils/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `unilab.utils` — Utilities

Device probing, tensor helpers, training seeding, hardware monitoring,
reward bookkeeping, checkpoint resolution, sim2sim contract checks, NaN
Device probing, tensor helpers, training seeding, reward bookkeeping,
checkpoint resolution, sim2sim contract checks, NaN
guards, and pure-numpy geometry/rotation helpers shared across envs and
scripts.

Expand Down
6 changes: 4 additions & 2 deletions docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ collector sim processes land on their own physical GPU with no cross-GPU
leakage; single-GPU PPO/SAC regressions pass alongside. Newton/Warp follows
standard CUDA device semantics, so no `CUDA_VISIBLE_DEVICES` pinning (the
Genesis quirk) is needed; the rank-local device reaches spawn collectors as
a `newton_device="cuda:N"` env override (uni_rl 1.0.0's collector-side
process-binding gate only covers mjwarp), and the SAC owner raises the
a `newton_device="cuda:N"` env override, and uni_rl's collector-side
process binding is injection-based — UniLab injects
`bind_backend_process_device_for_backend`, which covers both mjwarp and
newton — while the SAC owner raises the
collector tick-0 timeout to 180 s to cover Warp kernel compilation on the
cold path.

Expand Down
7 changes: 0 additions & 7 deletions docs/sphinx/source/en/2-user_guide/7-tooling/0-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ Configure run logging and experiment metadata.
Inspect NaN guard dumps from PPO runs.
:::

:::{grid-item-card} Scene export
:link: 4-scene_export
:link-type: doc
Export MuJoCo scenes and copied assets for inspection.
:::

:::{grid-item-card} Robot import
:link: 5-robot_import
:link-type: doc
Expand All @@ -44,6 +38,5 @@ Connect robot assets, model descriptions, control interfaces, and keyframes.
1-onnx_export
2-wandb
3-nan_visualizer
4-scene_export
5-robot_import
```
16 changes: 0 additions & 16 deletions docs/sphinx/source/en/2-user_guide/7-tooling/4-scene_export.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ sideways, start here.
Almost always one of:

1. **Joint order swapped.** Inspect `policy.onnx` input width and the joint
order in your motor driver. Use `unilab-export-scene` to dump the
training joint order.
order in your motor driver against the training scene XML
(`src/unilab/assets/robots/<robot>/scene_flat.xml`).
2. **Action scale unit mismatch.** Policy outputs unscaled values; the
driver expects rad, but you fed it normalized [-1, 1]. Apply the
`env.actions.joint_pos.scale` / default-angle convention from the training
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mostly mechanical.
3. Mirror your reward terms; keep the same names so reward parity is
diff-able.
4. Translate command sampling — configure `UniformVelocityCommandCfg` under
the owner YAML's `env.commands` (see the Go1 flat owner).
the owner YAML's `env.commands` (see the `go2_joystick_flat` owner).
5. Translate terrain — Legged Gym's heightfield generator has a UniLab
counterpart at `unilab.terrains.heightfield_terrains`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ materialization out of `step()`, `reset()`, and hot domain-randomization loops.
- Terrain generator shape and numerical behavior:
`tests/terrains/test_terrain_generator.py`
- Rough locomotion height-scan and spawn behavior:
`tests/envs/locomotion/test_go2_rough_height_scan.py`,
`tests/envs/locomotion/test_go2_terrain_spawn.py`,
`tests/envs/locomotion/test_terrain_spawn.py`
- Backend materialization boundaries: `tests/utils/test_xml_utils.py`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ DpRankSupervisor DP=2(`training.devices=[0,1]`)训练冒烟均正常完成
在各自 GPU、无对端泄漏;单卡 PPO/SAC 回归同步通过。Newton/Warp 遵循标准
CUDA 设备语义,无需 Genesis 那样的 `CUDA_VISIBLE_DEVICES` 钉卡;rank
本地设备通过 env override 以 `newton_device="cuda:N"` 传入 spawn
collector(uni_rl 1.0.0 的 collector 进程绑定门只覆盖 mjwarp),SAC
owner 将 collector tick-0 超时提升到 180 s 以覆盖 Warp 内核编译的冷
路径。
collector,且 uni_rl 的 collector 进程绑定为注入式——UniLab 注入的
`bind_backend_process_device_for_backend` 同时覆盖 mjwarp 与
newton;SAC owner 将 collector tick-0 超时提升到 180 s 以覆盖 Warp
内核编译的冷路径。

## 安装

Expand Down
7 changes: 0 additions & 7 deletions docs/sphinx/source/zh_CN/2-user_guide/7-tooling/0-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
检查 PPO 运行中的 NaN guard dump。
:::

:::{grid-item-card} 场景导出
:link: 4-scene_export
:link-type: doc
导出 MuJoCo 场景及复制的 asset 以供检查。
:::

:::{grid-item-card} 机器人导入
:link: 5-robot_import
:link-type: doc
Expand All @@ -43,6 +37,5 @@
1-onnx_export
2-wandb
3-nan_visualizer
4-scene_export
5-robot_import
```

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

几乎总是以下之一:

1. **关节顺序被调换。** 检查 `policy.onnx` 的输入宽度与你电机驱动器中的关节顺序。
用 `unilab-export-scene` 导出训练时的关节顺序
1. **关节顺序被调换。** 检查 `policy.onnx` 的输入宽度,并将你电机驱动器中的关节顺序
与训练场景 XML(`src/unilab/assets/robots/<robot>/scene_flat.xml`)对照
2. **动作缩放单位不匹配。** 策略输出未缩放的值;驱动器期望的是弧度,而你喂给它的
是归一化的 [-1, 1]。在把目标发送给驱动器之前,应用训练 owner YAML 中的
`env.actions.joint_pos.scale` / 默认角度约定,并原样复现该 owner 解析后的
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Legged Gym 曾是那套 GPU 常驻的 PPO 模板,教会了整个领域如何
2. 在 `src/unilab/tasks/locomotion/<robot>/` 下创建一个任务模块。
3. 镜像你的 reward 项;保持名称相同,以便 reward 一致性可被 diff。
4. 翻译命令采样 —— 在 owner YAML 的 `env.commands` 下配置
`UniformVelocityCommandCfg`,参考 Go1 flat owner。
`UniformVelocityCommandCfg`,参考 `go2_joystick_flat` owner。
5. 翻译地形 —— Legged Gym 的高度场生成器在 UniLab 中有一个对应物,位于
`unilab.terrains.heightfield_terrains`。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
- 地形生成器形状与数值行为:
`tests/terrains/test_terrain_generator.py`
- Rough locomotion 高度扫描与 spawn 行为:
`tests/envs/locomotion/test_go2_rough_height_scan.py`、
`tests/envs/locomotion/test_go2_terrain_spawn.py`、
`tests/envs/locomotion/test_terrain_spawn.py`
- 后端 materialization 边界:`tests/utils/test_xml_utils.py`

Expand Down
8 changes: 3 additions & 5 deletions pyproject.rocm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ requires-python = ">=3.10,<3.14"
dependencies = [
"numpy",
# Physics implementations are provided by the independently released
# unisim-core package. The 1.4.1 release carries the fixed model variant,
# unisim-core package. The 1.4.2 release carries the fixed model variant,
# per-world reset-default, per-env gravity, substep body-wrench, and
# IsaacGym fixed-variant contracts.
"unisim-core>=1.4.1",
"unisim-core>=1.4.2",
# RL algorithms and async runtimes live in the independently released
# uni-rl package (distribution name ``unilab-rl``); see pyproject.toml.
"unilab-rl==1.2.0",
"unilab-rl==1.2.1",
"torch==2.11.0",
"triton-rocm==3.6.0 ; sys_platform == 'linux' and platform_machine == 'x86_64'",
"gymnasium",
Expand Down Expand Up @@ -61,7 +61,6 @@ eval = "unilab.cli:eval_main"
demo = "unilab.cli:demo_main"
unilab-complete = "unilab.cli_completion:main"
unilab-viz-nan = "unilab.utils.nan_viz:main"
unilab-export-scene = "unisim.backend.mujoco.export_scene:main"
unilab-render-teaser = "unilab.visualization.teaser:main"
unilab-pull-assets = "unilab.assets.pull:main"

Expand Down Expand Up @@ -163,7 +162,6 @@ venv = ".venv"
include = ["src/unilab"]
exclude = [
"src/unilab/envs/", # lazy optional `mujoco` import; not installed in the pyright env
"src/unilab/utils/monitoring.py", # optional pynvml/psutil deps
"src/unilab/visualization/", # direct mujoco C bindings + optional viser deps
]
reportMissingImports = "warning"
Expand Down
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ requires-python = ">=3.10,<3.14"
dependencies = [
"numpy",
# Physics implementations are provided by the independently released
# unisim-core package. The 1.4.1 release carries the fixed model variant,
# unisim-core package. The 1.4.2 release carries the fixed model variant,
# per-world reset-default, per-env gravity, substep body-wrench, and
# IsaacGym fixed-variant contracts.
"unisim-core>=1.4.1",
"unisim-core>=1.4.2",
# RL algorithms and async runtimes (PPO/APPO/SAC/TD3 runners,
# collectors, IPC, logging) live in the independently released uni-rl
# package (distribution name ``unilab-rl``), consumed via the injected
# env contract (uni_rl.env_contract.EnvFactory). Published on PyPI.
"unilab-rl==1.2.0",
"unilab-rl==1.2.1",
"numba>=0.67",
"prettytable>=3.10",
# torch is a range (not an exact pin) so that published PyPI metadata lets
Expand Down Expand Up @@ -89,7 +89,6 @@ eval = "unilab.cli:eval_main"
demo = "unilab.cli:demo_main"
unilab-complete = "unilab.cli_completion:main"
unilab-viz-nan = "unilab.utils.nan_viz:main"
unilab-export-scene = "unisim.backend.mujoco.export_scene:main"
unilab-render-teaser = "unilab.visualization.teaser:main"
unilab-pull-assets = "unilab.assets.pull:main"

Expand Down Expand Up @@ -171,7 +170,7 @@ viser = ["viser>=1.0.26", "trimesh>=3.21.7"]
# required-environments; elsewhere the extra is empty and the CLI reports a
# targeted runtime diagnostic.
superdex = [
"unisim-core[superdex]>=1.4.0 ; python_version >= '3.12' and sys_platform == 'linux' and platform_machine == 'x86_64'",
"unisim-core[superdex]>=1.4.2 ; python_version >= '3.12' and sys_platform == 'linux' and platform_machine == 'x86_64'",
]

[dependency-groups]
Expand Down Expand Up @@ -250,7 +249,6 @@ venv = ".venv"
include = ["src/unilab"]
exclude = [
"src/unilab/envs/", # lazy optional `mujoco` import; not installed in the pyright env
"src/unilab/utils/monitoring.py", # optional pynvml/psutil deps
"src/unilab/visualization/", # direct mujoco C bindings + optional viser deps
]
reportMissingImports = "warning"
Expand Down
Loading
Loading