diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d30646ad1..c0e52d111 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,11 +4,11 @@ # Core algorithm and training flows /src/unilab/algos/ @TATP-233 @caozx1110 /src/unilab/ipc/ @TATP-233 -/scripts/train_*.py @TATP-233 @caozx1110 +/src/unilab/scripts/train_*.py @TATP-233 @caozx1110 # Task and environment ownership -/src/unilab/envs/motion_tracking/ @caozx1110 -/src/unilab/envs/manipulation/ @Mingrui-Yu +/src/unilab/tasks/motion_tracking/ @caozx1110 +/src/unilab/tasks/manipulation/ @Mingrui-Yu /scripts/motion/ @caozx1110 # Project process and docs diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cc7bacc49..eaa44bf03 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -37,7 +37,7 @@ body: label: Reproduction description: Exact command, config, or sequence that reproduces the issue. placeholder: | - uv run scripts/train_offpolicy.py algo=sac task=sac/g1_walk_flat/mujoco ... + uv run train --algo sac --task g1_walk_flat --sim mujoco ... validations: required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b43e5dac5..024023fd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,8 @@ jobs: persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v8.0.0 + with: + enable-cache: true - name: Install dependencies(only dev group) run: uv sync --only-group dev - name: Check @@ -49,6 +51,8 @@ jobs: persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v8.0.0 + with: + enable-cache: true - name: Install dependencies(only dev group) run: uv sync --only-group dev - name: Check @@ -65,6 +69,8 @@ jobs: persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v8.0.0 + with: + enable-cache: true - name: Install dependencies run: uv sync - name: Check @@ -81,6 +87,8 @@ jobs: persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v8.0.0 + with: + enable-cache: true - name: Install dependencies run: uv sync - name: Check @@ -98,6 +106,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v8.0.0 with: + enable-cache: true python-version: '3.11' - name: Install dependencies run: | @@ -124,7 +133,9 @@ jobs: test: if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' - timeout-minutes: 15 + # The merged manager-based suite needs ~20 min on ubuntu-slim; 15 min + # cancels the step at ~60%. + timeout-minutes: 30 strategy: matrix: os: [ubuntu-slim] @@ -138,6 +149,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v8.0.0 with: + enable-cache: true # python-version: ${{ matrix.python-version }} python-version: '3.11' - name: Install system dependencies @@ -162,5 +174,12 @@ jobs: --no-install-package nvidia-nvtx-cu12 \ --no-install-package triton uv pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu + - name: Cache robot assets + uses: actions/cache@v4.2.3 + with: + path: src/unilab/assets/robots + key: ${{ runner.os }}-robot-assets-v1-${{ hashFiles('src/unilab/assets/hub.py') }} + - name: Pull robot assets + run: uv run --no-sync unilab-pull-assets --robot all - name: Test with coverage run: uv run --no-sync pytest -m "not slow" --cov=src/unilab --cov-report "markdown-append:${GITHUB_STEP_SUMMARY:-/dev/null}" --cov-fail-under=25 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 35a8e678f..02eba1eab 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,7 +8,7 @@ on: - "docs/README.md" - "src/unilab/**" - "scripts/generate_support_matrix.py" - - "conf/**" + - "src/unilab/conf/**" - "README.md" - "CONTRIBUTING.md" - "AGENTS.md" @@ -21,7 +21,7 @@ on: - "docs/README.md" - "src/unilab/**" - "scripts/generate_support_matrix.py" - - "conf/**" + - "src/unilab/conf/**" - "README.md" - "CONTRIBUTING.md" - "AGENTS.md" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..ca2b05534 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,96 @@ +name: release + +on: + push: + tags: ["v*"] + workflow_dispatch: + +permissions: + contents: read + actions: read + +jobs: + build-dist: + name: Build and verify distributions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6.0.2 + with: + persist-credentials: false + - uses: astral-sh/setup-uv@v8.0.0 + with: + enable-cache: false + - name: Verify tag matches project version + if: startsWith(github.ref, 'refs/tags/v') + shell: bash + run: | + project_version="$(python3 -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" + tag_version="${GITHUB_REF_NAME#v}" + test "$tag_version" = "$project_version" || { + echo "Tag v$tag_version does not match pyproject.toml version $project_version" >&2 + exit 1 + } + - name: Verify CI passed for tagged commit + if: startsWith(github.ref, 'refs/tags/v') + env: + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + successful_runs="$(gh api \ + "/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/runs?head_sha=${GITHUB_SHA}&status=completed&per_page=100" \ + --jq '[.workflow_runs[] | select(.conclusion == "success")] | length')" + test "$successful_runs" -gt 0 || { + echo "No successful ci.yml run found for tagged commit $GITHUB_SHA" >&2 + echo "ci.yml only runs on pull_request and workflow_dispatch; dispatch it on the commit to release, then tag." >&2 + exit 1 + } + - name: Build source distribution and wheel + run: uv build --out-dir dist + - name: Check distribution metadata + run: uvx --from twine twine check dist/* + - name: Install the freshly built wheel + run: | + uv venv .release-venv + uv pip install --python .release-venv/bin/python --reinstall --no-deps \ + --no-binary unilab --no-cache --find-links dist --no-index unilab + - name: Smoke test installed wheel + shell: bash + run: | + tag_version="" + case "$GITHUB_REF" in + refs/tags/v*) tag_version="${GITHUB_REF_NAME#v}" ;; + esac + .release-venv/bin/python -c " + import unilab + assert unilab.ROOT_PATH.is_dir() + assert (unilab.ROOT_PATH / 'conf').is_dir() + version = unilab.__version__ + assert version != '0.0.0', version + ref = '$tag_version' + if ref: + assert version == ref, f'{version} != {ref}' + print('installed unilab', version) + " + - uses: actions/upload-artifact@v4.2.3 + with: + name: release-dist + path: dist/* + + publish: + needs: build-dist + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + environment: pypi + steps: + - uses: actions/download-artifact@v4.2.3 + with: + name: release-dist + path: dist + - name: Publish distributions to PyPI with trusted publishing + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist + skip-existing: true diff --git a/.gitignore b/.gitignore index d1de5a693..1ddcb823b 100644 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,6 @@ run_summary.json src/unilab/assets/checkpoints/ scripts/benchmark/outputs/ -src/unilab/algos/torch/rsl_rl third-party temp/ @@ -81,6 +80,13 @@ src/unilab/assets/motions/x2/*.csv # Robot mesh assets (downloaded from HF at runtime) src/unilab/assets/robots/x2/meshes/*.STL +src/unilab/assets/robots/g1/assets/ +src/unilab/assets/robots/g1/textures/ +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/ +src/unilab/assets/robots/go2_arm/assets/ # Grasp cache assets (downloaded from HF at runtime) src/unilab/assets/caches/*.npy diff --git a/AGENTS.md b/AGENTS.md index 8b02a7549..754beea0b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,8 @@ UniLab 是一个 **高性能、模块化、contract 驱动** 的 RL infrastructure 仓库。 +RL 算法与异步 runtime(PPO/APPO/SAC/TD3/HORA 的 runner、learner、collector、IPC、训练日志)由独立包 **uni_rl**(仓库 [unilabsim/unilab_rl](https://github.com/unilabsim/unilab_rl),distribution 名 `unilab-rl`,发布在 PyPI)承载;UniLab 不构造 uni_rl 消费的 env,而是通过注入式 env contract 对接:`uni_rl.env_contract.EnvFactory = Callable[[int, Mapping | None], EnvProtocol]`(必须可被 pickle 引用,collector 跑在 spawn 子进程),UniLab 侧适配器为 `src/unilab/base/env_factory.py` 的 `registry_env_factory`,mjwarp 设备绑定经 `src/unilab/base/process_device.py` 的 `bind_backend_process_device` 注入。unilab 可以 import uni_rl;uni_rl 永远不 import unilab / unisim。 + ## Core Principles 1. **Contract first**: 不为了一次通过绕过 env / backend / runner contract。 @@ -32,34 +34,40 @@ UniLab 是一个 **高性能、模块化、contract 驱动** 的 RL infrastructu | Env | `NpEnvState.obs` 必须是 dict;`reset()` 返回 `(obs_dict, info_dict)`;`obs_groups_spec` 影响 wrapper 和 learner 维度。 | | Config / Reward | reward 通过 Hydra 注入;后端切换必须通过 `task=/` 选择 owner YAML,`training.sim_backend` 只是 owner YAML 的身份字段,不能单独 override 来切后端。算法超参数直接走 YAML compose,不经 Python 层解释。 | | Backend | backend-specific 逻辑留在 backend / env 适配层,不向训练脚本扩散。env 层只能调用 `SimBackend`(`base.py`)中已声明的方法;若某方法只在 MuJoCo 或 Motrix 中存在,必须先将其加入 `SimBackend` 抽象接口(可抛 `NotImplementedError`),禁止直接在 env 里调用 backend 子类的私有方法(即"功能泄漏/feature leakage")。新增 backend 专有能力时,需同步更新 `SimBackend`。 | -| Asset / Metadata | `ASSETS_ROOT_PATH`、`model_file`、XML / asset 元数据只允许在 init / materialization / cache 等低频路径访问;`step/reset/domain randomization` 等热路径不得解析 asset 或基于 asset 元数据做运行时分支。 | +| Asset / Metadata | `ASSETS_ROOT_PATH`、`model_file`、XML / asset 元数据只允许在 init / materialization / cache 等低频路径访问;`step/reset/domain randomization` 等热路径不得解析 asset 或基于 asset 元数据做运行时分支。机器人 mesh/纹理不入 git:托管在 HF 数据集 `unilabsim/unilab-robots`,注册表为 `src/unilab/assets/hub.py` 的 `ROBOT_ASSET_SPECS`,由 `create_backend` 冷路径自动下载(也可 `unilab-pull-assets` 预拉取),落盘回原路径使 XML `meshdir` 引用不变;这些目录在 `.gitignore` 与 `pyproject.toml` 的 `tool.uv.build-backend.source-exclude` 中同步排除。 | | Asset / XML structure | `` 必须放在 task-level XML(`scene_*.xml` 或 `locomotion_task.xml` 等 fragment),**禁止放进 robot.xml**。robot.xml 是纯机器人描述(body / joint / actuator / sensor),跟 task / 场景无关;keyframe 是 task 起始姿态,属于场景或 task 资源。motrix 后端需要 keyframe 时通过 `scene.fragment_files` 引用 fragment XML。 | -| Async | 不绕开 runner lifecycle,也不另起 collector / learner 同步协议。 | +| Async | 不绕开 runner lifecycle(实现在 uni_rl 仓库的 `uni_rl.ipc.async_runner`),也不另起 collector / learner 同步协议。 | | Sim2Sim 契约 | 跨后端 play 时,影响策略 I/O / 网络结构的字段必须跨后端一致;不一致即 `CrossBackendIncompatibleError`。详见下方 Sim2Sim 章节。 | ## Sim2Sim 跨后端配置契约 -`src/unilab/training/sim2sim.py` 按 dotted path 维护三类字段: +`src/unilab/utils/sim2sim.py` 按 dotted path 维护三类字段: - **DENYLIST**(差异即 `CrossBackendIncompatibleError`):`algo.obs_groups`、`env.control_config.action_scale`、`algo.policy.actor_hidden_dims` / `critic_hidden_dims`、`algo.empirical_normalization` / `algo.obs_normalization`、`env.sampling_mode`。`env.*` 子集对**任一方向**的不对称出现也 fail-closed;`algo` 专属字段目标缺省时按设计跳过(跨算法合法)。 - **WARNING_LIST**:`reward.*`、`env.control_config.simulate_action_latency`、`env.ctrl_dt`。 - **ALLOWLIST**(自由覆盖):`training.sim_backend`、`env.scene`、`training.play_steps`、`env.domain_rand`、`env.noise_config`、`env.commands.vel_limit`。 -训练时 `ExperimentTracker.start()` 把上述字段写入 `run_config.json` 的 `contract_snapshot`(不改 checkpoint 格式,旧 run 无 snapshot 时 fallback + warning);五个 play 入口在建 env 前调用 `resolve_sim2sim_config` 校验,并用 `policy_load_dim_guard` 包裹 checkpoint 加载以把维度不匹配的隐晦报错重抛为显式诊断。设 `training.sim2sim_strict=false` 可把 DENYLIST 差异降级为 warning(默认 `true`)。DENYLIST 字段在每个后端 owner 配置中显式声明并保持跨后端一致(范例:`conf/ppo/task/g1_walk_flat/{mujoco,motrix}.yaml`);跨后端契约审计见 `scripts/audit_sim2sim_contracts.py`。 +训练时 `ExperimentTracker.start()` 把上述字段写入 `run_config.json` 的 `contract_snapshot`(不改 checkpoint 格式,旧 run 无 snapshot 时 fallback + warning);五个 play 入口在建 env 前调用 `resolve_sim2sim_config` 校验,并用 `policy_load_dim_guard` 包裹 checkpoint 加载以把维度不匹配的隐晦报错重抛为显式诊断。设 `training.sim2sim_strict=false` 可把 DENYLIST 差异降级为 warning(默认 `true`)。DENYLIST 字段在共享 base owner 与后端 owner 配置中显式声明并保持跨后端一致(范例:`src/unilab/conf/ppo/task/g1_walk_flat/{base,mujoco,motrix}.yaml`);跨后端契约审计见 `scripts/audit_sim2sim_contracts.py`。 ## Pointers -- PPO: `scripts/train_rsl_rl.py` -- APPO: `scripts/train_appo.py` -- SAC / TD3: `scripts/train_offpolicy.py` +- PPO: `src/unilab/scripts/train_rsl_rl.py` +- APPO: `src/unilab/scripts/train_appo.py` +- SAC / TD3 / FlashSAC: `src/unilab/scripts/train_sac.py` / `src/unilab/scripts/train_td3.py` / `src/unilab/scripts/train_flashsac.py` - env contract: `src/unilab/base/np_env.py` -- backend contract: `src/unilab/base/backend/base.py` +- backend contract: `unisim.backend.base.SimBackend`(由 `unisim-core` 仓库维护) +- UniLab backend owner factory: `src/unilab/base/backend_factory.py` +- isaacgym subprocess 后端(Python 3.8 worker + shm 协议): `unisim.backend.isaacgym`(由 `unisim-core` 仓库维护) - training run helpers: `src/unilab/training/run.py` - visualization helpers: `src/unilab/visualization/` - shared numeric helpers: `src/unilab/utils/rotation.py`, `src/unilab/utils/geometry.py` - config schema: `src/unilab/structured_configs.py` -- async runner: `src/unilab/ipc/async_runner.py` -- sim2sim 跨后端契约: `src/unilab/training/sim2sim.py` +- async runner: `uni_rl.ipc.async_runner`(独立 uni_rl 仓库 / `unilab-rl` 包) +- algo 实现(runner / learner / collector): uni_rl 包(独立仓库,distribution 名 `unilab-rl`);UniLab 只保留入口脚本与 play 编排 +- uni_rl env factory 适配: `src/unilab/base/env_factory.py` +- HORA APPO play 编排: `src/unilab/scripts/play_hora_appo.py`;HORA distill 配置组合: `src/unilab/training/hora_distill_config.py` +- sim2sim 跨后端契约: `src/unilab/utils/sim2sim.py` +- new algorithm recipe(三档扩展方式 + 约定式 CLI 路由 footprint): `docs/sphinx/source/zh_CN/4-developer_guide/3-extending/3-new_algorithm.md` ## GitHub CLI (gh) 速查 @@ -101,6 +109,17 @@ git push -u origin fix/issue-174-ppo-config-alignment gh pr create --title "fix: xxx" --body "Fixes #174" --base ``` +## PyPI Release + +`.github/workflows/release.yml` 是生产发布路径,由 `v*` tag 推送触发(`workflow_dispatch` 只做构建与验证,不发布): + +1. 更新 `pyproject.toml` 的 `[project].version`(版本单一来源)及相关文档,本地 `make test-all` 与 `uv build` 通过。 +2. 确认目标 commit 有成功的 `ci.yml` 运行:ci.yml 只在 PR 与 `workflow_dispatch` 上运行,若目标 commit 没有记录,先对该 commit 手动 dispatch 一次 ci.yml 再发 tag。 +3. 推送与 `[project].version` 完全一致的 annotated tag(如 `v0.1.0`)。release workflow 会校验 tag 与版本一致、该 commit CI 已通过,然后构建 sdist + wheel、twine check、`--no-deps` 安装 wheel 并做 import / 版本 smoke test。 +4. 构建验证通过后,`publish` job 通过 trusted publishing(OIDC,`environment: pypi`)上传到 PyPI,无 token 入仓;`skip-existing: true` 支持安全重跑。 + +发布失败时:产物未变可用同一 tag 修复重跑;改了代码必须升级版本与新 tag,绝不覆盖已发布版本。 + ## Context - 架构标准与验证详情:[docs/sphinx/source/zh_CN/4-developer_guide/0-index.md](docs/sphinx/source/zh_CN/4-developer_guide/0-index.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8917990b..f364d9cf1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,10 +6,13 @@ Languages: English | [简体中文](docs/sphinx/source/zh_CN/4-developer_guide/4 1. Fork and clone the repository. 2. Install dependencies for your platform: - - macOS (MPS, installs PyPI torch wheels): `uv sync` - - Linux default (installs PyTorch cu128 wheels; requires an NVIDIA GPU/driver supported by current PyTorch cu128 wheels): `uv sync` + - macOS (MPS, installs PyPI torch wheels): `make setup-motrix` (or `make setup-mujoco`) + - Linux default (installs PyTorch cu128 wheels; requires an NVIDIA GPU/driver supported by current PyTorch cu128 wheels): `make setup` - Linux AMD / ROCm workstation: `make sync-rocm`, then run commands with `uv run --no-sync ...` - - When you need Motrix, append `--extra motrix` + - For direct uv setup, use `uv sync --extra mujoco --extra motrix`; replace it + with `--extra mujoco` or `--extra motrix` for a single backend + - Physics adapters are supplied by the production PyPI package + `unisim-core>=0.1.14` (import namespace `unisim`). 3. Create a branch such as `git checkout -b docs/improve-readme` or `git checkout -b fix/backend-bug`. ## Development Rules diff --git a/Makefile b/Makefile index b09ce494e..c725e69f3 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,17 @@ setup-mujoco: uv sync --extra mujoco uv run --no-sync unilab-complete install +# Installs the Python extra and builds DrakeUni's native extension. By default +# the host-compatible official tarball is downloaded; use DRAKE_HOME= +# to build against an existing installation. +.PHONY: setup-drake +setup-drake: + @ if [ -n "$(DRAKE_HOME)" ]; then \ + bash scripts/tools/setup_drake_env.sh --drake-home "$(DRAKE_HOME)"; \ + else \ + bash scripts/tools/setup_drake_env.sh --download-drake; \ + fi + .PHONY: setup-motrix setup-motrix: uv sync --extra motrix @@ -56,7 +67,11 @@ type: uv run pyright .PHONY: check -check: format type +check: format type check-tests + +.PHONY: check-tests +check-tests: + uv run ruff check tests --select F401,F821,F811,F841 --output-format concise .PHONY: test test: @@ -88,7 +103,7 @@ clean: find . -type d -name ".ruff_cache" -exec rm -rf {} + find . -type d -name "htmlcov" -exec rm -rf {} + find . -type f -name ".coverage" -delete - rm -f train_appo.log train_offpolicy.log train_rsl_rl.log MUJOCO_LOG.TXT + rm -f train_appo.log train_sac.log train_flashsac.log train_rsl_rl.log MUJOCO_LOG.TXT find src/unilab/assets/.cache -type f ! -name '.gitkeep' -delete 2>/dev/null || true find src/unilab/assets/caches -type f ! -name '.gitkeep' -delete 2>/dev/null || true find src/unilab/assets/checkpoints -type f ! -name '.gitkeep' -delete 2>/dev/null || true diff --git a/README.md b/README.md index 2fb61aec3..295879d56 100644 --- a/README.md +++ b/README.md @@ -1,229 +1,258 @@

UniLab

-A Heterogeneous Architecture for Robot RL Beyond GPU-Dominant Paradigms +A Heterogeneous Architecture for Robot RL Beyond GPU-Dominant Paradigms.

Languages: English | 简体中文

+ CI Project Page - arXiv - Paper + Paper + CoRL 2026 Documentation - Galgame - Apache-2.0 License + PyPI + Apache-2.0 License

+

🎉 🎉 UniLab has been accepted to CoRL 2026! 🎉 🎉

+

UniLab Teaser

-

Train robot RL without a GPU simulation backend. Teaser rendered with MotrixSim.

+

One task-authoring surface for locomotion, manipulation, and motion tracking.

+ +UniLab is a complete, configurable product for robot reinforcement learning. +Describe a task with Hydra, assemble it from manager terms, select a physics +backend, and train or evaluate through one CLI. The same task-facing contract +connects CPU, GPU, and external-worker simulation to the learner runtime. + +Physics adapters are provided by the independent +[`unisim-core`](https://github.com/unilabsim/unisim) package. RL algorithms and +their runners are provided by [`unilab-rl`](https://github.com/unilabsim/unilab_rl) +(Python namespace `uni_rl`). UniLab keeps the user-facing task, environment, +configuration, and experiment workflow together. + +New to UniLab? Start with [First success](#first-success-run-a-demo). Already +have a task? Jump to [Train and evaluate](#train-and-evaluate) and change only +`--sim` to try another backend when a matching task owner is available. + +## Highlights + +```text +┌──────────────────────────────────────┐ Same task contract ┌──────────────────────────────────────┐ +│ │ ────────────────────────▶ │ Run it where you need │ +│ Define the task once │ │ MuJoCo · Motrix · MJWarp · Drake │ +│ Hydra · Managers · NumPy │ │ Genesis · IsaacGym · IsaacSim │ +│ Terms · rewards · commands │ │ CUDA · ROCm · macOS · MPS · XPU │ +│ │ │ train · eval │ +└──────────────────────────────────────┘ └──────────────────────────────────────┘ +``` -Start with the `Quick Demo` below to run the primary training command. The recommended setup uses `uv`; Conda and pip users should still follow the `uv` workflow for now. Platform-specific notes and current boundaries are in the [installation guide](https://unilabsim.github.io/UniLab-doc/en/1-getting_started/2-installation.html). +UniLab's core idea is simple: define task semantics once as reusable +configuration, then change the simulator, hardware, or learner without +rewriting the task's environment lifecycle. -## ✨ Highlights +- **Configure, don't code.** Actions, observations, rewards, terminations, + events, commands, curricula, and metrics are manager terms assembled in Hydra + owner YAML. Variants built from existing terms need no new environment class + — often no Python code at all. +- **Change the backend, keep the workflow.** Current and future simulators share + the public `SimBackend` contract. Choose a backend with `--sim`; the same task + authoring and train/eval workflow remains in place while the owner YAML keeps + backend-specific details explicit. +- **Scale across the hardware you have.** CPU-parallel or external-worker + simulation feeds accelerator learners through the injected env contract and + async runtime. Algorithms and runners are supplied by the unified package + ecosystem instead of being tied to one simulator. -``` -┌────────────────────┐ ┌─────────────────────────┐ -│ Uni Physics Sim │ Unified Shared Memory │ GPU Policy Training │ -│ Motrix / MuJoCo │ ─────────────────────────▶ │ PPO / SAC / TD3 │ -│ MjWarp / Drake │ SharedReplayBuffer │ CUDA / MPS / ROCm / XPU │ -└────────────────────┘ └─────────────────────────┘ -``` +## Getting started -- **Heterogeneous RL runtime:** CPU-parallel simulation streams transitions through shared memory while policy learning runs on GPU accelerators. -- **Two physics backends:** MuJoCoUni and MotrixSim are integrated through backend-specific adapters and task owner configs. -- **Unified training CLI:** `uv run train` and `uv run eval` cover PPO, APPO, SAC, TD3, and FlashSAC; additional HORA and HIM-PPO paths are documented as script-level workflows. -- **Config-owned tasks:** Hydra owner YAML files select task, reward, backend, and algorithm settings together; backend switching is expressed as `task=/`. -- **Cross-platform setup paths:** The repository tracks Linux CUDA, Linux ROCm, Linux XPU, and Apple Silicon / macOS setup flows. - -## 🚀 Quick Demo - - - - - - - - - - - - -
- dance demo -
- dance
G1 motion tracking
-
- wallflip demo -
- wallflip
G1 wall flip
-
- teaser demo -
- teaser
MotrixSim teaser
-
- boxtracking demo -
- boxtracking
G1 box tracking
-
- inhandgrasp demo -
- inhandgrasp
Sharpa in-hand
-
- locomani demo -
- locomani
Go2 loco-manipulation
-
+The supported source workflow uses [`uv`](https://docs.astral.sh/uv/). ```bash -# 0. Install uv if needed -# Linux / macOS: curl -LsSf https://astral.sh/uv/install.sh | sh - -# Windows: -# powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" -# choco install make -y - -# 1. Clone the repository git clone https://github.com/unilabsim/UniLab.git cd UniLab -# 2. Install dependencies -# Pick the setup command for your platform. -# -# Prerequisite: the `mujoco` extra compiles a native extension during `uv sync` -# and needs Python development headers when using a system Python: -# Ubuntu / Debian: sudo apt-get install build-essential python3-dev -# macOS: xcode-select --install -# Windows: MSVC Build Tools -# (uv-managed Pythons from `uv python install` already bundle the headers.) +# Fastest path to the first Motrix demo. +make setup-motrix -# Linux CUDA, macOS, or Windows -make setup +# Full local setup (MuJoCo + Motrix): +# make setup -# Linux AMD / ROCm -# make sync-rocm +# Optional platform/backend paths: +# make sync-rocm # AMD GPU +# make sync-xpu # Intel GPU +# make setup-drake # Drake + native batch extension +``` -# Linux Intel Arc / iGPU -# make sync-xpu +The `mujoco` extra compiles a native extension and may require the platform +compiler and Python development headers. See the +[installation guide](https://unilabsim.github.io/UniLab-doc/en/1-getting_started/2-installation.html) +for platform-specific setup, optional backends, and external worker runtimes. -# Without shell completion setup: -# uv sync --extra mujoco --extra motrix -# If `make` is not installed or unavailable: -# uv sync --extra mujoco --extra motrix && uv run --no-sync unilab-complete install +## First success: run a demo -# 3. Pre-trained checkpoint playback (downloads from Hugging Face on first run) +```bash +# Downloads the checkpoint and assets from Hugging Face on first run. uv run demo dance ``` -Available demo names: `teaser`, `dance`, `wallflip`, `boxtracking`, `locomani`, `inhandgrasp`. See the [Unified CLI](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/1-training/1-cli_reference.html) page for the full list and flags. - -> Mainland China users: motions, scenes, robot meshes, and demo checkpoints are pulled from Hugging Face on first run. If `huggingface.co` is unreachable, point the client at the community mirror before running demo commands: -> -> ```bash -> export HF_ENDPOINT=https://hf-mirror.com -> ``` +Available presets are `teaser`, `dance`, `wallflip`, `boxtracking`, `locomani`, +and `inhandgrasp`. Use `uv run demo --help` for device and refresh options. +The [quick demo guide](https://unilabsim.github.io/UniLab-doc/en/1-getting_started/1-quick_demo.html) +explains rendering modes and server/macOS differences. -For training and evaluation: +## Train and evaluate ```bash -uv run train --algo appo --task go2_joystick_flat --sim motrix +# Train and replay a task with Motrix. +uv run train --algo ppo --task go2_joystick_flat --sim motrix +uv run eval --algo ppo --task go2_joystick_flat --sim motrix --load-run -1 -uv run eval --algo appo --task go2_joystick_flat --sim motrix --load-run -1 +# Switch only the simulator for the same task. +uv run train --algo ppo --task go2_joystick_flat --sim mujoco -# Headless Motrix video export for Linux/server runs -uv run eval --algo appo --task go2_joystick_flat --sim motrix --load-run -1 --render-mode record +# Or use the same workflow with an off-policy learner. +uv run train --algo sac --task g1_walk_flat --sim mujoco +uv run train --algo flashsac --task g1_walk_flat --sim mujoco + +# Headless video export. +uv run eval --algo ppo --task go2_joystick_flat --sim motrix \ + --load-run -1 --render-mode record ``` -This routes through the `go2_joystick_flat/motrix` task owner config and keeps backend selection explicit. Each backend owner carries an optional `play_profile` block that layers render-only overrides at eval time (`training.play_only=true`) without affecting training. +Route-defining choices are always visible: -On macOS / MacBook, the UniLab CLI routes Motrix interactive playback through `mxpython` when needed. Motrix defaults to interactive playback; use `--render-mode record` for headless video export or `--render-mode none` to skip playback. Detailed script-level commands are in the [Training Guide](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/1-training/0-index.html). +```text +--algo + --task + --sim → Hydra owner YAML → registered environment +``` -## 🏃 Example Runs +Use normal Hydra overrides after those flags: ```bash -uv run train --algo sac --task g1_walk_flat --sim mujoco -uv run train --algo flashsac --task g1_walk_flat --sim mujoco +uv run train --algo ppo --task go2_joystick_flat --sim motrix \ + algo.max_iterations=1 algo.num_envs=16 training.no_play=true ``` -```bash -uv run train --algo sac --task g1_motion_tracking --sim motrix +Do not override `training.sim_backend` to switch engines. It is the identity +field supplied by the selected owner YAML. Find resume, W&B, playback, and the +full command matrix in the +[training guide](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/1-training/0-index.html). + +## Manager-based configuration + +UniLab wraps a community-familiar manager API with Hydra composition and a +NumPy runtime. A task owner can select and parameterize terms declaratively: + +```yaml +env: + observations: + policy: + terms: + joint_pos: + func: unilab.envs.mdp.joint_pos_rel + command: + func: unilab.envs.mdp.generated_commands + params: + command_name: twist + actions: + joint_pos: + _target_: unilab.envs.mdp.JointPositionActionCfg + entity_name: robot + scale: 0.25 +reward: + tracking_lin_vel: + func: unilab.tasks.locomotion.common.manager_terms.track_lin_vel_xy_exp + weight: 1.0 ``` -```bash -uv run train --algo appo --task sharpa_inhand --sim mujoco --profile hora -``` +This makes common task edits a config change: compose or disable a term, tune +its parameters, and reuse it across robots and backends without writing a new +environment class. The API follows the pinned mjlab manager semantics where +the contracts are shared, but it is a UniLab product with NumPy, Hydra, and +`NpEnvState` semantics. See the +[Manager-Based API guide](https://unilabsim.github.io/UniLab-doc/en/4-developer_guide/1-architecture/6-manager_based_api.html) +for the complete contract and known differences. -> Grasp caches auto-download from Hugging Face (`unilabsim/unilab-caches`) on first run into `src/unilab/assets/caches/`; no manual step is needed. To regenerate locally for custom scales (slow): -> ```bash -> bash scripts/sharpa_collect_grasps.sh 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 -> ``` +## Physics backends -```bash -uv run train --algo ppo --task go2_arm_manip_loco --sim motrix -uv run eval --algo ppo --task go2_arm_manip_loco --sim motrix --load-run -1 -``` +Current backends are available through `unisim-core` and the same UniLab route; +the contract is designed to grow as new adapters land: + +`mujoco` · `motrix` · `mjwarp` · `drake` · `genesis` · `isaacgym` · `isaacsim` + +Choose one backend setup (combine extras when needed): ```bash -uv run train --algo ppo --task go2_joystick_flat --sim mujoco 'training.devices=[0,1]' -uv run train --algo flashsac --task g1_walk_flat --sim mujoco training.devices="[0,1,2,3]" -uv run train --algo sac --task g1_motion_tracking --sim mujoco training.devices="[0,1,2,3,4,5,6,7]" +uv sync --extra mujoco +# uv sync --extra mujoco --extra motrix +# uv sync --extra mujoco --extra mjwarp +# uv sync --extra genesis +# make setup-drake ``` -Use `uv run train` for training, `uv run eval` for checkpoint playback, and `uv run demo` for the local demo preset. These commands keep algorithm, task, and backend selection explicit. +IsaacGym and IsaacSim use dedicated external worker environments. Backend +installation details, rendering behavior, and the evidence-based task support +matrix live in the +[backend guide](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/3-backends/0-index.html) +and [support matrix](https://unilabsim.github.io/UniLab-doc/en/5-reference/5-support_matrix.html). + +## Ecosystem -More training commands, script-level entrypoints, algorithm matrix, resume flow, and W&B details are in the [Training Guide](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/1-training/0-index.html). +UniLab is designed to be the shared product surface for robot-specific +repositories. Current downstream examples include +[MicroDuck RL](https://github.com/unilabsim/microduck_rl_unilab) and +[EngineAI RL](https://github.com/unilabsim/engineai_rl_unilab). They can ship +robot recipes independently while consuming the same task, backend, and RL +contracts. -## 📚 Documentation +## Documentation -Use the published [UniLab documentation](https://unilabsim.github.io/UniLab-doc/); start at the [English documentation index](https://unilabsim.github.io/UniLab-doc/en/0-index.html). High-signal entrypoints: +- [Documentation index](https://unilabsim.github.io/UniLab-doc/en/0-index.html) +- [Unified CLI reference](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/1-training/1-cli_reference.html) +- [Task and manager architecture](https://unilabsim.github.io/UniLab-doc/en/4-developer_guide/1-architecture/0-index.html) +- [Sim-to-sim deployment](https://unilabsim.github.io/UniLab-doc/en/3-deployment/2-sim_to_sim/1-backend_swap.html) +- [Algorithm extension recipe](https://unilabsim.github.io/UniLab-doc/en/4-developer_guide/3-extending/3-new_algorithm.html) +- [Architecture decisions](https://unilabsim.github.io/UniLab-doc/adr/ADR-0000-index.html) -- [Getting Started](https://unilabsim.github.io/UniLab-doc/en/1-getting_started/0-index.html): installation, Docker runtime, dependency setup, and first-run commands -- [Training Guide](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/1-training/0-index.html): training, playback, resume flow, Hydra overrides, and W&B -- [Simulation Backends](https://unilabsim.github.io/UniLab-doc/en/2-user_guide/3-backends/0-index.html): generated MuJoCo / Motrix support matrix -- [Development Standard](https://unilabsim.github.io/UniLab-doc/en/4-developer_guide/0-index.html): contracts, layering, and validation boundaries -- [ADR Index](https://unilabsim.github.io/UniLab-doc/adr/ADR-0000-index.html): accepted architecture decisions +For development and contribution workflows, see the +[contributing guide](CONTRIBUTING.md). -## 💬 Community +## Community

- UniLab WeChat assistant QR code + UniLab community QR code

-

Add the assistant on WeChat to join the group. Please include UniLab community in your request.

+

Add the UniLab assistant on WeChat to join the community.

-## 🧾 Citation - -### UniLab +## Citation ```bibtex @article{jia2026unilab, title = {UniLab: A Heterogeneous Architecture for Robot RL Beyond GPU-Dominant Paradigms}, - author = {Yufei Jia and Zhanxiang Cao and Mingrui Yu and Heng Zhang and Shenyu Chen and Dixuan Jiang and Meng Li and Xiaofan Li and Yiyang Liu and Junzhe Wu and Zheng Li and XiLin Fang and Tingyu Cui and Shengcheng Fu and Haoyang Li and Anqi Wang and Zifan Wang and Dongjie Zhu and Chenyu Cao and Zhenbiao Huang and Ziang Zheng and Jie Lu and Xin Ma and Zhengyang Wei and Xiang Zhao and Tianyue Zhan and Ye He and Yuxiang Chen and Yizhou Jiang and Yue Li and Haizhou Ge and Yuhang Dong and Fan Jia and Ziheng Zhang and Meng Zhang and Xiwa Deng and Zhixing Chen and Hanyang Shao and Chenxin Dong and Yixuan Li and Yizhi Chen and Bokui Chen and Kaifeng Zhang and Hanqing Cui and Yusen Qin and Ruqi Huang and Lei Han and Tiancai Wang and Xiang Li and Yue Gao and Guyue Zhou}, + author = {Jia, Yufei and Cao, Zhanxiang and Yu, Mingrui and Zhang, Heng and Chen, Shenyu and Jiang, Dixuan and Li, Meng and Li, Xiaofan and Liu, Yiyang and Wu, Junzhe and Li, Zheng and Fang, XiLin and Cui, Tingyu and Fu, Shengcheng and Li, Haoyang and Wang, Anqi and Wang, Zifan and Zhu, Dongjie and Cao, Chenyu and Huang, Zhenbiao and Zheng, Ziang and Lu, Jie and Ma, Xin and Wei, Zhengyang and Zhao, Xiang and Zhan, Tianyue and He, Ye and Chen, Yuxiang and Jiang, Yizhou and Li, Yue and Ge, Haizhou and Dong, Yuhang and Jia, Fan and Zhang, Ziheng and Zhang, Meng and Deng, Xiwa and Chen, Zhixing and Shao, Hanyang and Dong, Chenxin and Li, Yixuan and Chen, Yizhi and Chen, Bokui and Zhang, Kaifeng and Cui, Hanqing and Qin, Yusen and Huang, Ruqi and Han, Lei and Wang, Tiancai and Li, Xiang and Gao, Yue and Zhou, Guyue}, journal = {arXiv preprint arXiv:2605.30313}, year = {2026}, url = {https://arxiv.org/abs/2605.30313} } ``` -### Physics Backends +UniLab is released under the [Apache License 2.0](LICENSE). See the +independent [UniSim](https://github.com/unilabsim/unisim) and +[UniLab RL](https://github.com/unilabsim/unilab_rl) repositories for their +own release and citation information. -```bibtex -@article{jia2026mujocouni, - title = {MuJoCoUni: Persistent Batched Runtime Primitives for MuJoCo}, - author = {Jia, Yufei and Wu, Junzhe}, - journal = {arXiv preprint arXiv:2605.24922}, - year = {2026} -} +## Acknowledgments -@software{motrixsim2026, - title = {MotrixSim: A Physics Simulation Engine for Robotics and Embodied AI}, - author = {{Motphys Team}}, - year = {2026}, - url = {https://motrixsim.readthedocs.io/}, - note = {Python binary package} -} -``` +UniLab would not exist without the excellent work of the +[Isaac Lab](https://github.com/isaac-sim/IsaacLab) team and the +[mjlab](https://github.com/mujocolab/mjlab) developers and contributors. Isaac +Lab's manager-based API design and abstractions, together with mjlab's clear, +lightweight reference implementation, helped shape UniLab's Hydra and NumPy +task authoring experience. We sincerely thank both communities for sharing +their work and ideas. diff --git a/README_zh.md b/README_zh.md index 287a36309..e951e5fe0 100644 --- a/README_zh.md +++ b/README_zh.md @@ -7,225 +7,235 @@

语言:简体中文 | English

+ CI Project Page - arXiv - Paper + Paper + CoRL 2026 Documentation - Galgame - Apache-2.0 License + PyPI + Apache-2.0 License

+

🎉 🎉 UniLab 已被 CoRL 2026 接收! 🎉 🎉

+

UniLab 预告图

-

无需 GPU 仿真后端即可训练机器人 RL。预告图由 MotrixSim 渲染。

+

用同一套任务编排体验覆盖运动、操作与动作跟踪。

-从下面的 `快速演示` 开始运行主训练命令。推荐使用 `uv` 安装;Conda 和 pip 用户目前也应继续遵循 `uv` 工作流。平台相关说明与当前边界见 [安装指南](https://unilabsim.github.io/UniLab-doc/zh_CN/1-getting_started/2-installation.html)。 +UniLab 是一个完整、可配置的机器人强化学习产品。使用 Hydra 描述任务, +通过 manager term 组装任务,选择物理后端,再用统一 CLI 完成训练与评估。 +同一套面向任务的 contract 可以把 CPU、GPU 和外部 worker 仿真连接到学习器运行时。 -## ✨ 亮点 +物理适配器由独立的 +[`unisim-core`](https://github.com/unilabsim/unisim) package 提供;RL 算法及其 +runner 由 [`unilab-rl`](https://github.com/unilabsim/unilab_rl) 提供(Python +namespace 为 `uni_rl`)。UniLab 将面向用户的 task、environment、配置和实验流程 +保持在一起。 -``` -┌────────────────────┐ ┌─────────────────────────┐ -│ Uni Physics Sim │ Unified Shared Memory │ GPU Policy Training │ -│ Motrix / MuJoCo │ ─────────────────────────▶ │ PPO / SAC / TD3 │ -│ MjWarp / Drake │ SharedReplayBuffer │ CUDA / MPS / ROCm / XPU │ -└────────────────────┘ └─────────────────────────┘ +如果你刚接触 UniLab,请从[第一次成功](#第一次成功运行-demo)开始;如果你已经有任务, +直接进入[训练与评估](#训练与评估);在存在匹配 task owner 时,只需修改 `--sim` 即可尝试另一个后端。 + +## 亮点 + +```text +┌──────────────────────────────────────┐ 同一套任务 contract ┌───────────────────────────────────┐ +│ │ ────────────────────────▶ │ 按需运行任务 │ +│ 定义一次任务 │ │ MuJoCo · Motrix · MJWarp · Drake │ +│ Hydra · Managers · NumPy │ │ Genesis · IsaacGym · IsaacSim │ +│ Terms · rewards · commands │ │ CUDA · ROCm · macOS · MPS · XPU │ +│ │ │ 训练 · 评估 │ +└──────────────────────────────────────┘ └───────────────────────────────────┘ ``` -- **异构 RL 运行时:** CPU 并行仿真通过共享内存流式传输 transition,而策略学习运行在 GPU 加速器上。 -- **两套物理后端:** MuJoCoUni 和 MotrixSim 通过后端专用适配器和任务 owner 配置接入。 -- **统一训练 CLI:** `uv run train` 和 `uv run eval` 覆盖 PPO、APPO、SAC、TD3 和 FlashSAC;额外的 HORA 与 HIM-PPO 路径以脚本级工作流文档化。 -- **配置拥有的任务:** Hydra owner YAML 会同时选择 task、reward、backend 和 algorithm;后端切换通过 `task=/` 表达。 -- **跨平台安装路径:** 仓库覆盖 Linux CUDA、Linux ROCm、Linux XPU,以及 Apple Silicon / macOS 的安装流程。 - -## 🚀 快速演示 - - - - - - - - - - - - -
- dance demo -
- dance
G1 动作跟踪
-
- wallflip demo -
- wallflip
G1 空翻
-
- teaser demo -
- teaser
MotrixSim 预告图
-
- boxtracking demo -
- boxtracking
G1 箱体跟踪
-
- inhandgrasp demo -
- inhandgrasp
Sharpa 手内抓取
-
- locomani demo -
- locomani
Go2 移动操作
-
+UniLab 的核心理念很简单:将任务语义定义为可复用的配置,然后独立更换仿真器、硬件或 +learner,而无需重写任务的 environment 生命周期。 -```bash -# 0. 如果还没有安装 uv -# Linux / macOS: -curl -LsSf https://astral.sh/uv/install.sh | sh +- **配置而非编码。** action、observation、reward、termination、event、command、 + curriculum 和 metrics 都是 manager term,在 Hydra owner YAML 中组装。基于已有 term + 的任务变体无需新写 environment class,很多时候完全不需要 Python 代码。 +- **更换后端而不更换工作流。** 当前和未来的仿真器共用公开的 `SimBackend` contract。 + 使用 `--sim` 选择后端;任务编排和训练/评估工作流保持一致,后端差异由 owner YAML + 明确表达。 +- **适配手头的硬件并持续扩展。** CPU 并行仿真或外部 worker 仿真通过注入式 env contract + 和异步运行时向 accelerator learner 提供数据。算法和 runner 由统一 package 生态提供, + 不绑定单一仿真器。 + +## 开始使用 -# Windows: -# powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" -# choco install make -y +推荐使用 [`uv`](https://docs.astral.sh/uv/) 完成源码工作流。 -# 1. 克隆仓库 +```bash +curl -LsSf https://astral.sh/uv/install.sh | sh git clone https://github.com/unilabsim/UniLab.git cd UniLab -# 2. 安装依赖 -# 请按你的平台选择对应的安装命令。 -# -# 前置条件:`mujoco` extra 会在 `uv sync` 时编译原生扩展, -# 使用系统 Python 时需要 Python 开发头文件: -# Ubuntu / Debian:sudo apt-get install build-essential python3-dev -# macOS: xcode-select --install -# Windows: MSVC Build Tools -# (通过 `uv python install` 安装的 uv 托管 Python 已自带头文件。) +# 运行 Motrix demo 的最快路径。 +make setup-motrix -# Linux CUDA、macOS 或 Windows -make setup +# 完整本地环境(MuJoCo + Motrix): +# make setup -# Linux AMD / ROCm -# make sync-rocm +# 可选的平台/后端路径: +# make sync-rocm # AMD GPU +# make sync-xpu # Intel GPU +# make setup-drake # Drake + 原生 batch extension +``` -# Linux Intel Arc / iGPU -# make sync-xpu +`mujoco` extra 会编译原生扩展;使用系统 Python 时可能需要平台编译器和 Python +开发头文件。平台相关安装、可选后端和外部 worker 运行时请参阅 +[安装指南](https://unilabsim.github.io/UniLab-doc/zh_CN/1-getting_started/2-installation.html)。 -# 不使用 shell completion 设置时: -# uv sync --extra mujoco --extra motrix -# 如果没有安装或无法使用 `make`: -# uv sync --extra mujoco --extra motrix && uv run --no-sync unilab-complete install +## 第一次成功:运行 demo -# 3. 预训练 checkpoint 回放(首次运行会从 Hugging Face 下载) +```bash +# 首次运行会从 Hugging Face 下载 checkpoint 和 asset。 uv run demo dance ``` -可用的 demo 名称:`teaser`、`dance`、`wallflip`、`boxtracking`、`locomani`、`inhandgrasp`。 -完整的命令与参数请参阅 [统一 CLI](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/1-training/1-cli_reference.html) 页面。 - -> 中国大陆用户:动作、场景、机器人网格和 demo checkpoint 首次运行时会从 Hugging Face 拉取。如果 `huggingface.co` -> 无法访问,请在运行 demo 命令前先将客户端切到社区镜像: -> -> ```bash -> export HF_ENDPOINT=https://hf-mirror.com -> ``` +可用预设为 `teaser`、`dance`、`wallflip`、`boxtracking`、`locomani` 和 +`inhandgrasp`。运行 `uv run demo --help` 查看 device 和 refresh 选项。 +[快速演示指南](https://unilabsim.github.io/UniLab-doc/zh_CN/1-getting_started/1-quick_demo.html) +介绍渲染模式以及服务器/macOS 差异。 -用于训练与评估: +## 训练与评估 ```bash -uv run train --algo appo --task go2_joystick_flat --sim motrix +# 使用 Motrix 训练并回放任务。 +uv run train --algo ppo --task go2_joystick_flat --sim motrix +uv run eval --algo ppo --task go2_joystick_flat --sim motrix --load-run -1 -uv run eval --algo appo --task go2_joystick_flat --sim motrix --load-run -1 +# 对同一个任务只切换仿真器。 +uv run train --algo ppo --task go2_joystick_flat --sim mujoco -# Linux / 服务器环境下的 Motrix 无头视频导出 -uv run eval --algo appo --task go2_joystick_flat --sim motrix --load-run -1 --render-mode record +# 或使用 off-policy learner 跑同样的工作流。 +uv run train --algo sac --task g1_walk_flat --sim mujoco +uv run train --algo flashsac --task g1_walk_flat --sim mujoco + +# 无头视频导出。 +uv run eval --algo ppo --task go2_joystick_flat --sim motrix \ + --load-run -1 --render-mode record ``` -这会路由到 `go2_joystick_flat/motrix` 任务 owner 配置,并保持后端选择显式化。每个后端 owner 带一个可选的 `play_profile` 块,在 eval 时(`training.play_only=true`)叠加仅渲染相关的覆盖,不影响训练。 +路由选择始终清晰可见: -在 macOS / MacBook 上,UniLab CLI 在需要时会通过 `mxpython` 路由 Motrix 交互式回放。Motrix 默认使用交互式回放;要导出无头视频请使用 `--render-mode record`,要跳过回放请使用 `--render-mode none`。更细的脚本级命令请参阅 [训练指南](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/1-training/0-index.html)。 +```text +--algo + --task + --sim → Hydra owner YAML → 已注册的 environment +``` -## 🏃 示例运行 +在这些 flag 之后追加普通 Hydra override: ```bash -uv run train --algo sac --task g1_walk_flat --sim mujoco -uv run train --algo flashsac --task g1_walk_flat --sim mujoco +uv run train --algo ppo --task go2_joystick_flat --sim motrix \ + algo.max_iterations=1 algo.num_envs=16 training.no_play=true ``` -```bash -uv run train --algo sac --task g1_motion_tracking --sim motrix +不要通过 override `training.sim_backend` 切换引擎;它是所选 owner YAML 提供的 +identity 字段。续训、W&B、回放和完整命令矩阵请参阅 +[训练指南](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/1-training/0-index.html)。 + +## Manager-based 配置 + +UniLab 用 Hydra composition 和 NumPy runtime 包装了一套社区熟悉的 manager API。 +任务 owner 可以用声明式配置选择 term 并设置参数: + +```yaml +env: + observations: + policy: + terms: + joint_pos: + func: unilab.envs.mdp.joint_pos_rel + command: + func: unilab.envs.mdp.generated_commands + params: + command_name: twist + actions: + joint_pos: + _target_: unilab.envs.mdp.JointPositionActionCfg + entity_name: robot + scale: 0.25 +reward: + tracking_lin_vel: + func: unilab.tasks.locomotion.common.manager_terms.track_lin_vel_xy_exp + weight: 1.0 ``` -```bash -uv run train --algo appo --task sharpa_inhand --sim mujoco --profile hora -``` +这意味着常见的任务修改只需改配置:组装或禁用一个 term、调整参数,并在不同机器人和 +后端之间复用,无需新写 environment class。该 API 在共享 contract 范围内遵循 pinned +mjlab manager 语义,但它是结合 NumPy、Hydra 和 `NpEnvState` 语义的 UniLab 产品。 +完整 contract 与已知差异请参阅 +[Manager-Based API 指南](https://unilabsim.github.io/UniLab-doc/zh_CN/4-developer_guide/1-architecture/6-manager_based_api.html). -> Grasp cache 首次训练时会自动从 Hugging Face (`unilabsim/unilab-caches`) 下载到 `src/unilab/assets/caches/`,无需手动操作;如需为自定义 scale 重新生成(较慢): -> ```bash -> bash scripts/sharpa_collect_grasps.sh 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 -> ``` +## 物理后端 -```bash -uv run train --algo ppo --task go2_arm_manip_loco --sim motrix -uv run eval --algo ppo --task go2_arm_manip_loco --sim motrix --load-run -1 -``` +当前后端通过 `unisim-core` 和同一套 UniLab 路由提供;随着新 adapter 加入, +这套 contract 可以持续扩展: + +`mujoco` · `motrix` · `mjwarp` · `drake` · `genesis` · `isaacgym` · `isaacsim` + +选择一条后端安装路径(需要多个后端时组合 extras): ```bash -uv run train --algo ppo --task go2_joystick_flat --sim mujoco 'training.devices=[0,1]' -uv run train --algo flashsac --task g1_walk_flat --sim mujoco training.devices="[0,1,2,3]" -uv run train --algo sac --task g1_motion_tracking --sim mujoco training.devices="[0,1,2,3,4,5,6,7]" +uv sync --extra mujoco +# uv sync --extra mujoco --extra motrix +# uv sync --extra mujoco --extra mjwarp +# uv sync --extra genesis +# make setup-drake ``` -使用 `uv run train` 进行训练,使用 `uv run eval` 进行检查点回放,`uv run demo` 用于本地 demo 预设。这些命令可以明确指定算法、任务和后端。 +IsaacGym 和 IsaacSim 使用专用的外部 worker 环境。后端安装细节、渲染行为以及基于证据 +的 task support matrix 请参阅 +[后端指南](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/3-backends/0-index.html) +和[支持矩阵](https://unilabsim.github.io/UniLab-doc/zh_CN/5-reference/5-support_matrix.html)。 -更多训练命令、脚本级入口、算法矩阵、续训流程以及 W&B 细节请参阅 [训练指南](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/1-training/0-index.html)。 +## 生态 -## 📚 文档 +UniLab 被设计为机器人专属仓库共享的产品界面。目前的下游示例包括 +[MicroDuck RL](https://github.com/unilabsim/microduck_rl_unilab) 和 +[EngineAI RL](https://github.com/unilabsim/engineai_rl_unilab)。它们可以独立发布机器人 +recipe,同时消费同一套 task、backend 和 RL contract。 -请使用已发布的 [UniLab 文档](https://unilabsim.github.io/UniLab-doc/);中文文档入口见 [中文文档索引](https://unilabsim.github.io/UniLab-doc/zh_CN/0-index.html)。高信号入口如下: +## 文档 -- [快速上手](https://unilabsim.github.io/UniLab-doc/zh_CN/1-getting_started/0-index.html):安装、Docker 运行时、依赖配置和首次运行命令 -- [训练指南](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/1-training/0-index.html):训练、回放、续训流程、Hydra override 和 W&B -- [仿真后端](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/3-backends/0-index.html):生成的 MuJoCo / Motrix 支持矩阵 -- [开发者指南](https://unilabsim.github.io/UniLab-doc/zh_CN/4-developer_guide/0-index.html):契约、分层与验证边界 -- [ADR 索引](https://unilabsim.github.io/UniLab-doc/adr/ADR-0000-index.html):已采纳的架构决策 +- [文档索引](https://unilabsim.github.io/UniLab-doc/zh_CN/0-index.html) +- [统一 CLI 参考](https://unilabsim.github.io/UniLab-doc/zh_CN/2-user_guide/1-training/1-cli_reference.html) +- [Task 与 manager 架构](https://unilabsim.github.io/UniLab-doc/zh_CN/4-developer_guide/1-architecture/0-index.html) +- [Sim-to-sim 部署](https://unilabsim.github.io/UniLab-doc/zh_CN/3-deployment/2-sim_to_sim/1-backend_swap.html) +- [算法扩展教程](https://unilabsim.github.io/UniLab-doc/zh_CN/4-developer_guide/3-extending/3-new_algorithm.html) +- [架构决策](https://unilabsim.github.io/UniLab-doc/adr/ADR-0000-index.html) -## 💬 社群交流 +开发与贡献工作流请参阅[贡献指南](CONTRIBUTING.md)。 + +## 社区

- UniLab 小助手微信二维码 + UniLab 社区二维码

-

添加小助手微信进群,请备注:unilab交流

- -## 🧾 引用 +

添加 UniLab 小助手微信,加入社区。

-### UniLab +## 引用 ```bibtex @article{jia2026unilab, title = {UniLab: A Heterogeneous Architecture for Robot RL Beyond GPU-Dominant Paradigms}, - author = {Yufei Jia and Zhanxiang Cao and Mingrui Yu and Heng Zhang and Shenyu Chen and Dixuan Jiang and Meng Li and Xiaofan Li and Yiyang Liu and Junzhe Wu and Zheng Li and XiLin Fang and Tingyu Cui and Shengcheng Fu and Haoyang Li and Anqi Wang and Zifan Wang and Dongjie Zhu and Chenyu Cao and Zhenbiao Huang and Ziang Zheng and Jie Lu and Xin Ma and Zhengyang Wei and Xiang Zhao and Tianyue Zhan and Ye He and Yuxiang Chen and Yizhou Jiang and Yue Li and Haizhou Ge and Yuhang Dong and Fan Jia and Ziheng Zhang and Meng Zhang and Xiwa Deng and Zhixing Chen and Hanyang Shao and Chenxin Dong and Yixuan Li and Yizhi Chen and Bokui Chen and Kaifeng Zhang and Hanqing Cui and Yusen Qin and Ruqi Huang and Lei Han and Tiancai Wang and Xiang Li and Yue Gao and Guyue Zhou}, + author = {Jia, Yufei and Cao, Zhanxiang and Yu, Mingrui and Zhang, Heng and Chen, Shenyu and Jiang, Dixuan and Li, Meng and Li, Xiaofan and Liu, Yiyang and Wu, Junzhe and Li, Zheng and Fang, XiLin and Cui, Tingyu and Fu, Shengcheng and Li, Haoyang and Wang, Anqi and Wang, Zifan and Zhu, Dongjie and Cao, Chenyu and Huang, Zhenbiao and Zheng, Ziang and Lu, Jie and Ma, Xin and Wei, Zhengyang and Zhao, Xiang and Zhan, Tianyue and He, Ye and Chen, Yuxiang and Jiang, Yizhou and Li, Yue and Ge, Haizhou and Dong, Yuhang and Jia, Fan and Zhang, Ziheng and Zhang, Meng and Deng, Xiwa and Chen, Zhixing and Shao, Hanyang and Dong, Chenxin and Li, Yixuan and Chen, Yizhi and Chen, Bokui and Zhang, Kaifeng and Cui, Hanqing and Qin, Yusen and Huang, Ruqi and Han, Lei and Wang, Tiancai and Li, Xiang and Gao, Yue and Zhou, Guyue}, journal = {arXiv preprint arXiv:2605.30313}, year = {2026}, url = {https://arxiv.org/abs/2605.30313} } ``` -### 物理后端 +UniLab 以 [Apache License 2.0](LICENSE) 发布。独立的 +[UniSim](https://github.com/unilabsim/unisim) 与 +[UniLab RL](https://github.com/unilabsim/unilab_rl) 仓库包含各自的发布和引用信息。 -```bibtex -@article{jia2026mujocouni, - title = {MuJoCoUni: Persistent Batched Runtime Primitives for MuJoCo}, - author = {Jia, Yufei and Wu, Junzhe}, - journal = {arXiv preprint arXiv:2605.24922}, - year = {2026} -} +## 致谢 -@software{motrixsim2026, - title = {MotrixSim: A Physics Simulation Engine for Robotics and Embodied AI}, - author = {{Motphys Team}}, - year = {2026}, - url = {https://motrixsim.readthedocs.io/}, - note = {Python binary package} -} -``` +如果没有 [Isaac Lab](https://github.com/isaac-sim/IsaacLab) 团队以及 +[mjlab](https://github.com/mujocolab/mjlab) 开发团队和贡献者的出色工作,UniLab 不会 +成为今天的样子。Isaac Lab 在 manager-based API 设计和抽象方面的工作,以及 mjlab +清晰、轻量的参考实现,共同塑造了 UniLab 的 Hydra + NumPy 任务编排体验。衷心感谢两个 +社区分享他们的工作与想法。 diff --git a/conf/appo/task/allegro_inhand/motrix.yaml b/conf/appo/task/allegro_inhand/motrix.yaml deleted file mode 100644 index c027729a8..000000000 --- a/conf/appo/task/allegro_inhand/motrix.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# @package _global_ -training: - task_name: AllegroInhandRotation - sim_backend: motrix - play_steps: 200 - render_spacing: 0.5 - cam_distance: 1.5 - cam_lookat: [0.75, 0.75, 0] - cam_elevation: -20.0 -algo: - num_envs: 16384 - steps_per_env: 8 - max_iterations: 201 - save_interval: 100 - algorithm: - value_loss_coef: 4.0 - entropy_coef: 0.01 - learning_rate: 0.001 - desired_kl: 0.02 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - num_learning_epochs: 5 - num_mini_batches: 4 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - actor: - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - distribution_cfg: - class_name: rsl_rl.modules.distribution.GaussianDistribution - init_std: 1.0 - std_type: scalar - critic: - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true -reward: - scales: - rotate: 1.25 - obj_linvel: -0.3 - pose_diff: -0.3 - torque: -0.1 - work: -2.0 - drop: 0.0 - angvel_clip_min: -0.5 - angvel_clip_max: 0.5 - reset_z_threshold: 0.125 -env: - gen_grasp: false - max_episode_seconds: 20.0 - grasp_cache_path: caches/allegro_grasp_50k.npy - # Keep only grasp/pose reset variation. All online DR terms stay disabled. - domain_rand: - randomize_base_mass: false - random_com: false - randomize_gravity: false - push_robots: false - joint_noise: 0.0 - ball_vel_noise: 0.0 - ball_z_offset: 0.0 diff --git a/conf/appo/task/allegro_inhand/mujoco.yaml b/conf/appo/task/allegro_inhand/mujoco.yaml deleted file mode 100644 index c24a442bc..000000000 --- a/conf/appo/task/allegro_inhand/mujoco.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# @package _global_ -training: - task_name: AllegroInhandRotation - sim_backend: mujoco - play_steps: 200 - render_spacing: 0.5 - cam_distance: 0.75 - cam_lookat: [0.0, 0.0, 0.15] - cam_elevation: -25.0 - cam_azimuth: 45.0 - replay_queue_size: 4 -algo: - num_envs: 1024 - steps_per_env: 8 - max_iterations: 3000 - save_interval: 500 - algorithm: - value_loss_coef: 4.0 - entropy_coef: 0.01 - learning_rate: 0.001 - desired_kl: 0.025 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - num_learning_epochs: 5 - num_mini_batches: 4 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - actor: - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - distribution_cfg: - class_name: rsl_rl.modules.distribution.GaussianDistribution - init_std: 1.0 - std_type: scalar - critic: - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true -reward: - scales: - rotate: 1.25 - obj_linvel: -0.3 - pose_diff: -0.3 - torque: -0.1 - work: -2.0 - drop: 0.0 - angvel_clip_min: -0.5 - angvel_clip_max: 0.5 - reset_z_threshold: 0.125 -env: - gen_grasp: false - max_episode_seconds: 20.0 - grasp_cache_path: caches/allegro_grasp_50k.npy - # Keep only grasp/pose reset variation. All online DR terms stay disabled. - domain_rand: - randomize_base_mass: false - random_com: false - randomize_gravity: false - push_robots: false - joint_noise: 0.0 - ball_vel_noise: 0.0 - ball_z_offset: 0.0 diff --git a/conf/appo/task/g1_23dof_climb_tracking/motrix.yaml b/conf/appo/task/g1_23dof_climb_tracking/motrix.yaml deleted file mode 100644 index 7844addb7..000000000 --- a/conf/appo/task/g1_23dof_climb_tracking/motrix.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking23Dof - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_climb_tracking/mujoco.yaml b/conf/appo/task/g1_23dof_climb_tracking/mujoco.yaml deleted file mode 100644 index 21380ecb4..000000000 --- a/conf/appo/task/g1_23dof_climb_tracking/mujoco.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_flip_tracking/motrix.yaml b/conf/appo/task/g1_23dof_flip_tracking/motrix.yaml deleted file mode 100644 index 05098dac7..000000000 --- a/conf/appo/task/g1_23dof_flip_tracking/motrix.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking23Dof - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - steps_per_env: 24 - max_iterations: 3500 - save_interval: 500 - algorithm: - num_learning_epochs: 10 - num_mini_batches: 8 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.005 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.01 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -env: - sampling_mode: start - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_flip_tracking/mujoco.yaml b/conf/appo/task/g1_23dof_flip_tracking/mujoco.yaml deleted file mode 100644 index 6676d9360..000000000 --- a/conf/appo/task/g1_23dof_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - steps_per_env: 24 - max_iterations: 3500 - save_interval: 500 - algorithm: - entropy_coef: 0.005 - num_learning_epochs: 10 - num_mini_batches: 8 - desired_kl: 0.01 -env: - sampling_mode: start - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_motion_tracking/motrix.yaml b/conf/appo/task/g1_23dof_motion_tracking/motrix.yaml deleted file mode 100644 index aa74c1a66..000000000 --- a/conf/appo/task/g1_23dof_motion_tracking/motrix.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking23Dof - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 5000 - save_interval: 500 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_motion_tracking/mujoco.yaml b/conf/appo/task/g1_23dof_motion_tracking/mujoco.yaml deleted file mode 100644 index 3b31907a5..000000000 --- a/conf/appo/task/g1_23dof_motion_tracking/mujoco.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 5000 - save_interval: 500 - algorithm: - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_walk_flat/mujoco.yaml b/conf/appo/task/g1_23dof_walk_flat/mujoco.yaml deleted file mode 100644 index e68cd0af1..000000000 --- a/conf/appo/task/g1_23dof_walk_flat/mujoco.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: mujoco -algo: - max_iterations: 500 - save_interval: 100 -env: - control_config: - action_scale: 0.25 - curriculum: - enabled: false - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.2 - feet_phase: 1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.25 - base_height: -500.0 - orientation: -5.0 - action_rate: -0.01 - pose: -0.1 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 - min_base_height: 0.55 - max_tilt_deg: 25.0 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/appo/task/g1_23dof_wall_flip_tracking/motrix.yaml b/conf/appo/task/g1_23dof_wall_flip_tracking/motrix.yaml deleted file mode 100644 index 3b543c9c4..000000000 --- a/conf/appo/task/g1_23dof_wall_flip_tracking/motrix.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking23Dof - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 5000 - save_interval: 500 - algorithm: - num_learning_epochs: 5 - num_mini_batches: 4 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.01 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.01 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_23dof_wall_flip_tracking/mujoco.yaml b/conf/appo/task/g1_23dof_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index 0decec32d..000000000 --- a/conf/appo/task/g1_23dof_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking23Dof - sim_backend: mujoco - play_steps: 1000 - replay_queue_size: 5 -algo: - num_envs: 1024 - steps_per_env: 20 - max_iterations: 7000 - save_interval: 500 - algorithm: - num_learning_epochs: 6 - num_mini_batches: 8 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.005 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.008 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -env: - sampling_mode: start - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_climb_tracking/motrix.yaml b/conf/appo/task/g1_climb_tracking/motrix.yaml deleted file mode 100644 index ec5684fe2..000000000 --- a/conf/appo/task/g1_climb_tracking/motrix.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_climb_tracking/mujoco.yaml b/conf/appo/task/g1_climb_tracking/mujoco.yaml deleted file mode 100644 index bff7b13c8..000000000 --- a/conf/appo/task/g1_climb_tracking/mujoco.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_flip_tracking/motrix.yaml b/conf/appo/task/g1_flip_tracking/motrix.yaml deleted file mode 100644 index 9b2fd0c57..000000000 --- a/conf/appo/task/g1_flip_tracking/motrix.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - steps_per_env: 24 - max_iterations: 3500 - save_interval: 500 - algorithm: - num_learning_epochs: 10 - num_mini_batches: 8 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.005 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.01 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -env: - sampling_mode: start - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_flip_tracking/mujoco.yaml b/conf/appo/task/g1_flip_tracking/mujoco.yaml deleted file mode 100644 index 628bdbb12..000000000 --- a/conf/appo/task/g1_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - steps_per_env: 24 - max_iterations: 3500 - save_interval: 500 - algorithm: - num_learning_epochs: 10 - num_mini_batches: 8 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.005 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.01 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -env: - sampling_mode: start - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 \ No newline at end of file diff --git a/conf/appo/task/g1_motion_tracking/motrix.yaml b/conf/appo/task/g1_motion_tracking/motrix.yaml deleted file mode 100644 index eabea1ad6..000000000 --- a/conf/appo/task/g1_motion_tracking/motrix.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 5000 - save_interval: 500 -env: -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_motion_tracking/mujoco.yaml b/conf/appo/task/g1_motion_tracking/mujoco.yaml deleted file mode 100644 index ec978a19c..000000000 --- a/conf/appo/task/g1_motion_tracking/mujoco.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 5000 - save_interval: 500 - algorithm: - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 -env: -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_walk_flat/mujoco.yaml b/conf/appo/task/g1_walk_flat/mujoco.yaml deleted file mode 100644 index 0fce8bf11..000000000 --- a/conf/appo/task/g1_walk_flat/mujoco.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkFlat - sim_backend: mujoco -algo: - max_iterations: 500 - save_interval: 100 -env: - control_config: - action_scale: 0.25 - curriculum: - enabled: false - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.2 - feet_phase: 1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.25 - base_height: -500.0 - orientation: -5.0 - action_rate: -0.01 - pose: -0.1 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 - min_base_height: 0.55 - max_tilt_deg: 25.0 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/appo/task/g1_wall_flip_tracking/motrix.yaml b/conf/appo/task/g1_wall_flip_tracking/motrix.yaml deleted file mode 100644 index 83cca7b39..000000000 --- a/conf/appo/task/g1_wall_flip_tracking/motrix.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 5000 - save_interval: 500 - algorithm: - num_learning_epochs: 5 - num_mini_batches: 4 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.01 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.01 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/appo/task/g1_wall_flip_tracking/mujoco.yaml b/conf/appo/task/g1_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index 0083729c0..000000000 --- a/conf/appo/task/g1_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,93 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking - sim_backend: mujoco - play_steps: 1000 - replay_queue_size: 5 -algo: - num_envs: 1024 - steps_per_env: 20 - max_iterations: 7000 - save_interval: 500 - algorithm: - num_learning_epochs: 6 - num_mini_batches: 8 - clip_param: 0.2 - gamma: 0.99 - lam: 0.95 - value_loss_coef: 1.0 - entropy_coef: 0.005 - learning_rate: 1.0e-3 - max_grad_norm: 1.0 - use_clipped_value_loss: true - schedule: adaptive - desired_kl: 0.008 - adaptive_kl_factor: 2.0 - adaptive_lr_factor: 1.5 - optimizer: adam - tau: 1.0 - target_update_freq: 1 - vtrace_clip_rho: 1.0 - vtrace_clip_c: 1.0 - enable_compile: true -env: - sampling_mode: start - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 \ No newline at end of file diff --git a/conf/appo/task/go1_joystick_flat/motrix.yaml b/conf/appo/task/go1_joystick_flat/motrix.yaml deleted file mode 100644 index f7343fd5d..000000000 --- a/conf/appo/task/go1_joystick_flat/motrix.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickFlat - sim_backend: motrix -algo: - num_envs: 1024 - steps_per_env: 24 - max_iterations: 300 - actor: - distribution_cfg: - init_std: 0.5 - algorithm: - learning_rate: 5.0e-4 - entropy_coef: 1.0e-3 - desired_kl: 0.008 -env: - sim_dt: 0.01 - commands: - vel_limit: - - [0.5, 0.0, 0.0] - - [0.5, 0.0, 0.0] -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.015 - action_smooth: -0.01 - similar_to_default: -0.15 - swing_feet_z: 2.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/appo/task/go1_joystick_flat/mujoco.yaml b/conf/appo/task/go1_joystick_flat/mujoco.yaml deleted file mode 100644 index 8646817a5..000000000 --- a/conf/appo/task/go1_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickFlat - sim_backend: mujoco -algo: - max_iterations: 150 -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/appo/task/go2_joystick_flat/motrix.yaml b/conf/appo/task/go2_joystick_flat/motrix.yaml deleted file mode 100644 index fc4597bbd..000000000 --- a/conf/appo/task/go2_joystick_flat/motrix.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: motrix -algo: - num_envs: 512 - steps_per_env: 24 - max_iterations: 180 -env: - sim_dt: 0.015 -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - alive: 0.0 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/appo/task/go2_joystick_flat/mujoco.yaml b/conf/appo/task/go2_joystick_flat/mujoco.yaml deleted file mode 100644 index d25c356ad..000000000 --- a/conf/appo/task/go2_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: mujoco -algo: - max_iterations: 150 -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - alive: 0.0 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/appo/task/sharpa_inhand/mujoco_hora.yaml b/conf/appo/task/sharpa_inhand/mujoco_hora.yaml deleted file mode 100644 index 47aa3947a..000000000 --- a/conf/appo/task/sharpa_inhand/mujoco_hora.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# @package _global_ -# HORA Sharpa APPO variant. Inherit the shared MuJoCo owner so backend support -# and shared hyperparameters stay aligned with the non-HORA Sharpa APPO config. -defaults: - - /task/sharpa_inhand/mujoco - - _self_ - -training: - replay_queue_size: 8 - cam_distance: 0.75 - cam_lookat: [0.0, 0.0, 0.62] - cam_elevation: -25.0 - cam_azimuth: 45.0 - -interactive: - action_mode: policy - policy_obs_mode: actor - camera_distance: 0.75 - camera_elevation: -25.0 - camera_azimuth: 45.0 - use_env_visual_model: true - -algo: - algo_log_name: hora_appo - runtime_impl: hora_appo - runtime_resolver: unilab.algos.torch.hora.appo:resolve_hora_appo_runtime - num_envs: 2048 - steps_per_env: 8 - max_iterations: 305 - save_interval: 51 - obs_groups: - # Keep grouped keys explicit in the owner YAML; runtime support for these - # grouped observations lands in the next implementation step. - actor: - actor: 0 - priv_info: 0 - critic: - actor: 0 - priv_info: 0 - actor: - class_name: unilab.algos.torch.hora:HoraActorModel - priv_info_embed_dim: 9 - priv_mlp_hidden_dims: [256, 128, 9] - critic: - class_name: unilab.algos.torch.hora:HoraCriticModel - priv_info_embed_dim: 9 - priv_mlp_hidden_dims: [256, 128, 9] - algorithm: - learning_rate: 0.001 - desired_kl: 0.04 - adaptive_kl_factor: 1.2 - adaptive_lr_factor: 1.1 - -env: - use_default_object_pose_for_object_pos_anchor: true - obs: - observation_mode: separated - domain_rand: - randomize_friction: true - randomize_friction_scale_lower: 0.75 - randomize_friction_scale_upper: 1.25 - elastomer_base_friction: 2.0 - metal_base_friction: 1.0 - object_base_friction: 2.0 diff --git a/conf/offpolicy/algo/flashsac.yaml b/conf/offpolicy/algo/flashsac.yaml deleted file mode 100644 index 05f4d05cc..000000000 --- a/conf/offpolicy/algo/flashsac.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# @package _global_ -algo: - algo: flashsac - algo_log_name: flash_sac - load_run: "-1" - seed: 1 - num_envs: 1024 - batch_size: 2048 - replay_buffer_n: 512 - updates_per_step: 2 - learning_starts: 98 - policy_frequency: 2 - max_iterations: 5000 - save_interval: 1000 - gamma: 0.97 - tau: 0.01 - actor_lr: 3.0e-4 - critic_lr: 3.0e-4 - actor_hidden_dim: 128 - critic_hidden_dim: 256 - num_atoms: 101 - obs_normalization: false - use_layer_norm: false - algo_params: - normalize_reward: true - normalized_g_max: 5.0 - actor_num_blocks: 2 - critic_num_blocks: 2 - actor_bc_alpha: 0.0 - actor_noise_zeta_mu: 2.0 - actor_noise_zeta_max: 16 - critic_min_v: -5.0 - critic_max_v: 5.0 - temp_initial_value: 0.01 - temp_target_sigma: 0.15 - temp_target_entropy: null - learning_rate_init: 3.0e-4 - learning_rate_peak: 3.0e-4 - learning_rate_end: 1.5e-4 - learning_rate_warmup_steps: 0 - learning_rate_decay_steps: 500000 - n_step: 1 - amp_dtype: auto - use_compile: true - use_cuda_graph_critic: false - use_cuda_graph_actor: false - use_cuda_graph_critic_packed_staging: false - use_cuda_graph_actor_packed_staging: false diff --git a/conf/offpolicy/algo/sac.yaml b/conf/offpolicy/algo/sac.yaml deleted file mode 100644 index 4e6efeeb0..000000000 --- a/conf/offpolicy/algo/sac.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# @package _global_ -algo: - algo: sac - algo_log_name: fast_sac - runtime_impl: null - runtime_resolver: null - load_run: "-1" - seed: 1 - num_envs: 4096 - # Learner batch size for one SAC update. Symmetry may sample fewer replay rows - # and expand them inside the learner. - batch_size: 8192 - replay_buffer_n: 512 - updates_per_step: 4 - learning_starts: 1 - policy_frequency: 4 - max_iterations: 500 - save_interval: 500 - gamma: 0.97 - tau: 0.125 - actor_lr: 3.0e-4 - critic_lr: 3.0e-4 - actor_hidden_dim: 512 - critic_hidden_dim: 768 - num_atoms: 101 - obs_normalization: false - use_layer_norm: true - use_symmetry: false - actor: {} - algo_params: - alpha_lr: 3.0e-4 - alpha_init: 0.01 - target_entropy_ratio: 0.0 - max_grad_norm: 0.0 - amp_dtype: auto - use_compile: true - use_cuda_graph_critic: false - use_cuda_graph_actor: false - use_cuda_graph_critic_packed_staging: false - use_cuda_graph_actor_packed_staging: false diff --git a/conf/offpolicy/algo/td3.yaml b/conf/offpolicy/algo/td3.yaml deleted file mode 100644 index 3d217abc7..000000000 --- a/conf/offpolicy/algo/td3.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# @package algo -algo: td3 -algo_log_name: fast_td3 -load_run: "-1" -seed: 1 -num_envs: 4096 -batch_size: 8192 -replay_buffer_n: 1000 -updates_per_step: 4 -learning_starts: 1 -policy_frequency: 2 -max_iterations: 5000 -save_interval: 500 -gamma: 0.97 -tau: 0.1 -actor_lr: 3.0e-4 -critic_lr: 3.0e-4 -actor_hidden_dim: 512 -critic_hidden_dim: 1024 -num_atoms: 101 -obs_normalization: true -use_layer_norm: false -algo_params: - weight_decay: 0.1 - v_min: -10.0 - v_max: 10.0 - init_scale: 0.01 - log_std_min: -1.6 - log_std_max: -0.22 - policy_noise: 0.2 - noise_clip: 0.5 - use_cdq: true diff --git a/conf/offpolicy/config.yaml b/conf/offpolicy/config.yaml deleted file mode 100644 index 908b3cb53..000000000 --- a/conf/offpolicy/config.yaml +++ /dev/null @@ -1,105 +0,0 @@ -defaults: - - _self_ - - algo: sac - - task: ${algo}/g1_walk_flat/mujoco - -training: - task_name: G1WalkFlat - # list[int] | null; null/[] = auto-selected single-device behavior; - # [d0] = explicit single CUDA device; [d0..dN-1] = N-way data parallel, - # rank i trains on cuda:devices[i]. - devices: null - # list[list[int]] | null; one CPU-id segment per rank for the collector's - # MuJoCo pool; null = auto partition of cpu_count // world_size per rank. - dp_collector_cpu_ids: null - logger: tensorboard - wandb_project: unilab - wandb_entity: null - wandb_group: null - wandb_job_type: null - wandb_name: null - wandb_tags: [] - wandb_notes: null - wandb_mode: null - sim_backend: mujoco - nan_guard: - enabled: true - buffer_size: 100 - max_envs_to_dump: 5 - output_dir: null - use_amp: true - play_only: false - no_play: false - sim2sim_strict: true - play_render_mode: auto - export_onnx: true - play_env_num: 16 - play_steps: 800 - cam_distance: 6.0 - cam_elevation: -20.0 - cam_azimuth: 90.0 - log_root: null - log_dir: null - env_steps_per_sync: 1 - trace_enabled: false - trace_output_dir: null - trace_thread_time: false - trace_cuda_events: true - nvtx_profile_ranges: false - replay_prefetch_mode: one_tick - torch_threads: - enabled: true - # "auto" resolves per process role from host CPU count with conservative caps. - # Override these from Hydra when benchmarking a specific machine. - learner_num_threads: auto - collector_num_threads: auto - learner_num_interop_threads: 1 - collector_num_interop_threads: 1 - compile_threads: auto - set_env_vars: true - -interactive: - action_mode: zero - policy_obs_mode: auto - show_target_bodies: false - show_reward_debug: false - target_show_axes: false - target_body_names: "" - target_max_bodies: 0 - target_marker_radius: 0.02 - target_axis_length: 0.08 - target_marker_alpha: 0.75 - reward_debug_show_velocity: false - reward_debug_lin_vel_scale: 0.08 - reward_debug_ang_vel_scale: 0.05 - reward_debug_show_connectors: false - reward_debug_show_global_anchor: false - camera_follow_body: true - camera_focus_body_name: "" - camera_height_offset: 0.15 - camera_distance: null - camera_elevation: null - camera_azimuth: null - use_env_visual_model: true - speed: 1.0 - start_paused: false - keyboard: false - keyboard_step_lin: 0.1 - keyboard_step_ang: 0.2 - -env: - post_step_forward_sensor: false - # adaptive_chunk_size: auto-tune the MuJoCo BatchEnvPool chunk_size at materialize - # (cache-backed). chunk_size (int) manually overrides and wins; null => use default. - adaptive_chunk_size: true - chunk_size: null - -hydra: - run: - dir: . - output_subdir: null - job: - chdir: false - job_logging: - root: - handlers: [console] diff --git a/conf/offpolicy/task/flashsac/g1_23dof_walk_flat/motrix.yaml b/conf/offpolicy/task/flashsac/g1_23dof_walk_flat/motrix.yaml deleted file mode 100644 index d1698fb4c..000000000 --- a/conf/offpolicy/task/flashsac/g1_23dof_walk_flat/motrix.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# @package _global_ -# Motrix owner for FlashSAC G1 23-DoF walk flat. -# Mirrors 29-DoF flashsac/g1_walk_flat/motrix.yaml: -# - Keeps the mujoco owner's FlashSAC algo identity -# - Adopts the Motrix-direction env + reward tuning (kp/kd rand off, retuned shaping) -training: - task_name: G1Walk23DofFlat - sim_backend: motrix -algo: - num_envs: 4096 - learning_starts: 49 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - replay_buffer_n: 256 - tau: 0.05 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 2.2 - tracking_ang_vel: 1.8 - penalty_ang_vel_xy: -1.2 - penalty_orientation: -12.0 - penalty_action_rate: -2.5 - pose: -0.6 - penalty_feet_ori: -5.0 - feet_phase: 6.0 - alive: 12.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - close_feet_threshold: 0.15 - pose_weights: [0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/flashsac/g1_23dof_walk_flat/mujoco.yaml b/conf/offpolicy/task/flashsac/g1_23dof_walk_flat/mujoco.yaml deleted file mode 100644 index 34e63d24d..000000000 --- a/conf/offpolicy/task/flashsac/g1_23dof_walk_flat/mujoco.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: mujoco -algo: - num_envs: 4096 - learning_starts: 49 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - #use_symmetry: true - replay_buffer_n: 256 - tau: 0.05 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -5.0 - pose: -0.5 - penalty_feet_ori: -25.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.005 - close_feet_threshold: 0.15 - pose_weights: [0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/flashsac/g1_walk_flat/mjwarp.yaml b/conf/offpolicy/task/flashsac/g1_walk_flat/mjwarp.yaml deleted file mode 100644 index 4a7602acb..000000000 --- a/conf/offpolicy/task/flashsac/g1_walk_flat/mjwarp.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# @package _global_ -# Configured-only mjwarp owner for FlashSAC G1 walk flat. Mirrors the mujoco -# owner's algo / env / reward identity; mjwarp-specific host-adapter settings -# follow conf/offpolicy/task/sac/g1_walk_flat/mjwarp.yaml. Offline record -# reuses MuJoCo rendering; native playback and device-resident runtime are absent. -training: - task_name: G1WalkFlat - sim_backend: mjwarp - play_render_mode: record -algo: - num_envs: 4096 - learning_starts: 49 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - #use_symmetry: true - replay_buffer_n: 256 - tau: 0.05 -env: - mjwarp_nconmax: 128 - mjwarp_njmax: 256 - render_spacing: 2.0 - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - randomize_dof_armature: false - randomize_body_gravity_compensation: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -5.0 - pose: -0.5 - penalty_feet_ori: -25.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.005 - close_feet_threshold: 0.15 - pose_weights: [0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/flashsac/g1_walk_flat/motrix.yaml b/conf/offpolicy/task/flashsac/g1_walk_flat/motrix.yaml deleted file mode 100644 index 5f61c51b6..000000000 --- a/conf/offpolicy/task/flashsac/g1_walk_flat/motrix.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# @package _global_ -# Motrix owner for FlashSAC G1 walk flat. -# Keeps the mujoco owner's FlashSAC algo identity (num_envs/updates_per_step/ -# replay_buffer_n/tau plus the distributional critic from conf/offpolicy/algo/flashsac.yaml) -# while adopting the Motrix-direction env + reward tuning used by the SAC motrix owner -# (kp/kd randomization off, retuned reward shaping, tighter feet-phase sigma). -# control_config.action_scale stays 1.0 to keep sim2sim DENYLIST parity with mujoco. -training: - task_name: G1WalkFlat - sim_backend: motrix -algo: - num_envs: 4096 - learning_starts: 49 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - replay_buffer_n: 256 - tau: 0.05 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.2 - tracking_ang_vel: 1.8 - penalty_ang_vel_xy: -1.2 - penalty_orientation: -12.0 - penalty_action_rate: -2.5 - pose: -0.6 - penalty_feet_ori: -5.0 - feet_phase: 6.0 - alive: 12.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - close_feet_threshold: 0.15 - pose_weights: [0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/flashsac/g1_walk_flat/mujoco.yaml b/conf/offpolicy/task/flashsac/g1_walk_flat/mujoco.yaml deleted file mode 100644 index 35624c3b6..000000000 --- a/conf/offpolicy/task/flashsac/g1_walk_flat/mujoco.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkFlat - sim_backend: mujoco -algo: - num_envs: 4096 - learning_starts: 49 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - #use_symmetry: true - replay_buffer_n: 256 - tau: 0.05 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -5.0 - pose: -0.5 - penalty_feet_ori: -25.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.005 - close_feet_threshold: 0.15 - pose_weights: [0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 0.01, 2.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/flashsac/go2_joystick_flat/mujoco.yaml b/conf/offpolicy/task/flashsac/go2_joystick_flat/mujoco.yaml deleted file mode 100644 index 031d8e2b7..000000000 --- a/conf/offpolicy/task/flashsac/go2_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: mujoco -algo: - num_envs: 1024 - learning_starts: 50 - max_iterations: 4000 - save_interval: 1000 - updates_per_step: 2 - batch_size: 2048 - replay_buffer_n: 4096 - tau: 0.05 -env: - control_config: - action_scale: 0.4 - domain_rand: - randomize_kp: true - randomize_kd: true - randomize_base_mass: true - random_com: true - randomize_gravity: true - push_robots: true - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -20.0 - action_rate: -0.02 - similar_to_default: -0.4 - contact: 1.5 - swing_feet_z: 4.0 - tracking_sigma: 0.4 - base_height_target: 0.3 \ No newline at end of file diff --git a/conf/offpolicy/task/sac/g1_23dof_flip_tracking/mujoco.yaml b/conf/offpolicy/task/sac/g1_23dof_flip_tracking/mujoco.yaml deleted file mode 100644 index f48e6108a..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTrackingSAC23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 4096 - max_iterations: 25000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.05 - max_grad_norm: 10.0 -env: - sampling_mode: mixed - sampling_start_ratio: 0.1 - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/offpolicy/task/sac/g1_23dof_motion_tracking/motrix.yaml b/conf/offpolicy/task/sac/g1_23dof_motion_tracking/motrix.yaml deleted file mode 100644 index e042ee799..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_motion_tracking/motrix.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# @package _global_ -# G1 23-DoF Motion Tracking SAC — Motrix variant for sim2sim eval. -# Inherits the mujoco training config in full and only switches the rendering -# backend so checkpoints trained on mujoco can be replayed via motrix's native -# renderer (`eval --sim motrix`). Training on motrix is not the intended path. -defaults: - - /task/sac/g1_23dof_motion_tracking/mujoco - - _self_ - -training: - task_name: G1MotionTrackingSAC23Dof - sim_backend: motrix -env: - # motrix backend's kp/kd override path is broken on column slices, and DR - # is not desirable during deterministic sim2sim eval anyway. Match the - # `g1_walk_flat/motrix.yaml` convention by switching them off. - domain_rand: - randomize_kp: false - randomize_kd: false diff --git a/conf/offpolicy/task/sac/g1_23dof_motion_tracking/mujoco.yaml b/conf/offpolicy/task/sac/g1_23dof_motion_tracking/mujoco.yaml deleted file mode 100644 index a68d07fae..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_motion_tracking/mujoco.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTrackingSAC23Dof - sim_backend: mujoco -algo: - num_envs: 2048 - max_iterations: 25000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.1 - target_entropy_ratio: 0.5 - max_grad_norm: 10.0 -env: - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - truncate_on_clip_end: true - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -2.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/offpolicy/task/sac/g1_23dof_walk_flat/motrix.yaml b/conf/offpolicy/task/sac/g1_23dof_walk_flat/motrix.yaml deleted file mode 100644 index d67013177..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_walk_flat/motrix.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: motrix -algo: - num_envs: 2048 - learning_starts: 1 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: false - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 -reward: - scales: - tracking_lin_vel: 2.2 - tracking_ang_vel: 1.8 - penalty_ang_vel_xy: -1.2 - penalty_orientation: -12.0 - penalty_action_rate: -2.5 - pose: -0.6 - penalty_feet_ori: -5.0 - feet_phase: 6.0 - alive: 12.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_23dof_walk_flat/mujoco.yaml b/conf/offpolicy/task/sac/g1_23dof_walk_flat/mujoco.yaml deleted file mode 100644 index 1f2ca273c..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_walk_flat/mujoco.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: mujoco -algo: - num_envs: 2048 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: true - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_23dof_walk_rough/motrix.yaml b/conf/offpolicy/task/sac/g1_23dof_walk_rough/motrix.yaml deleted file mode 100644 index 844fb2f2a..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_walk_rough/motrix.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofRough - sim_backend: motrix -algo: - num_envs: 2048 - learning_starts: 1 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: false - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - sim_dt: 0.01 - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 -reward: - scales: - tracking_lin_vel: 2.2 - tracking_ang_vel: 1.8 - penalty_ang_vel_xy: -1.2 - penalty_orientation: -12.0 - penalty_action_rate: -2.5 - pose: -0.6 - penalty_feet_ori: -5.0 - feet_phase: 6.0 - alive: 12.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_23dof_walk_rough/mujoco.yaml b/conf/offpolicy/task/sac/g1_23dof_walk_rough/mujoco.yaml deleted file mode 100644 index 16689327b..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_walk_rough/mujoco.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofRough - sim_backend: mujoco -algo: - num_envs: 2048 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: true - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_23dof_wall_flip_tracking/mujoco.yaml b/conf/offpolicy/task/sac/g1_23dof_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index f67d34d2e..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTrackingSAC23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 4096 - max_iterations: 25000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.0 - max_grad_norm: 10.0 -env: - sampling_mode: uniform - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 1000000000.0 - ee_body_pos_z_threshold: 1000000000.0 - terminate_on_undesired_contacts: false - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/offpolicy/task/sac/g1_23dof_wbt_obs/mujoco.yaml b/conf/offpolicy/task/sac/g1_23dof_wbt_obs/mujoco.yaml deleted file mode 100644 index d0623bad2..000000000 --- a/conf/offpolicy/task/sac/g1_23dof_wbt_obs/mujoco.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# @package _global_ -training: - task_name: G1WBTObs23Dof - sim_backend: mujoco -algo: - num_envs: 4096 - max_iterations: 140000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.1 - target_entropy_ratio: 0.5 - max_grad_norm: 10.0 -env: - sim_dt: 0.005 - sensor: - local_linvel: pelvis_local_linvel - gyro: pelvis_gyro - upvector: pelvis_upvector - control_config: - action_scale: 2.0 - simulate_action_latency: true - anchor_pos_z_threshold: 0.40 - ee_body_pos_z_threshold: 0.5 - truncate_on_clip_end: true - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.5 - scale_gyro: 0.2 - enable_zero_linvel: true - enable_zero_anchor_pos: true - enable_anchor_ori_noise: true - scale_anchor_ori: 0.05 - obs_history_length: 5 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 1.0] - random_com: true - com_offset_x: [-0.05, 0.05] - randomize_com_y: true - com_offset_y: [-0.05, 0.05] - randomize_com_z: true - com_offset_z: [-0.05, 0.05] - randomize_gravity: false - gravity_range: [[0.0, 0.0, -9.81], [0.0, 0.0, -9.81]] - push_robots: true - push_interval: 200 - max_force: [300.0, 300.0, 120.0] - push_body_name: null - randomize_kp: true - kp_multiplier_range: [0.9, 1.1] - randomize_kd: true - kd_multiplier_range: [0.85, 1.15] - randomize_geom_friction: true - friction_range: [0.3, 1.2] - friction_geom_pattern: "^(left|right)_foot[1-7]_collision$" - enable_encoder_bias: true - encoder_bias_range: [-0.01, 0.01] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 1.0 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -5.0 - undesired_contacts: -0.1 - joint_acc_l2: -2.5e-7 - joint_torque_l2: -1e-5 diff --git a/conf/offpolicy/task/sac/g1_flip_tracking/mujoco.yaml b/conf/offpolicy/task/sac/g1_flip_tracking/mujoco.yaml deleted file mode 100644 index 48a956b4f..000000000 --- a/conf/offpolicy/task/sac/g1_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTrackingSAC - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 4096 - max_iterations: 25000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.05 - max_grad_norm: 10.0 -env: - sampling_mode: mixed - sampling_start_ratio: 0.1 - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/offpolicy/task/sac/g1_motion_tracking/motrix.yaml b/conf/offpolicy/task/sac/g1_motion_tracking/motrix.yaml deleted file mode 100644 index eddb1839f..000000000 --- a/conf/offpolicy/task/sac/g1_motion_tracking/motrix.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# @package _global_ -# G1 Whole-Body Tracking (WBT) FastSAC — Motrix variant for sim2sim eval. -# Inherits the mujoco training config in full and only switches the rendering -# backend so checkpoints trained on mujoco can be replayed via motrix's native -# renderer (`eval --sim motrix`). Training on motrix is not the intended path. -defaults: - - /task/sac/g1_motion_tracking/mujoco - - _self_ - -training: - task_name: G1MotionTrackingSAC - sim_backend: motrix -env: - # motrix backend's kp/kd override path is broken on column slices, and DR - # is not desirable during deterministic sim2sim eval anyway. Match the - # `g1_walk_flat/motrix.yaml` convention by switching them off. - domain_rand: - randomize_kp: false - randomize_kd: false diff --git a/conf/offpolicy/task/sac/g1_motion_tracking/mujoco.yaml b/conf/offpolicy/task/sac/g1_motion_tracking/mujoco.yaml deleted file mode 100644 index 598feccbb..000000000 --- a/conf/offpolicy/task/sac/g1_motion_tracking/mujoco.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# @package _global_ -# G1 Whole-Body Tracking (WBT) with FastSAC on MuJoCo. -# Hyperparameters aligned with holosoma g1-29dof-wbt-fast-sac. -training: - task_name: G1MotionTrackingSAC - sim_backend: mujoco -algo: - num_envs: 2048 - max_iterations: 25000 - save_interval: 1000 - # --- holosoma WBT-specific overrides (vs sac.yaml defaults) --- - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.1 - target_entropy_ratio: 0.5 - max_grad_norm: 10.0 -env: - control_config: - action_scale: 2.0 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - truncate_on_clip_end: true - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 - seed: null -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -2.0 - undesired_contacts: -0.1 diff --git a/conf/offpolicy/task/sac/g1_walk_flat/mjwarp.yaml b/conf/offpolicy/task/sac/g1_walk_flat/mjwarp.yaml deleted file mode 100644 index dc9e23014..000000000 --- a/conf/offpolicy/task/sac/g1_walk_flat/mjwarp.yaml +++ /dev/null @@ -1,66 +0,0 @@ -# @package _global_ -# Configured-only SAC owner for the mjwarp host adapter. Offline record reuses -# MuJoCo rendering; native playback and device-resident runtime are absent. -training: - task_name: G1WalkFlat - sim_backend: mjwarp - play_render_mode: record -algo: - num_envs: 2048 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: true - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - mjwarp_nconmax: 128 - mjwarp_njmax: 256 - render_spacing: 2.0 - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - randomize_dof_armature: false - randomize_body_gravity_compensation: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_walk_flat/motrix.yaml b/conf/offpolicy/task/sac/g1_walk_flat/motrix.yaml deleted file mode 100644 index a193eeb51..000000000 --- a/conf/offpolicy/task/sac/g1_walk_flat/motrix.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkFlat - sim_backend: motrix -algo: - num_envs: 2048 - learning_starts: 1 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: false - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 0.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.2 - tracking_ang_vel: 1.8 - penalty_ang_vel_xy: -1.2 - penalty_orientation: -12.0 - penalty_action_rate: -2.5 - pose: -0.6 - penalty_feet_ori: -5.0 - feet_phase: 6.0 - alive: 12.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_walk_flat/mujoco.yaml b/conf/offpolicy/task/sac/g1_walk_flat/mujoco.yaml deleted file mode 100644 index 0b0e2d4bd..000000000 --- a/conf/offpolicy/task/sac/g1_walk_flat/mujoco.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkFlat - sim_backend: mujoco -algo: - num_envs: 2048 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: true - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_walk_rough/motrix.yaml b/conf/offpolicy/task/sac/g1_walk_rough/motrix.yaml deleted file mode 100644 index 4144b1713..000000000 --- a/conf/offpolicy/task/sac/g1_walk_rough/motrix.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkRough - sim_backend: motrix -algo: - num_envs: 2048 - learning_starts: 1 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: false - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - sim_dt: 0.01 - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 -reward: - scales: - tracking_lin_vel: 2.2 - tracking_ang_vel: 1.8 - penalty_ang_vel_xy: -1.2 - penalty_orientation: -12.0 - penalty_action_rate: -2.5 - pose: -0.6 - penalty_feet_ori: -5.0 - feet_phase: 6.0 - alive: 12.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_walk_rough/mujoco.yaml b/conf/offpolicy/task/sac/g1_walk_rough/mujoco.yaml deleted file mode 100644 index bd9a1282a..000000000 --- a/conf/offpolicy/task/sac/g1_walk_rough/mujoco.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkRough - sim_backend: mujoco -algo: - num_envs: 2048 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - use_symmetry: true - algo_params: - alpha_init: 0.001 - target_entropy_ratio: 0.0 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/sac/g1_wall_flip_tracking/mujoco.yaml b/conf/offpolicy/task/sac/g1_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index da48802f1..000000000 --- a/conf/offpolicy/task/sac/g1_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTrackingSAC - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 4096 - max_iterations: 25000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.0 - max_grad_norm: 10.0 -env: - sampling_mode: uniform - truncate_on_clip_end: true - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 1000000000.0 - ee_body_pos_z_threshold: 1000000000.0 - terminate_on_undesired_contacts: false - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/offpolicy/task/sac/g1_wbt_obs/mujoco.yaml b/conf/offpolicy/task/sac/g1_wbt_obs/mujoco.yaml deleted file mode 100644 index 5fd91fc07..000000000 --- a/conf/offpolicy/task/sac/g1_wbt_obs/mujoco.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# @package _global_ -training: - task_name: G1WBTObs - sim_backend: mujoco -algo: - num_envs: 4096 - max_iterations: 140000 - save_interval: 1000 - gamma: 0.99 - tau: 0.05 - num_atoms: 501 - updates_per_step: 4 - policy_frequency: 2 - use_symmetry: false - algo_params: - alpha_init: 0.1 - target_entropy_ratio: 0.5 - max_grad_norm: 10.0 -env: - sim_dt: 0.005 - sensor: - local_linvel: pelvis_local_linvel - gyro: pelvis_gyro - upvector: pelvis_upvector - control_config: - action_scale: 2.0 - simulate_action_latency: true - anchor_pos_z_threshold: 0.40 - ee_body_pos_z_threshold: 0.5 - truncate_on_clip_end: true - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.5 - scale_gyro: 0.2 - enable_zero_linvel: true - enable_zero_anchor_pos: true - enable_anchor_ori_noise: true - scale_anchor_ori: 0.05 - obs_history_length: 5 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 1.0] - random_com: true - com_offset_x: [-0.05, 0.05] - randomize_com_y: true - com_offset_y: [-0.05, 0.05] - randomize_com_z: true - com_offset_z: [-0.05, 0.05] - randomize_gravity: false - gravity_range: [[0.0, 0.0, -9.81], [0.0, 0.0, -9.81]] - push_robots: true - push_interval: 200 - max_force: [300.0, 300.0, 120.0] - push_body_name: null - randomize_kp: true - kp_multiplier_range: [0.9, 1.1] - randomize_kd: true - kd_multiplier_range: [0.85, 1.15] - randomize_geom_friction: true - friction_range: [0.3, 1.2] - friction_geom_pattern: "^(left|right)_foot[1-7]_collision$" - enable_encoder_bias: true - encoder_bias_range: [-0.01, 0.01] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 1.0 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -5.0 - undesired_contacts: -0.1 - joint_acc_l2: -2.5e-7 - joint_torque_l2: -1e-5 diff --git a/conf/offpolicy/task/sac/go2_footstand/drake.yaml b/conf/offpolicy/task/sac/go2_footstand/drake.yaml deleted file mode 100644 index 31035486b..000000000 --- a/conf/offpolicy/task/sac/go2_footstand/drake.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# @package _global_ -training: - task_name: Go2FootStand - sim_backend: drake - no_play: true - play_steps: 400 - play_env_num: 1 - play_render_mode: record - -algo: - algo_log_name: fast_sac_drake - num_envs: 512 - batch_size: 1024 - replay_buffer_n: 512 - updates_per_step: 2 - learning_starts: 2 - max_iterations: 300 - save_interval: 100 - actor_hidden_dim: 256 - critic_hidden_dim: 512 - obs_normalization: true - use_layer_norm: true - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.0 - use_compile: false - -env: - sim_dt: 0.004 - drake_backend_mode: batch - drake_nthread: 20 - add_body_sensors: true - obs_history_len: 15 - energy_termination_threshold: 200.0 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 - scale_gravity: 0.05 - scale_linvel: 0.1 - control_config: - action_scale: 0.3 - domain_rand: - randomize_floor_friction: false - randomize_link_mass: false - torso_added_mass_range: null - randomize_torso_com: false - randomize_dof_armature: false - randomize_reset_joint_qpos: true - reset_joint_qpos_range: [-0.05, 0.05] - -reward: - scales: - height: 2.0 - orientation: 2.0 - contact: -1.0 - action_rate: -0.01 - termination: -2.0 - dof_pos_limits: -0.5 - torques: 0.0 - pose: -0.1 - penalty_contact: -0.2 - tar: 0.8 - rear_feet_contact: 0.5 - rear_leg_symmetry: -0.2 - front_leg_motion: -0.05 - upright_stability: -0.2 - knee_clearance: -0.5 - stay_still: -0.1 - energy: -0.003 - dof_acc: -2.5e-7 - tracking_sigma: 0.25 - base_height_target: 0.3 - knee_height_target: 0.08 diff --git a/conf/offpolicy/task/sac/go2_joystick_flat/drake.yaml b/conf/offpolicy/task/sac/go2_joystick_flat/drake.yaml deleted file mode 100644 index 6829cfe93..000000000 --- a/conf/offpolicy/task/sac/go2_joystick_flat/drake.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: drake - no_play: true - play_steps: 400 - play_env_num: 1 - play_render_mode: record - -algo: - algo_log_name: fast_sac_drake - num_envs: 512 - batch_size: 1024 - replay_buffer_n: 512 - updates_per_step: 2 - learning_starts: 2 - max_iterations: 300 - save_interval: 100 - actor_hidden_dim: 256 - critic_hidden_dim: 512 - obs_normalization: true - use_layer_norm: true - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.0 - use_compile: false - -env: - drake_backend_mode: batch - drake_nthread: 20 - scene: - model_file: src/unilab/assets/robots/go2/scene_flat.xml - domain_rand: - randomize_kp: false - randomize_kd: false - push_robots: false - -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/offpolicy/task/sac/go2w_joystick_flat/drake.yaml b/conf/offpolicy/task/sac/go2w_joystick_flat/drake.yaml deleted file mode 100644 index fa05273e4..000000000 --- a/conf/offpolicy/task/sac/go2w_joystick_flat/drake.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# @package _global_ -training: - task_name: Go2WJoystickFlat - sim_backend: drake - no_play: true - play_steps: 400 - play_env_num: 1 - play_render_mode: record - -algo: - algo_log_name: fast_sac_drake - num_envs: 512 - batch_size: 1024 - replay_buffer_n: 512 - updates_per_step: 2 - learning_starts: 2 - max_iterations: 300 - save_interval: 100 - actor_hidden_dim: 256 - critic_hidden_dim: 512 - obs_normalization: true - use_layer_norm: true - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.0 - use_compile: false - -env: - drake_backend_mode: batch - drake_nthread: 20 - scene: - model_file: src/unilab/assets/robots/go2w/scene_flat.xml - commands: - vel_limit: - - [0.0, 0.0, -1.0] - - [1.0, 0.0, 1.0] - control_config: - action_scale: 0.5 - wheel_action_scale: 10.0 - Kp: 50.0 - Kd: 1.5 - wheel_Kd: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - push_robots: false - -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.75 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - orientation: -2.0 - action_rate: -0.005 - similar_to_default: -0.5 - torques: -0.0002 - wheel_vel: 0.0 - alive: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.4 diff --git a/conf/offpolicy/task/sac/sharpa_inhand/mujoco_hora.yaml b/conf/offpolicy/task/sac/sharpa_inhand/mujoco_hora.yaml deleted file mode 100644 index aa69445f8..000000000 --- a/conf/offpolicy/task/sac/sharpa_inhand/mujoco_hora.yaml +++ /dev/null @@ -1,121 +0,0 @@ -# @package _global_ -# HORA Sharpa SAC MuJoCo teacher-training owner config. - -training: - task_name: SharpaInhandRotation - sim_backend: mujoco - use_amp: true - env_steps_per_sync: 2 - no_play: true - play_steps: 200 - render_spacing: 0.5 - cam_distance: 1.5 - cam_lookat: [0.75, 0.75, 0.4] - cam_elevation: -20.0 - -interactive: - action_mode: policy - policy_obs_mode: actor - camera_distance: 1.5 - camera_elevation: -20.0 - camera_azimuth: 90.0 - use_env_visual_model: true - -algo: - algo_log_name: hora_sac - runtime_impl: hora_sac - runtime_resolver: unilab.algos.torch.hora.sac:resolve_hora_sac_runtime - num_envs: 1024 - batch_size: 2048 - replay_buffer_n: 1280 - updates_per_step: 14 - learning_starts: 1 - policy_frequency: 2 - max_iterations: 5371 - save_interval: 896 - actor_lr: 4.5e-4 - critic_lr: 4.5e-4 - use_symmetry: false - actor: - priv_info_embed_dim: 9 - priv_mlp_hidden_dims: [256, 128, 9] - algo_params: - alpha_lr: 4.5e-4 - amp_dtype: auto - use_compile: true - -reward: - scales: - rotate: 2.5 - obj_linvel: -0.3 - pose_diff: -0.4 - torque: -0.1 - work: -0.5 - object_pos: 0.003 - angvel_clip_min: -0.5 - angvel_clip_max: 0.5 - -env: - post_step_forward_sensor: true - zero_action_test_mode: false - clip_obs: 5.0 - clip_actions: 1.0 - reset_height_lower: 0.59906 - reset_height_upper: 0.63906 - reset_angle_diff: 0.7853981633974483 - rot_axis: [0.0, 0.0, 1.0] - grasp_cache_path: caches/sharpa_grasp_linspace - sensor: - tactile_force_sensor_names: - - contact_right_thumb_elastomer_force - - contact_right_index_elastomer_force - - contact_right_middle_elastomer_force - - contact_right_ring_elastomer_force - - contact_right_pinky_elastomer_force - disable_tactile_ids: [] - use_default_object_pose_for_object_pos_anchor: true - obs: - observation_mode: separated - enable_tactile: true - binary_contact: false - enable_contact_pos: false - contact_smooth: 0.5 - contact_threshold: 0.05 - tactile_force_clip_max: 4.0 - priv_info: - include_friction_scale: true - include_gravity_direction: false - control_config: - action_scale: 0.041666666666666664 - p_gain: 1.0 - d_gain: 0.1 - torque_control: false - dof_limits_scale: 0.9 - domain_rand: - scale_list: [0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5] - randomize_gravity_direction: true - gravity_direction_magnitude: 9.81 - randomize_pd_gains: true - randomize_p_gain_scale_lower: 0.5 - randomize_p_gain_scale_upper: 2.0 - randomize_d_gain_scale_lower: 0.5 - randomize_d_gain_scale_upper: 2.0 - randomize_friction: true - randomize_friction_scale_lower: 0.75 - randomize_friction_scale_upper: 1.25 - elastomer_base_friction: 2.0 - metal_base_friction: 1.0 - object_base_friction: 2.0 - randomize_com: true - randomize_com_lower: -0.01 - randomize_com_upper: 0.01 - randomize_mass: true - randomize_mass_lower: 0.01 - randomize_mass_upper: 0.25 - force_scale: 2.0 - random_force_prob_scalar: 0.25 - force_decay: 0.9 - force_decay_interval: 0.08 - joint_noise_scale: 0.02 - contact_latency: 0.005 - contact_sensor_noise: 0.01 diff --git a/conf/offpolicy/task/sac/stewart_balance/drake.yaml b/conf/offpolicy/task/sac/stewart_balance/drake.yaml deleted file mode 100644 index 5a672e516..000000000 --- a/conf/offpolicy/task/sac/stewart_balance/drake.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# @package _global_ -training: - task_name: StewartBalance - sim_backend: drake - no_play: true - play_steps: 400 - play_env_num: 1 - play_render_mode: record - render_spacing: 4.5 - -algo: - algo_log_name: fast_sac_drake - num_envs: 256 - batch_size: 512 - replay_buffer_n: 512 - updates_per_step: 2 - learning_starts: 2 - max_iterations: 400 - save_interval: 100 - actor_hidden_dim: 128 - critic_hidden_dim: 256 - obs_normalization: true - use_layer_norm: true - algo_params: - alpha_init: 0.005 - target_entropy_ratio: 0.0 - use_compile: false - -env: - drake_backend_mode: batch - drake_nthread: 20 - -reward: - scales: - center: 0.7 - progress: 0.6 - still: 3.0 - fall_penalty: -6.0 diff --git a/conf/offpolicy/task/td3/g1_23dof_walk_flat/mujoco.yaml b/conf/offpolicy/task/td3/g1_23dof_walk_flat/mujoco.yaml deleted file mode 100644 index 850f155e8..000000000 --- a/conf/offpolicy/task/td3/g1_23dof_walk_flat/mujoco.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: mujoco -algo: - max_iterations: 100000 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/td3/g1_walk_flat/mujoco.yaml b/conf/offpolicy/task/td3/g1_walk_flat/mujoco.yaml deleted file mode 100644 index 54f87699c..000000000 --- a/conf/offpolicy/task/td3/g1_walk_flat/mujoco.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# @package _global_ -training: - task_name: G1WalkFlat - sim_backend: mujoco -algo: - max_iterations: 100000 -env: - control_config: - action_scale: 1.0 - gait_phase_init_mode: "offset_phase" - reset_base_qvel_limit: 0.5 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_gyro: 0.0 - scale_gravity: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 0.1 - scale_linvel: 0.0 - seed: null -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 1.5 - penalty_ang_vel_xy: -1.0 - penalty_orientation: -10.0 - penalty_action_rate: -4.0 - pose: -0.5 - penalty_feet_ori: -20.0 - feet_phase: 5.0 - alive: 10.0 - tracking_sigma: 0.25 - base_height_target: 0.754 - min_base_height: 0.3 - max_tilt_deg: 65.0 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.04 - close_feet_threshold: 0.15 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/offpolicy/task/td3/go1_joystick_flat/motrix.yaml b/conf/offpolicy/task/td3/go1_joystick_flat/motrix.yaml deleted file mode 100644 index 40c9f28b7..000000000 --- a/conf/offpolicy/task/td3/go1_joystick_flat/motrix.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickFlat - sim_backend: motrix -algo: - num_envs: 1024 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - batch_size: 8192 - replay_buffer_n: 1024 -env: - commands: - vel_limit: - - [0.5, 0.0, 0.0] - - [0.5, 0.0, 0.0] -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/offpolicy/task/td3/go2_joystick_flat/motrix.yaml b/conf/offpolicy/task/td3/go2_joystick_flat/motrix.yaml deleted file mode 100644 index 8b32bd78a..000000000 --- a/conf/offpolicy/task/td3/go2_joystick_flat/motrix.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: motrix -algo: - num_envs: 1024 - learning_starts: 10 - max_iterations: 5000 - save_interval: 1000 - updates_per_step: 8 - batch_size: 8192 - replay_buffer_n: 1024 -env: - commands: - vel_limit: - - [0.5, 0.0, 0.0] - - [0.5, 0.0, 0.0] - domain_rand: - randomize_kp: false - randomize_kd: false -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/ppo/config.yaml b/conf/ppo/config.yaml deleted file mode 100644 index a5210ce18..000000000 --- a/conf/ppo/config.yaml +++ /dev/null @@ -1,147 +0,0 @@ -defaults: - - _self_ - - task: go1_joystick_flat/mujoco - -algo: - algo: ppo - algo_log_name: rsl_rl_ppo - seed: 1 - num_envs: 4096 - num_steps_per_env: 24 - max_iterations: 101 - save_interval: 100 - empirical_normalization: false - runner_class_name: OnPolicyRunner - obs_groups: - default: - - policy - experiment_name: test - run_name: "" - resume: false - load_run: "-1" - checkpoint: -1 - resume_path: null - policy: - init_noise_std: 1.0 - actor_hidden_dims: [512, 256, 128] - critic_hidden_dims: [512, 256, 128] - activation: elu - class_name: ActorCritic - algorithm: - class_name: unilab.algos.torch.rsl_rl_ppo:FinalObservationAwarePPO - value_loss_coef: 1.0 - use_clipped_value_loss: true - clip_param: 0.2 - entropy_coef: 0.01 - num_learning_epochs: 5 - num_mini_batches: 4 - learning_rate: 1.0e-3 - schedule: adaptive - gamma: 0.99 - lam: 0.95 - desired_kl: 0.01 - target_kl_stop: null - max_grad_norm: 1.0 - adaptive_kl_beta: 0.9 - adaptive_lr_growth: 1.1 - adaptive_lr_decay: 1.2 - adaptive_lr_update_interval: 5 - metrics_interval: 8 - finite_check_interval: 8 - enable_compile: false - warmup_strict_iters: 10 - warmup_metrics_interval: 2 - warmup_finite_check_interval: 2 - disable_finite_checks: true - -training: - task_name: Go1JoystickFlat - # list[int] | null; null/[] keeps single-device behavior, [d] selects one - # CUDA device, and [d0..dN-1] launches one RSL-RL worker per device. - # algo.num_envs is per rank; do not set this together with training.device. - devices: null - device: null - logger: tensorboard - wandb_project: unilab - wandb_entity: null - wandb_group: null - wandb_job_type: null - wandb_name: null - wandb_tags: [] - wandb_notes: null - wandb_mode: null - sim_backend: mujoco - nan_guard: - enabled: true - buffer_size: 100 - max_envs_to_dump: 5 - output_dir: null - play_only: false - no_play: false - sim2sim_strict: true - play_render_mode: auto - play_env_num: 16 - render_spacing: 1.0 - play_steps: 200 - cam_distance: 6.0 - cam_elevation: -20.0 - cam_azimuth: 90.0 - cam_lookat: null - cam_tracking: false - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 2 - log_root: null - num_timesteps: null - log_dir: null - -interactive: - action_mode: zero - policy_obs_mode: auto - show_target_bodies: false - show_reward_debug: false - target_show_axes: false - target_body_names: "" - target_max_bodies: 0 - target_marker_radius: 0.02 - target_axis_length: 0.08 - target_marker_alpha: 0.75 - reward_debug_show_velocity: false - reward_debug_lin_vel_scale: 0.08 - reward_debug_ang_vel_scale: 0.05 - reward_debug_show_connectors: false - reward_debug_show_global_anchor: false - camera_follow_body: true - camera_focus_body_name: "" - camera_height_offset: 0.15 - camera_distance: null - camera_elevation: null - camera_azimuth: null - use_env_visual_model: true - speed: 1.0 - start_paused: false - keyboard: false - keyboard_step_lin: 0.1 - keyboard_step_ang: 0.2 - -viser: - port: 8080 - env_idx: 0 - display_mode: all - max_envs: 16 - -env: - post_step_forward_sensor: false - # adaptive_chunk_size: auto-tune the MuJoCo BatchEnvPool chunk_size at materialize - # (cache-backed). chunk_size (int) manually overrides and wins; null => use default. - adaptive_chunk_size: true - chunk_size: null - -hydra: - run: - dir: . - output_subdir: null - job: - chdir: false - job_logging: - root: - handlers: [console] diff --git a/conf/ppo/task/a2_joystick_flat/mujoco.yaml b/conf/ppo/task/a2_joystick_flat/mujoco.yaml deleted file mode 100644 index b0863e9db..000000000 --- a/conf/ppo/task/a2_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# @package _global_ -# A2 (leg-only Unitree A2) joystick flat task. Same isomorphic task as -# Go2JoystickFlat: 12-DOF velocity tracking with a gait phase. Robot identity -# (asset path, standing height 0.465, A2 leg PD gains) lives in A2JoystickCfg; -# this YAML carries training + reward only, mirroring the Go2 task. -training: - task_name: A2JoystickFlat - sim_backend: mujoco -algo: - num_envs: 1024 - max_iterations: 500 # A2 (19.6 kg, ~2.8x Go2) + full DR needs more budget than Go2's flat task - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 -env: - # Domain randomization for sim2real deployment. A2JoystickDomainRandomizationProvider - # caches the dof-armature + geom-friction baselines, so randomize_dof_armature and - # randomize_ground_friction are ON. Ground friction is effective because the floor - # geom is the priority geom (scene_flat.xml). Ranges reference unitree_rl_mjlab A2 - # events: joint_armature scale [0.9,1.1], foot friction [0.3,1.6]. randomize_body_mass - # stays off (base_body_mass not cached); gravity OFF (constant on flat ground). - # env.domain_rand is sim2sim ALLOWLIST (free override). - domain_rand: - randomize_base_mass: true - added_mass_range: [0.0, 8.0] - - randomize_body_mass: false # provider does not cache base_body_mass - body_mass_multiplier_range: [0.9, 1.1] - - random_com: true - com_offset_x: [-0.08, 0.08] - com_offset_y: [-0.08, 0.08] - com_offset_z: [-0.08, 0.08] - - randomize_gravity: false # flat ground: gravity constant on the real robot; randomizing only slows training. - - randomize_ground_friction: true # floor is the priority geom, so this moves the foot-ground friction - ground_friction_multiplier_range: [0.3, 1.6] # mjlab foot_friction range - - randomize_dof_armature: true - dof_armature_multiplier_range: [0.9, 1.1] # mjlab joint_armature scale - - randomize_kp: true - kp_multiplier_range: [0.9, 1.1] - - randomize_kd: true - kd_multiplier_range: [0.9, 1.1] - - push_robots: true - push_interval: 400 # control steps between base velocity pushes - max_force: [1.0, 1.0, 0.5] - push_body_name: base_link # A2 base body (Go2 uses "base"); required or push has no target. - # Standing-aware commands so the policy trains on genuine zero-command samples - # (rel_standing_envs fraction forced to stand) and resamples mid-episode every 5s. env.commands is - # a sim2sim ALLOWLIST subset (vel_limit) / free fields; rel_standing_envs and - # resampling_time are declared fields on Commands so Hydra struct mode accepts them. - commands: - rel_standing_envs: 0.1 - resampling_time: 5.0 -reward: - # command_threshold gates the phase-driven gait rewards (swing_feet_z / contact) - # so the A2 stands still at zero command instead of marching in place. - command_threshold: 0.1 - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.4 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.02 - similar_to_default: -0.25 - contact: 0.5 - swing_feet_z: 4.0 - stand_still: -4.0 - hip_deviation: -1.0 - stand_feet_air: -1.0 # penalize feet leaving the ground at zero command (gated off during locomotion) - tracking_sigma: 0.25 - base_height_target: 0.40 diff --git a/conf/ppo/task/allegro_inhand/motrix.yaml b/conf/ppo/task/allegro_inhand/motrix.yaml deleted file mode 100644 index 3608d9743..000000000 --- a/conf/ppo/task/allegro_inhand/motrix.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# @package _global_ -training: - task_name: AllegroInhandRotation - sim_backend: motrix -algo: - num_envs: 16384 - num_steps_per_env: 8 - max_iterations: 201 - obs_groups: - actor: [policy] - critic: [policy] - actor: - class_name: rsl_rl.models.MLPModel - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - distribution_cfg: - class_name: rsl_rl.modules.distribution.GaussianDistribution - init_std: 1.0 - std_type: scalar - critic: - class_name: rsl_rl.models.MLPModel - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - algorithm: - value_loss_coef: 4.0 - desired_kl: 0.02 -reward: - scales: - rotate: 1.25 - obj_linvel: -0.3 - pose_diff: -0.3 - torque: -0.1 - work: -2.0 - drop: 0.0 - angvel_clip_min: -0.5 - angvel_clip_max: 0.5 - reset_z_threshold: 0.125 -env: - gen_grasp: false - max_episode_seconds: 20.0 - grasp_cache_path: caches/allegro_grasp_50k.npy - # Keep only grasp/pose reset variation. All online DR terms stay disabled. - domain_rand: - randomize_base_mass: false - random_com: false - randomize_gravity: false - push_robots: false - joint_noise: 0.0 - ball_vel_noise: 0.0 - ball_z_offset: 0.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/allegro_inhand/mujoco.yaml b/conf/ppo/task/allegro_inhand/mujoco.yaml deleted file mode 100644 index 17d639913..000000000 --- a/conf/ppo/task/allegro_inhand/mujoco.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# @package _global_ -training: - task_name: AllegroInhandRotation - sim_backend: mujoco - render_spacing: 0.5 - cam_distance: 1.5 - cam_lookat: [0.75, 0.75, 0] - cam_elevation: -20.0 -algo: - num_envs: 16384 - num_steps_per_env: 8 - max_iterations: 201 - obs_groups: - actor: [policy] - critic: [policy] - actor: - class_name: rsl_rl.models.MLPModel - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - distribution_cfg: - class_name: rsl_rl.modules.distribution.GaussianDistribution - init_std: 1.0 - std_type: scalar - critic: - class_name: rsl_rl.models.MLPModel - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - algorithm: - value_loss_coef: 4.0 - desired_kl: 0.02 -reward: - scales: - rotate: 1.25 - obj_linvel: -0.3 - pose_diff: -0.3 - torque: -0.1 - work: -2.0 - drop: 0.0 - angvel_clip_min: -0.5 - angvel_clip_max: 0.5 - reset_z_threshold: 0.125 -env: - gen_grasp: false - max_episode_seconds: 20.0 - grasp_cache_path: caches/allegro_grasp_50k.npy - # Keep only grasp/pose reset variation. All online DR terms stay disabled. - domain_rand: - randomize_base_mass: false - random_com: false - randomize_gravity: false - push_robots: false - joint_noise: 0.0 - ball_vel_noise: 0.0 - ball_z_offset: 0.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/allegro_inhand_grasp/motrix.yaml b/conf/ppo/task/allegro_inhand_grasp/motrix.yaml deleted file mode 100644 index 6b5cdca31..000000000 --- a/conf/ppo/task/allegro_inhand_grasp/motrix.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# @package _global_ -defaults: - - /task/allegro_inhand/motrix - - _self_ - -training: - task_name: AllegroInhandRotationGrasp - sim_backend: motrix - no_play: true -algo: - max_iterations: 1000 # infinite rollout -reward: - scales: - rotate: 0.0 - obj_linvel: 0.0 - pose_diff: 0.0 - torque: 0.0 - work: 0.0 - drop: 0.0 -env: - gen_grasp: true - max_episode_seconds: 3.0 - grasp_cache_path: caches/allegro_grasp_50k.npy - grasp_collection_target: 50000 - grasp_auto_save: true - grasp_quality_check: true - grasp_min_contacts: 2 - domain_rand: - randomize_base_mass: false - random_com: false - push_robots: false - ball_vel_noise: 0.0 - joint_noise: 0.25 # random sampling of the grasp poses -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/allegro_inhand_grasp/mujoco.yaml b/conf/ppo/task/allegro_inhand_grasp/mujoco.yaml deleted file mode 100644 index e6e62f2f6..000000000 --- a/conf/ppo/task/allegro_inhand_grasp/mujoco.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# @package _global_ -defaults: - - /task/allegro_inhand/mujoco - - _self_ - -training: - task_name: AllegroInhandRotationGrasp - sim_backend: mujoco - no_play: true -algo: - max_iterations: 1000 # infinite rollout -reward: - scales: - rotate: 0.0 - obj_linvel: 0.0 - pose_diff: 0.0 - torque: 0.0 - work: 0.0 - drop: 0.0 -env: - gen_grasp: true - max_episode_seconds: 3.0 - grasp_cache_path: caches/allegro_grasp_50k.npy - grasp_collection_target: 50000 - grasp_auto_save: true - grasp_quality_check: true - grasp_min_contacts: 2 - domain_rand: - randomize_base_mass: false - random_com: false - push_robots: false - ball_vel_noise: 0.0 - joint_noise: 0.25 # random sampling of the grasp poses -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_23dof_box_tracking/motrix.yaml b/conf/ppo/task/g1_23dof_box_tracking/motrix.yaml deleted file mode 100644 index e453b0721..000000000 --- a/conf/ppo/task/g1_23dof_box_tracking/motrix.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# @package _global_ -training: - task_name: G1BoxTracking23Dof - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 40000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.002 - desired_kl: 0.01 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -play_profile: - enabled: true - env: - render_spacing: 2.5 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat_23dof_with_largebox.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.5 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - undesired_contacts: -0.1 - object_global_ref_position_error_exp: 4.0 - object_global_ref_orientation_error_exp: 3.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 - std_object_pos: 0.12 - std_object_ori: 0.2 diff --git a/conf/ppo/task/g1_23dof_box_tracking/mujoco.yaml b/conf/ppo/task/g1_23dof_box_tracking/mujoco.yaml deleted file mode 100644 index 4c7b186f3..000000000 --- a/conf/ppo/task/g1_23dof_box_tracking/mujoco.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# @package _global_ -training: - task_name: G1BoxTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 30000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -env: - sim_dt: 0.005 - sensor: - gyro: pelvis_gyro - upvector: pelvis_upvector -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - undesired_contacts: -0.1 - object_global_ref_position_error_exp: 2.0 - object_global_ref_orientation_error_exp: 2.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 - std_object_pos: 0.2 - std_object_ori: 0.3 diff --git a/conf/ppo/task/g1_23dof_climb_tracking/motrix.yaml b/conf/ppo/task/g1_23dof_climb_tracking/motrix.yaml deleted file mode 100644 index f554a13d7..000000000 --- a/conf/ppo/task/g1_23dof_climb_tracking/motrix.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking23Dof - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_climb_tracking/mujoco.yaml b/conf/ppo/task/g1_23dof_climb_tracking/mujoco.yaml deleted file mode 100644 index 34fc4ae59..000000000 --- a/conf/ppo/task/g1_23dof_climb_tracking/mujoco.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_flip_tracking/motrix.yaml b/conf/ppo/task/g1_23dof_flip_tracking/motrix.yaml deleted file mode 100644 index fff96e018..000000000 --- a/conf/ppo/task/g1_23dof_flip_tracking/motrix.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking23Dof - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 30000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.05 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_flip_tracking/mujoco.yaml b/conf/ppo/task/g1_23dof_flip_tracking/mujoco.yaml deleted file mode 100644 index 8e62a80ff..000000000 --- a/conf/ppo/task/g1_23dof_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_motion_tracking/motrix.yaml b/conf/ppo/task/g1_23dof_motion_tracking/motrix.yaml deleted file mode 100644 index 6bcc0a74f..000000000 --- a/conf/ppo/task/g1_23dof_motion_tracking/motrix.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking23Dof - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -play_profile: - enabled: true - env: - render_spacing: 2.5 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat_23dof.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.05 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 \ No newline at end of file diff --git a/conf/ppo/task/g1_23dof_motion_tracking/mujoco.yaml b/conf/ppo/task/g1_23dof_motion_tracking/mujoco.yaml deleted file mode 100644 index 3a411cd18..000000000 --- a/conf/ppo/task/g1_23dof_motion_tracking/mujoco.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 \ No newline at end of file diff --git a/conf/ppo/task/g1_23dof_motion_tracking_deploy/motrix.yaml b/conf/ppo/task/g1_23dof_motion_tracking_deploy/motrix.yaml deleted file mode 100644 index a0359647e..000000000 --- a/conf/ppo/task/g1_23dof_motion_tracking_deploy/motrix.yaml +++ /dev/null @@ -1,101 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking23DofDeploy - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -env: - sim_dt: 0.005 - sensor: - local_linvel: pelvis_local_linvel - gyro: pelvis_gyro - upvector: pelvis_upvector - domain_rand: - random_com: true - com_offset_x: [-0.025, 0.025] - com_offset_y: [-0.05, 0.05] - com_offset_z: [-0.05, 0.05] - randomize_base_mass: true - added_mass_range: [-1.5, 1.5] - push_robots: true - push_interval: 750 - max_force: [1.0, 1.0, 0.5] - randomize_joint_default_pos: true - joint_default_pos_range: [-0.01, 0.01] - noise_config: - scale_joint_angle: 0.01 - scale_joint_vel: 0.5 - scale_gyro: 0.2 - scale_linvel: 0.5 - scale_gravity: 0.05 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 -play_profile: - enabled: true - env: - render_spacing: 2.5 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat_23dof.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.05 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_motion_tracking_deploy/mujoco.yaml b/conf/ppo/task/g1_23dof_motion_tracking_deploy/mujoco.yaml deleted file mode 100644 index 4c725f29d..000000000 --- a/conf/ppo/task/g1_23dof_motion_tracking_deploy/mujoco.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking23DofDeploy - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -env: - sim_dt: 0.005 - sensor: - local_linvel: pelvis_local_linvel - gyro: pelvis_gyro - upvector: pelvis_upvector - domain_rand: - random_com: true - com_offset_x: [-0.025, 0.025] - com_offset_y: [-0.05, 0.05] - com_offset_z: [-0.05, 0.05] - randomize_base_mass: true - added_mass_range: [-1.5, 1.5] - push_robots: true - push_interval: 750 - max_force: [1.0, 1.0, 0.5] - randomize_geom_friction: true - friction_range: [0.3, 1.2] - randomize_joint_default_pos: true - joint_default_pos_range: [-0.01, 0.01] - noise_config: - scale_joint_angle: 0.01 - scale_joint_vel: 0.5 - scale_gyro: 0.2 - scale_linvel: 0.5 - scale_gravity: 0.05 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_walk_flat/motrix.yaml b/conf/ppo/task/g1_23dof_walk_flat/motrix.yaml deleted file mode 100644 index ab1c8a94f..000000000 --- a/conf/ppo/task/g1_23dof_walk_flat/motrix.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: motrix -algo: - num_envs: 2048 - max_iterations: 2200 - empirical_normalization: true - obs_groups: - actor: - - policy - critic: - - critic - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 5.0e-3 -env: - domain_rand: - randomize_kp: false - randomize_kd: false - control_config: - action_scale: 0.5 - commands: - vel_limit: - - [0.4, 0.0, 0.0] - - [0.7, 0.0, 0.0] - gait_phase_init_mode: offset_phase - reset_base_qvel_limit: 0.05 - curriculum: - enabled: false - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.25 - forward_progress: 0.0 - under_speed: -0.2 - upper_body_pose: -0.05 - penalty_feet_ori: 0.0 - feet_phase: 1.2 - feet_phase_contrast: 1.5 - feet_phase_contact: 1.0 - feet_double_stance: -1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.2 - base_height: -120.0 - orientation: -2.5 - action_rate: -0.005 - pose: -0.05 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.765 - min_forward_speed_for_gait_reward: 0.05 - min_base_height: 0.5 - max_tilt_deg: 35.0 diff --git a/conf/ppo/task/g1_23dof_walk_flat/mujoco.yaml b/conf/ppo/task/g1_23dof_walk_flat/mujoco.yaml deleted file mode 100644 index 0397b885d..000000000 --- a/conf/ppo/task/g1_23dof_walk_flat/mujoco.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofFlat - sim_backend: mujoco -algo: - num_envs: 2048 - max_iterations: 2200 - obs_groups: - actor: - - actor -env: - control_config: - action_scale: 0.25 - curriculum: - enabled: false - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.2 - feet_phase: 1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.25 - base_height: -500.0 - orientation: -5.0 - action_rate: -0.01 - pose: -0.1 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 - min_base_height: 0.55 - max_tilt_deg: 25.0 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/ppo/task/g1_23dof_walk_rough/mujoco.yaml b/conf/ppo/task/g1_23dof_walk_rough/mujoco.yaml deleted file mode 100644 index ea82c6792..000000000 --- a/conf/ppo/task/g1_23dof_walk_rough/mujoco.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# @package _global_ -training: - task_name: G1Walk23DofRough - sim_backend: mujoco -algo: - num_envs: 2048 - max_iterations: 2200 - obs_groups: - actor: - - actor -env: - control_config: - action_scale: 0.25 - curriculum: - enabled: true - initial_scale: 0.5 - min_scale: 0.5 - max_scale: 1.0 - level_down_threshold: 150.0 - level_up_threshold: 750.0 - degree: 0.001 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.2 - feet_phase: 1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.25 - base_height: -500.0 - orientation: -5.0 - action_rate: -0.01 - pose: -0.1 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 - min_base_height: 0.55 - max_tilt_deg: 25.0 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] diff --git a/conf/ppo/task/g1_23dof_wall_flip_tracking/motrix.yaml b/conf/ppo/task/g1_23dof_wall_flip_tracking/motrix.yaml deleted file mode 100644 index 04c69a001..000000000 --- a/conf/ppo/task/g1_23dof_wall_flip_tracking/motrix.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking23Dof - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 - render_spacing: 3.0 -algo: - num_envs: 1024 - max_iterations: 12000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - motrix_max_iterations: 3 - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -play_profile: - enabled: true - env: - render_spacing: 4.0 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat_23dof_with_wall.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_23dof_wall_flip_tracking/mujoco.yaml b/conf/ppo/task/g1_23dof_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index 7a49d091d..000000000 --- a/conf/ppo/task/g1_23dof_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking23Dof - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_box_tracking/motrix.yaml b/conf/ppo/task/g1_box_tracking/motrix.yaml deleted file mode 100644 index 863ac1215..000000000 --- a/conf/ppo/task/g1_box_tracking/motrix.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# @package _global_ -training: - task_name: G1BoxTracking - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 40000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.002 - desired_kl: 0.01 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -play_profile: - enabled: true - env: - render_spacing: 2.5 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat_with_largebox.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.5 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - undesired_contacts: -0.1 - object_global_ref_position_error_exp: 4.0 - object_global_ref_orientation_error_exp: 3.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 - std_object_pos: 0.12 - std_object_ori: 0.2 diff --git a/conf/ppo/task/g1_box_tracking/mujoco.yaml b/conf/ppo/task/g1_box_tracking/mujoco.yaml deleted file mode 100644 index 278a8b8f3..000000000 --- a/conf/ppo/task/g1_box_tracking/mujoco.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# @package _global_ -training: - task_name: G1BoxTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 30000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -env: - sim_dt: 0.005 - sensor: - gyro: pelvis_gyro - upvector: pelvis_upvector -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - undesired_contacts: -0.1 - object_global_ref_position_error_exp: 2.0 - object_global_ref_orientation_error_exp: 2.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 - std_object_pos: 0.2 - std_object_ori: 0.3 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_climb_tracking/motrix.yaml b/conf/ppo/task/g1_climb_tracking/motrix.yaml deleted file mode 100644 index 0c30db38e..000000000 --- a/conf/ppo/task/g1_climb_tracking/motrix.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_climb_tracking/mujoco.yaml b/conf/ppo/task/g1_climb_tracking/mujoco.yaml deleted file mode 100644 index b7111e85a..000000000 --- a/conf/ppo/task/g1_climb_tracking/mujoco.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# @package _global_ -training: - task_name: G1ClimbTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: adaptive - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.3 - ee_body_pos_z_threshold: 0.3 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_flip_tracking/motrix.yaml b/conf/ppo/task/g1_flip_tracking/motrix.yaml deleted file mode 100644 index 3435bd57a..000000000 --- a/conf/ppo/task/g1_flip_tracking/motrix.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking - sim_backend: motrix - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 30000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.05 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_flip_tracking/mujoco.yaml b/conf/ppo/task/g1_flip_tracking/mujoco.yaml deleted file mode 100644 index 1edd403da..000000000 --- a/conf/ppo/task/g1_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# @package _global_ -training: - task_name: G1FlipTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_motion_tracking/motrix.yaml b/conf/ppo/task/g1_motion_tracking/motrix.yaml deleted file mode 100644 index b4e531856..000000000 --- a/conf/ppo/task/g1_motion_tracking/motrix.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -env: -play_profile: - enabled: true - env: - render_spacing: 2.5 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 1.0 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.05 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_motion_tracking/mujoco.yaml b/conf/ppo/task/g1_motion_tracking/mujoco.yaml deleted file mode 100644 index 54ffea9fd..000000000 --- a/conf/ppo/task/g1_motion_tracking/mujoco.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -env: -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_motion_tracking_deploy/motrix.yaml b/conf/ppo/task/g1_motion_tracking_deploy/motrix.yaml deleted file mode 100644 index 6ebc34b25..000000000 --- a/conf/ppo/task/g1_motion_tracking_deploy/motrix.yaml +++ /dev/null @@ -1,107 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTrackingDeploy - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -play_profile: - enabled: true - env: - render_spacing: 2.5 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -env: - sim_dt: 0.005 - sensor: - local_linvel: pelvis_local_linvel - gyro: pelvis_gyro - upvector: pelvis_upvector - domain_rand: - random_com: true - com_offset_x: [-0.025, 0.025] - com_offset_y: [-0.05, 0.05] - com_offset_z: [-0.05, 0.05] - randomize_base_mass: true - added_mass_range: [-1.5, 1.5] - push_robots: true - push_interval: 750 - max_force: [1.0, 1.0, 0.5] - randomize_joint_default_pos: true - joint_default_pos_range: [-0.01, 0.01] - # randomize_geom_friction omitted: Motrix does not reliably support it - noise_config: - scale_joint_angle: 0.01 - scale_joint_vel: 0.5 - scale_gyro: 0.2 - scale_linvel: 0.5 - scale_gravity: 0.05 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_motion_tracking_deploy/mujoco.yaml b/conf/ppo/task/g1_motion_tracking_deploy/mujoco.yaml deleted file mode 100644 index 39a10a9ca..000000000 --- a/conf/ppo/task/g1_motion_tracking_deploy/mujoco.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# @package _global_ -training: - task_name: G1MotionTrackingDeploy - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 15000 - save_interval: 500 - obs_groups: - actor: - - actor - algorithm: - entropy_coef: 0.005 -env: - sim_dt: 0.005 - sensor: - local_linvel: pelvis_local_linvel - gyro: pelvis_gyro - upvector: pelvis_upvector - domain_rand: - random_com: true - com_offset_x: [-0.025, 0.025] - com_offset_y: [-0.05, 0.05] - com_offset_z: [-0.05, 0.05] - randomize_base_mass: true - added_mass_range: [-1.5, 1.5] - push_robots: true - push_interval: 750 - max_force: [1.0, 1.0, 0.5] - randomize_geom_friction: true - friction_range: [0.3, 1.2] - randomize_joint_default_pos: true - joint_default_pos_range: [-0.01, 0.01] - noise_config: - scale_joint_angle: 0.01 - scale_joint_vel: 0.5 - scale_gyro: 0.2 - scale_linvel: 0.5 - scale_gravity: 0.05 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 1.0 - motion_body_ori: 1.0 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_joint_pos: 0.0 - motion_joint_vel: 0.0 - action_rate_l2: -0.1 - joint_limit: -10.0 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_walk_flat/mjwarp.yaml b/conf/ppo/task/g1_walk_flat/mjwarp.yaml deleted file mode 100644 index 2d8c3a9d7..000000000 --- a/conf/ppo/task/g1_walk_flat/mjwarp.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# @package _global_ -# Configured-only mjwarp owner for the unified host contract adapter. Offline -# record reuses MuJoCo rendering; native playback and device-resident runtime -# routing are intentionally absent. -training: - task_name: G1WalkFlat - sim_backend: mjwarp - play_render_mode: record -algo: - num_envs: 2048 - max_iterations: 2200 - empirical_normalization: false - obs_groups: - actor: - - actor - policy: - actor_hidden_dims: [512, 256, 128] - critic_hidden_dims: [512, 256, 128] -env: - mjwarp_nconmax: 128 - mjwarp_njmax: 256 - domain_rand: - randomize_kp: false - randomize_kd: false - randomize_dof_armature: false - randomize_body_gravity_compensation: false - control_config: - action_scale: 0.25 - curriculum: - enabled: false - noise_config: - level: 0.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.2 - feet_phase: 1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.25 - base_height: -500.0 - orientation: -5.0 - action_rate: -0.01 - pose: -0.1 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 - min_base_height: 0.55 - max_tilt_deg: 25.0 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_walk_flat/motrix.yaml b/conf/ppo/task/g1_walk_flat/motrix.yaml deleted file mode 100644 index 88c971936..000000000 --- a/conf/ppo/task/g1_walk_flat/motrix.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# @package _global_ -# Standalone Motrix owner config: carries the shared contract inline, then -# overrides contract fields for Motrix-specific tuning -# (intentionally non-transferable from MuJoCo; drop overrides to restore parity). -training: - task_name: G1WalkFlat - sim_backend: motrix -algo: - num_envs: 2048 - max_iterations: 2200 - empirical_normalization: true - obs_groups: - actor: - - policy - critic: - - critic - policy: - actor_hidden_dims: [512, 256, 128] - critic_hidden_dims: [512, 256, 128] - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 5.0e-3 -env: - domain_rand: - randomize_kp: false - randomize_kd: false - control_config: - action_scale: 0.5 - commands: - vel_limit: - - [0.4, 0.0, 0.0] - - [0.7, 0.0, 0.0] - gait_phase_init_mode: offset_phase - reset_base_qvel_limit: 0.05 - curriculum: - enabled: false - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.25 - forward_progress: 0.0 - under_speed: -0.2 - upper_body_pose: -0.05 - penalty_feet_ori: 0.0 - feet_phase: 1.2 - feet_phase_contrast: 1.5 - feet_phase_contact: 1.0 - feet_double_stance: -1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.2 - base_height: -120.0 - orientation: -2.5 - action_rate: -0.005 - pose: -0.05 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.765 - min_forward_speed_for_gait_reward: 0.05 - min_base_height: 0.5 - max_tilt_deg: 35.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_walk_flat/mujoco.yaml b/conf/ppo/task/g1_walk_flat/mujoco.yaml deleted file mode 100644 index 843d7b85f..000000000 --- a/conf/ppo/task/g1_walk_flat/mujoco.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# @package _global_ -# Standalone MuJoCo owner config: carries the shared cross-backend contract inline -# (formerly base.yaml), plus backend-specific tuning. -training: - task_name: G1WalkFlat - sim_backend: mujoco -algo: - num_envs: 2048 - max_iterations: 2200 - empirical_normalization: false - obs_groups: - actor: - - actor - policy: - actor_hidden_dims: [512, 256, 128] - critic_hidden_dims: [512, 256, 128] -env: - control_config: - action_scale: 0.25 - curriculum: - enabled: false - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 -reward: - scales: - tracking_lin_vel: 2.0 - tracking_ang_vel: 0.2 - feet_phase: 1.0 - lin_vel_z: -1.0 - ang_vel_xy: -0.25 - base_height: -500.0 - orientation: -5.0 - action_rate: -0.01 - pose: -0.1 - tracking_sigma: 0.25 - gait_frequency: 1.5 - feet_phase_swing_height: 0.09 - feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 - min_base_height: 0.55 - max_tilt_deg: 25.0 - pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0] -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/g1_wall_flip_tracking/motrix.yaml b/conf/ppo/task/g1_wall_flip_tracking/motrix.yaml deleted file mode 100644 index c595203a6..000000000 --- a/conf/ppo/task/g1_wall_flip_tracking/motrix.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking - sim_backend: motrix - play_env_num: 16 - play_steps: 1000 - render_spacing: 3.0 -algo: - num_envs: 1024 - max_iterations: 12000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - motrix_max_iterations: 3 - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -play_profile: - enabled: true - env: - render_spacing: 4.0 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/g1/scene_flat_with_wall.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/g1_wall_flip_tracking/mujoco.yaml b/conf/ppo/task/g1_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index e11d9b05b..000000000 --- a/conf/ppo/task/g1_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# @package _global_ -training: - task_name: G1WallFlipTracking - sim_backend: mujoco - play_steps: 1000 -algo: - num_envs: 1024 - max_iterations: 20000 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.5475464629911068 - - 0.35066146637882434 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.5475464629911068 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.43857731392336724 - - 0.07450087032950714 - - 0.07450087032950714 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go1_joystick_flat/drake.yaml b/conf/ppo/task/go1_joystick_flat/drake.yaml deleted file mode 100644 index 3c9f63c80..000000000 --- a/conf/ppo/task/go1_joystick_flat/drake.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickFlat - sim_backend: drake - play_steps: 500 - play_env_num: 16 - render_spacing: 0.0 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 1024 - num_steps_per_env: 24 - max_iterations: 151 - save_interval: 100 - obs_groups: - actor: - - actor - -env: - drake_backend_mode: batch - drake_nthread: 0 - scene: - model_file: src/unilab/assets/robots/go1/scene_flat.xml - domain_rand: - randomize_base_mass: false - random_com: false - push_robots: false - -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/ppo/task/go1_joystick_flat/motrix.yaml b/conf/ppo/task/go1_joystick_flat/motrix.yaml deleted file mode 100644 index d84ba1b03..000000000 --- a/conf/ppo/task/go1_joystick_flat/motrix.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickFlat - sim_backend: motrix - play_steps: 500 - play_env_num: 16 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 1024 - max_iterations: 151 - obs_groups: - actor: - - actor - empirical_normalization: true - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 -env: - commands: - vel_limit: - - [0.5, 0.0, 0.0] - - [0.5, 0.0, 0.0] -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go1_joystick_flat/mujoco.yaml b/conf/ppo/task/go1_joystick_flat/mujoco.yaml deleted file mode 100644 index 794266ad3..000000000 --- a/conf/ppo/task/go1_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickFlat - sim_backend: mujoco - play_steps: 500 - play_env_num: 16 - render_spacing: 0.0 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 1024 - max_iterations: 151 - obs_groups: - actor: - - actor -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go1_joystick_rough/motrix.yaml b/conf/ppo/task/go1_joystick_rough/motrix.yaml deleted file mode 100644 index 21be8340a..000000000 --- a/conf/ppo/task/go1_joystick_rough/motrix.yaml +++ /dev/null @@ -1,121 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickRough - sim_backend: motrix - play_steps: 500 - play_env_num: 16 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 2048 - num_steps_per_env: 24 - max_iterations: 1000 - empirical_normalization: false - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 1.0 - algorithm: - learning_rate: 1.0e-3 - entropy_coef: 1.0e-2 - -env: - render_offset_mode: zero - control_config: - action_scale: 0.25 - hip_action_scale: 0.125 - non_hip_action_scale: 0.25 - clip_actions: 100.0 - commands: - vel_limit: [[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]] - resampling_time: 10.0 - heading_command: true - heading_range: [-3.141592653589793, 3.141592653589793] - rel_standing_envs: 0.1 - terrain_curriculum: - enabled: false - scene: - model_file: src/unilab/assets/robots/go1/go1.xml - fragment_files: - - src/unilab/assets/robots/go1/locomotion_task.xml - terrain: - hfield_name: terrain_hfield - geom_name: floor - generator: - seed: 42 - curriculum: false - size: [8.0, 8.0] - num_rows: 6 - num_cols: 6 - border_width: 20.0 - terrain_scan: - enabled: true - geom_name: floor - termination_config: - terrain_out_of_bounds: true - terrain_distance_buffer: 3.0 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 3.0] - random_com: true - randomize_kp: true - kp_multiplier_range: [0.5, 2.0] - randomize_kd: true - kd_multiplier_range: [0.5, 2.0] - push_robots: true - push_interval: 625 - max_force: [1.0, 1.0, 0.5] - -reward: - scales: - lin_vel_z: -2.0 - ang_vel_xy: -0.05 - joint_torques_l2: -2.5e-5 - joint_acc_l2: -2.5e-7 - joint_power: -2.0e-5 - stand_still: -2.0 - hip_pos: -0.5 - joint_pos_penalty: -1.0 - joint_mirror: -0.05 - action_rate: -0.01 - undesired_contacts: -1.0 - contact_forces: -1.5e-4 - tracking_lin_vel: 3.0 - tracking_ang_vel: 1.5 - feet_air_time: 0.5 - feet_air_time_variance: -1.0 - feet_contact_without_cmd: 0.1 - feet_slide: -0.1 - feet_height_body: -5.0 - feet_gait: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.33 - stand_still_command_threshold: 0.1 - joint_pos_penalty_stand_still_scale: 5.0 - joint_pos_penalty_velocity_threshold: 0.5 - joint_pos_penalty_command_threshold: 0.1 - contact_threshold: 1.0 - contact_forces_threshold: 100.0 - feet_air_time_threshold: 0.5 - feet_height_body_target: -0.2 - feet_height_body_tanh_mult: 2.0 - feet_gait_std: 0.7071067811865476 - feet_gait_max_err: 0.2 - feet_gait_velocity_threshold: 0.5 - feet_gait_command_threshold: 0.1 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go1_joystick_rough/mujoco.yaml b/conf/ppo/task/go1_joystick_rough/mujoco.yaml deleted file mode 100644 index 04a9dc179..000000000 --- a/conf/ppo/task/go1_joystick_rough/mujoco.yaml +++ /dev/null @@ -1,122 +0,0 @@ -# @package _global_ -training: - task_name: Go1JoystickRough - sim_backend: mujoco - play_steps: 500 - play_env_num: 16 - render_spacing: 0.0 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 2048 - num_steps_per_env: 24 - max_iterations: 1000 - empirical_normalization: false - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 1.0 - algorithm: - learning_rate: 1.0e-3 - entropy_coef: 1.0e-2 - -env: - sim_dt: 0.005 - control_config: - action_scale: 0.25 - hip_action_scale: 0.125 - non_hip_action_scale: 0.25 - clip_actions: 100.0 - commands: - vel_limit: [[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]] - resampling_time: 10.0 - heading_command: true - heading_range: [-3.141592653589793, 3.141592653589793] - rel_standing_envs: 0.1 - terrain_curriculum: - enabled: false - scene: - model_file: src/unilab/assets/robots/go1/go1_mujoco.xml - fragment_files: - - src/unilab/assets/robots/go1/locomotion_task.xml - terrain: - hfield_name: terrain_hfield - geom_name: floor - generator: - seed: 42 - curriculum: false - size: [8.0, 8.0] - num_rows: 6 - num_cols: 6 - border_width: 20.0 - terrain_scan: - enabled: true - geom_name: floor - termination_config: - terrain_out_of_bounds: true - terrain_distance_buffer: 3.0 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 3.0] - random_com: true - randomize_kp: true - kp_multiplier_range: [0.5, 2.0] - randomize_kd: true - kd_multiplier_range: [0.5, 2.0] - push_robots: true - push_interval: 625 - max_force: [1.0, 1.0, 0.5] - -reward: - scales: - lin_vel_z: -2.0 - ang_vel_xy: -0.05 - joint_torques_l2: -2.5e-5 - joint_acc_l2: -2.5e-7 - joint_power: -2.0e-5 - stand_still: -2.0 - hip_pos: -0.5 - joint_pos_penalty: -1.0 - joint_mirror: -0.05 - action_rate: -0.01 - undesired_contacts: -1.0 - contact_forces: -1.5e-4 - tracking_lin_vel: 3.0 - tracking_ang_vel: 1.5 - feet_air_time: 0.5 - feet_air_time_variance: -1.0 - feet_contact_without_cmd: 0.1 - feet_slide: -0.1 - feet_height_body: -5.0 - feet_gait: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.33 - stand_still_command_threshold: 0.1 - joint_pos_penalty_stand_still_scale: 5.0 - joint_pos_penalty_velocity_threshold: 0.5 - joint_pos_penalty_command_threshold: 0.1 - contact_threshold: 1.0 - contact_forces_threshold: 100.0 - feet_air_time_threshold: 0.5 - feet_height_body_target: -0.2 - feet_height_body_tanh_mult: 2.0 - feet_gait_std: 0.7071067811865476 - feet_gait_max_err: 0.2 - feet_gait_velocity_threshold: 0.5 - feet_gait_command_threshold: 0.1 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2_footstand/drake.yaml b/conf/ppo/task/go2_footstand/drake.yaml deleted file mode 100644 index b8c00f148..000000000 --- a/conf/ppo/task/go2_footstand/drake.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# @package _global_ -training: - task_name: Go2FootStand - sim_backend: drake - -env: - sim_dt: 0.004 - drake_backend_mode: batch - drake_nthread: 0 - add_body_sensors: true - obs_history_len: 15 - energy_termination_threshold: 200.0 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 - scale_gravity: 0.05 - scale_linvel: 0.1 - control_config: - action_scale: 0.3 - domain_rand: - randomize_floor_friction: false - randomize_link_mass: false - torso_added_mass_range: null - randomize_torso_com: false - randomize_dof_armature: false - randomize_reset_joint_qpos: true - reset_joint_qpos_range: [-0.05, 0.05] - -algo: - empirical_normalization: true - num_envs: 1024 - max_iterations: 10000 - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 0.5 - algorithm: - entropy_coef: 0.005 - -reward: - scales: - height: 2.0 - orientation: 2.0 - contact: -1.0 - action_rate: -0.01 - termination: -2.0 - dof_pos_limits: -0.5 - torques: 0.0 - pose: -0.1 - penalty_contact: -0.2 - tar: 0.8 - rear_feet_contact: 0.5 - rear_leg_symmetry: -0.2 - front_leg_motion: -0.05 - upright_stability: -0.2 - knee_clearance: -0.5 - stay_still: -0.1 - energy: -0.003 - dof_acc: -2.5e-7 - tracking_sigma: 0.25 - base_height_target: 0.3 - knee_height_target: 0.08 diff --git a/conf/ppo/task/go2_footstand/motrix.yaml b/conf/ppo/task/go2_footstand/motrix.yaml deleted file mode 100644 index 98d5b3a4e..000000000 --- a/conf/ppo/task/go2_footstand/motrix.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# @package _global_ -training: - task_name: Go2FootStand - sim_backend: motrix - no_play: true -env: - sim_dt: 0.004 - add_body_sensors: true - obs_history_len: 15 - soft_joint_pos_limit_factor: 0.9 - energy_termination_threshold: 200.0 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 - scale_gravity: 0.05 - scale_linvel: 0.1 - control_config: - action_scale: 0.3 - clip_actions: 1.0 - Kd: 0.5 - domain_rand: - randomize_floor_friction: false - floor_friction_range: [0.6, 1.0] - # Motrix does not implement dof_armature randomization; disabled. - randomize_dof_armature: false - randomize_link_mass: false - link_mass_scale_range: [0.95, 1.05] - torso_added_mass_range: [0.0, 0.0] - randomize_torso_com: false - torso_com_offset_range: [-0.02, 0.02] - randomize_reset_joint_qpos: true - reset_joint_qpos_range: [-0.02, 0.02] -algo: - empirical_normalization: true - num_envs: 1024 - max_iterations: 10000 - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 0.5 - algorithm: - entropy_coef: 0.005 -reward: - scales: - height: 2.0 - orientation: 3.0 - contact: -1.0 - action_rate: -0.01 - termination: -2.0 - dof_pos_limits: -0.5 - torques: 0.0 - pose: -0.1 - penalty_contact: -0.2 - tar: 1.3 - rear_feet_contact: 0.5 - both_rear_feet_contact: 0.25 - rear_foot_slip: -1.0 - rear_foot_anchor: -0.15 - front_feet_air: 0.0 - balanced_footstand: 0.0 - rear_leg_symmetry: -0.2 - rear_leg_splay: -0.25 - front_leg_motion: -0.06 - front_leg_crossing: -2.0 - upright_stability: -0.2 - knee_clearance: -0.5 - stay_still: -0.12 - energy: -0.003 - dof_acc: -2.5e-7 - tracking_sigma: 0.25 - base_height_target: 0.3 - knee_height_target: 0.08 - front_feet_min_separation: 0.18 - front_feet_side_margin: 0.06 - rear_hip_abduction_margin: 0.25 - rear_foot_slip_deadband: 0.012 - rear_foot_anchor_radius: 0.04 diff --git a/conf/ppo/task/go2_footstand/mujoco.yaml b/conf/ppo/task/go2_footstand/mujoco.yaml deleted file mode 100644 index cca9fb89d..000000000 --- a/conf/ppo/task/go2_footstand/mujoco.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# @package _global_ -training: - task_name: Go2FootStand - sim_backend: mujoco -env: - sim_dt: 0.004 - add_body_sensors: true - obs_history_len: 15 - energy_termination_threshold: 200.0 - noise_config: - level: 1.0 - scale_joint_angle: 0.01 - scale_joint_vel: 1.5 - scale_gyro: 0.2 - scale_gravity: 0.05 - scale_linvel: 0.1 - control_config: - action_scale: 0.3 - domain_rand: - randomize_floor_friction: true - floor_friction_range: [0.4, 1.0] - randomize_link_mass: true - link_mass_scale_range: [0.9, 1.1] - torso_added_mass_range: [-1.0, 1.0] - randomize_torso_com: true - torso_com_offset_range: [-0.05, 0.05] - randomize_dof_armature: true - dof_armature_scale_range: [1.0, 1.05] - randomize_reset_joint_qpos: true - reset_joint_qpos_range: [-0.05, 0.05] -algo: - empirical_normalization: true - num_envs: 1024 # 4096 # 1024 - # max_iterations: 3000 - max_iterations: 10000 - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 0.5 - algorithm: - entropy_coef: 0.005 -reward: - scales: - height: 2.0 - orientation: 2.0 - contact: -1.0 - action_rate: -0.01 - termination: -2.0 - dof_pos_limits: -0.5 - torques: 0.0 - pose: -0.1 - penalty_contact: -0.2 - tar: 0.8 - rear_feet_contact: 0.5 - rear_leg_symmetry: -0.2 - front_leg_motion: -0.05 - upright_stability: -0.2 - knee_clearance: -0.5 - stay_still: -0.1 - energy: -0.003 - dof_acc: -2.5e-7 - tracking_sigma: 0.25 - base_height_target: 0.3 - knee_height_target: 0.08 diff --git a/conf/ppo/task/go2_joystick_flat/drake.yaml b/conf/ppo/task/go2_joystick_flat/drake.yaml deleted file mode 100644 index e246865f7..000000000 --- a/conf/ppo/task/go2_joystick_flat/drake.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: drake - -algo: - num_envs: 1024 - max_iterations: 151 - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 - -env: - drake_backend_mode: batch - drake_nthread: 0 - scene: - model_file: src/unilab/assets/robots/go2/scene_flat.xml - domain_rand: - randomize_kp: false - randomize_kd: false - push_robots: false - -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 diff --git a/conf/ppo/task/go2_joystick_flat/motrix.yaml b/conf/ppo/task/go2_joystick_flat/motrix.yaml deleted file mode 100644 index aca13216d..000000000 --- a/conf/ppo/task/go2_joystick_flat/motrix.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: motrix -algo: - num_envs: 1024 - max_iterations: 151 - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 -env: - commands: - vel_limit: - - [0.5, 0.0, 0.0] - - [0.5, 0.0, 0.0] - domain_rand: - randomize_kp: false - randomize_kd: false -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2_joystick_flat/mujoco.yaml b/conf/ppo/task/go2_joystick_flat/mujoco.yaml deleted file mode 100644 index 35cf09bed..000000000 --- a/conf/ppo/task/go2_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickFlat - sim_backend: mujoco -algo: - num_envs: 1024 - max_iterations: 151 - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.2 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - action_rate: -0.005 - similar_to_default: -0.1 - contact: 0.24 - swing_feet_z: 4.0 - tracking_sigma: 0.25 - base_height_target: 0.3 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2_joystick_rough/motrix.yaml b/conf/ppo/task/go2_joystick_rough/motrix.yaml deleted file mode 100644 index 46992b1f0..000000000 --- a/conf/ppo/task/go2_joystick_rough/motrix.yaml +++ /dev/null @@ -1,120 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickRough - sim_backend: motrix - play_steps: 500 - play_env_num: 16 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 4096 - num_steps_per_env: 24 - max_iterations: 1500 - empirical_normalization: false - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 1.0 - algorithm: - learning_rate: 1.0e-3 - entropy_coef: 1.0e-2 - -env: - render_offset_mode: zero - control_config: - action_scale: 0.25 - hip_action_scale: 0.125 - non_hip_action_scale: 0.25 - clip_actions: 100.0 - commands: - vel_limit: [[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]] - resampling_time: 10.0 - heading_command: true - heading_range: [-3.141592653589793, 3.141592653589793] - rel_standing_envs: 0.1 - terrain_curriculum: - enabled: false - scene: - model_file: src/unilab/assets/robots/go2/go2.xml - fragment_files: - - src/unilab/assets/robots/go2/locomotion_task.xml - terrain: - hfield_name: terrain_hfield - geom_name: floor - generator: - seed: 42 - curriculum: false - size: [8.0, 8.0] - num_rows: 6 - num_cols: 6 - border_width: 20.0 - terrain_scan: - enabled: true - geom_name: floor - termination_config: - terrain_out_of_bounds: true - terrain_distance_buffer: 3.0 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 3.0] - random_com: true - randomize_kp: true - kp_multiplier_range: [0.5, 2.0] - randomize_kd: true - kd_multiplier_range: [0.5, 2.0] - push_robots: true - push_interval: 625 - max_force: [1.0, 1.0, 0.5] -reward: - scales: - lin_vel_z: -2.0 - ang_vel_xy: -0.05 - joint_torques_l2: -2.5e-5 - joint_acc_l2: -2.5e-7 - joint_power: -2.0e-5 - stand_still: -2.0 - hip_pos: -0.5 - joint_pos_penalty: -1.0 - joint_mirror: -0.05 - action_rate: -0.01 - undesired_contacts: -1.0 - contact_forces: -1.5e-4 - tracking_lin_vel: 3.0 - tracking_ang_vel: 1.5 - feet_air_time: 0.5 - feet_air_time_variance: -1.0 - feet_contact_without_cmd: 0.1 - feet_slide: -0.1 - feet_height_body: -5.0 - feet_gait: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.3 - stand_still_command_threshold: 0.1 - joint_pos_penalty_stand_still_scale: 5.0 - joint_pos_penalty_velocity_threshold: 0.5 - joint_pos_penalty_command_threshold: 0.1 - contact_threshold: 1.0 - contact_forces_threshold: 100.0 - feet_air_time_threshold: 0.5 - feet_height_body_target: -0.2 - feet_height_body_tanh_mult: 2.0 - feet_gait_std: 0.7071067811865476 - feet_gait_max_err: 0.2 - feet_gait_velocity_threshold: 0.5 - feet_gait_command_threshold: 0.1 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2_joystick_rough/mujoco.yaml b/conf/ppo/task/go2_joystick_rough/mujoco.yaml deleted file mode 100644 index ea665a5fa..000000000 --- a/conf/ppo/task/go2_joystick_rough/mujoco.yaml +++ /dev/null @@ -1,122 +0,0 @@ -# @package _global_ -training: - task_name: Go2JoystickRough - sim_backend: mujoco - play_steps: 500 - play_env_num: 16 - render_spacing: 0.0 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 2048 - num_steps_per_env: 24 - max_iterations: 1500 - empirical_normalization: false - obs_groups: - actor: - - actor - critic: - - critic - policy: - init_noise_std: 1.0 - algorithm: - learning_rate: 1.0e-3 - entropy_coef: 1.0e-2 - -env: - sim_dt: 0.002 - control_config: - action_scale: 0.25 - hip_action_scale: 0.125 - non_hip_action_scale: 0.25 - clip_actions: 100.0 - commands: - vel_limit: [[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]] - resampling_time: 10.0 - heading_command: true - heading_range: [-3.141592653589793, 3.141592653589793] - rel_standing_envs: 0.1 - terrain_curriculum: - enabled: false - scene: - model_file: src/unilab/assets/robots/go2/go2_mujoco.xml - fragment_files: - - src/unilab/assets/robots/go2/locomotion_task.xml - terrain: - hfield_name: terrain_hfield - geom_name: floor - generator: - seed: 42 - curriculum: false - size: [8.0, 8.0] - num_rows: 6 - num_cols: 6 - border_width: 20.0 - terrain_scan: - enabled: true - geom_name: floor - termination_config: - terrain_out_of_bounds: true - terrain_distance_buffer: 3.0 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 3.0] - random_com: true - randomize_kp: true - kp_multiplier_range: [0.5, 2.0] - randomize_kd: true - kd_multiplier_range: [0.5, 2.0] - push_robots: true - push_interval: 625 - max_force: [1.0, 1.0, 0.5] - -reward: - scales: - lin_vel_z: -2.0 - ang_vel_xy: -0.05 - joint_torques_l2: -2.5e-5 - joint_acc_l2: -2.5e-7 - joint_power: -2.0e-5 - stand_still: -2.0 - hip_pos: -0.5 - joint_pos_penalty: -1.0 - joint_mirror: -0.05 - action_rate: -0.01 - undesired_contacts: -1.0 - contact_forces: -1.5e-4 - tracking_lin_vel: 3.0 - tracking_ang_vel: 1.5 - feet_air_time: 0.5 - feet_air_time_variance: -1.0 - feet_contact_without_cmd: 0.1 - feet_slide: -0.1 - feet_height_body: -5.0 - feet_gait: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.3 - stand_still_command_threshold: 0.1 - joint_pos_penalty_stand_still_scale: 5.0 - joint_pos_penalty_velocity_threshold: 0.5 - joint_pos_penalty_command_threshold: 0.1 - contact_threshold: 1.0 - contact_forces_threshold: 100.0 - feet_air_time_threshold: 0.5 - feet_height_body_target: -0.2 - feet_height_body_tanh_mult: 2.0 - feet_gait_std: 0.7071067811865476 - feet_gait_max_err: 0.2 - feet_gait_velocity_threshold: 0.5 - feet_gait_command_threshold: 0.1 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2w_joystick_flat/drake.yaml b/conf/ppo/task/go2w_joystick_flat/drake.yaml deleted file mode 100644 index 6a5b59ef5..000000000 --- a/conf/ppo/task/go2w_joystick_flat/drake.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# @package _global_ -training: - task_name: Go2WJoystickFlat - sim_backend: drake - -algo: - num_envs: 1024 - max_iterations: 151 - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 - -env: - drake_backend_mode: batch - drake_nthread: 0 - scene: - model_file: src/unilab/assets/robots/go2w/scene_flat.xml - commands: - vel_limit: - - [0.0, 0.0, -1.0] - - [1.0, 0.0, 1.0] - control_config: - action_scale: 0.5 - wheel_action_scale: 10.0 - Kp: 50.0 - Kd: 1.5 - wheel_Kd: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false - push_robots: false - -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.75 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - orientation: -2.0 - action_rate: -0.005 - similar_to_default: -0.5 - torques: -0.0002 - wheel_vel: 0.0 - alive: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.4 diff --git a/conf/ppo/task/go2w_joystick_flat/motrix.yaml b/conf/ppo/task/go2w_joystick_flat/motrix.yaml deleted file mode 100644 index 0e86b63b0..000000000 --- a/conf/ppo/task/go2w_joystick_flat/motrix.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# @package _global_ -training: - task_name: Go2WJoystickFlat - sim_backend: motrix -algo: - num_envs: 1024 - max_iterations: 151 - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 -env: - render_offset_mode: zero - commands: - vel_limit: - - [0.0, 0.0, -1.0] - - [1.0, 0.0, 1.0] - control_config: - action_scale: 0.5 - wheel_action_scale: 10.0 - Kp: 50.0 - Kd: 1.5 - wheel_Kd: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.75 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - orientation: -2.0 - action_rate: -0.005 - similar_to_default: -0.5 - torques: -0.0002 - wheel_vel: 0.0 - alive: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.4 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2w_joystick_flat/mujoco.yaml b/conf/ppo/task/go2w_joystick_flat/mujoco.yaml deleted file mode 100644 index 602b95a27..000000000 --- a/conf/ppo/task/go2w_joystick_flat/mujoco.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# @package _global_ -training: - task_name: Go2WJoystickFlat - sim_backend: mujoco -algo: - num_envs: 1024 - max_iterations: 151 - empirical_normalization: true - obs_groups: - actor: - - actor - policy: - init_noise_std: 0.5 - algorithm: - learning_rate: 3.0e-4 - entropy_coef: 1.0e-3 -env: - commands: - vel_limit: - - [0.0, 0.0, -1.0] - - [1.0, 0.0, 1.0] - control_config: - action_scale: 0.5 - wheel_action_scale: 10.0 - Kp: 50.0 - Kd: 1.5 - wheel_Kd: 0.5 - domain_rand: - randomize_kp: false - randomize_kd: false -reward: - scales: - tracking_lin_vel: 1.0 - tracking_ang_vel: 0.75 - lin_vel_z: -5.0 - ang_vel_xy: -0.1 - base_height: -100.0 - orientation: -2.0 - action_rate: -0.005 - similar_to_default: -0.5 - torques: -0.0002 - wheel_vel: 0.0 - alive: 0.5 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.4 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2w_joystick_rough/motrix.yaml b/conf/ppo/task/go2w_joystick_rough/motrix.yaml deleted file mode 100644 index d15620ddb..000000000 --- a/conf/ppo/task/go2w_joystick_rough/motrix.yaml +++ /dev/null @@ -1,99 +0,0 @@ -# @package _global_ -training: - task_name: Go2WJoystickRough - sim_backend: motrix - play_steps: 500 - play_env_num: 16 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 2048 - num_steps_per_env: 24 - max_iterations: 1200 - empirical_normalization: false - obs_groups: - actor: - - actor - critic: - - critic -env: - render_offset_mode: zero - scene: - model_file: src/unilab/assets/robots/go2w/go2w.xml - fragment_files: - - src/unilab/assets/robots/go2w/locomotion_task.xml - terrain: - hfield_name: terrain_hfield - geom_name: floor - generator: - seed: 42 - curriculum: false - size: [8.0, 8.0] - num_rows: 6 - num_cols: 6 - border_width: 20.0 - commands: - vel_limit: [[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]] - resampling_time: 10.0 - heading_command: true - heading_range: [-3.141592653589793, 3.141592653589793] - rel_standing_envs: 0.1 - control_config: - action_scale: 0.25 - hip_action_scale: 0.125 - wheel_action_scale: 5.0 - wheel_Kd: 0.5 - clip_actions: 100.0 - simulate_action_latency: false - terrain_scan: - enabled: true - hfield_name: terrain_hfield - geom_name: floor - termination_config: - terrain_out_of_bounds: true - terrain_distance_buffer: 3.0 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 3.0] - random_com: true - com_offset_x: [-0.05, 0.05] - randomize_kp: true - kp_multiplier_range: [0.5, 1.0] - randomize_kd: true - kd_multiplier_range: [0.5, 1.0] - push_robots: true - push_interval: 625 - max_force: [1.0, 1.0, 0.5] - push_body_name: base_link -reward: - scales: - tracking_lin_vel: 3.0 - tracking_ang_vel: 1.5 - lin_vel_z: -2.0 - ang_vel_xy: -0.05 - orientation: -2.0 - joint_torques_l2: -2.5e-5 - joint_acc_l2: -2.5e-7 - joint_acc_wheel_l2: -2.5e-9 - joint_power: -2.0e-5 - action_rate: -0.01 - stand_still: -2.0 - hip_pos: -0.5 - joint_pos_penalty: -1.0 - joint_mirror: -0.05 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.4 - only_positive_rewards: false -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/go2w_joystick_rough/mujoco.yaml b/conf/ppo/task/go2w_joystick_rough/mujoco.yaml deleted file mode 100644 index 5bcc31038..000000000 --- a/conf/ppo/task/go2w_joystick_rough/mujoco.yaml +++ /dev/null @@ -1,99 +0,0 @@ -# @package _global_ -training: - task_name: Go2WJoystickRough - sim_backend: mujoco - play_steps: 500 - play_env_num: 16 - render_spacing: 0.0 - cam_tracking: true - cam_tracking_env_idx: 0 - cam_tracking_extra_envs: 9 - -interactive: - action_mode: policy - policy_obs_mode: auto - camera_follow_body: true - use_env_visual_model: false - -algo: - num_envs: 2048 - num_steps_per_env: 24 - max_iterations: 1200 - empirical_normalization: false - obs_groups: - actor: - - actor - critic: - - critic -env: - scene: - model_file: src/unilab/assets/robots/go2w/go2w_mujoco.xml - fragment_files: - - src/unilab/assets/robots/go2w/locomotion_task.xml - terrain: - hfield_name: terrain_hfield - geom_name: floor - generator: - seed: 42 - curriculum: false - size: [8.0, 8.0] - num_rows: 6 - num_cols: 6 - border_width: 20.0 - commands: - vel_limit: [[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]] - resampling_time: 10.0 - heading_command: true - heading_range: [-3.141592653589793, 3.141592653589793] - rel_standing_envs: 0.1 - control_config: - action_scale: 0.25 - hip_action_scale: 0.125 - wheel_action_scale: 5.0 - wheel_Kd: 0.5 - clip_actions: 100.0 - simulate_action_latency: false - terrain_scan: - enabled: true - hfield_name: terrain_hfield - geom_name: floor - termination_config: - terrain_out_of_bounds: true - terrain_distance_buffer: 3.0 - domain_rand: - randomize_base_mass: true - added_mass_range: [-1.0, 3.0] - random_com: true - com_offset_x: [-0.05, 0.05] - randomize_kp: true - kp_multiplier_range: [0.5, 1.0] - randomize_kd: true - kd_multiplier_range: [0.5, 1.0] - push_robots: true - push_interval: 625 - max_force: [1.0, 1.0, 0.5] - push_body_name: base_link -reward: - scales: - tracking_lin_vel: 3.0 - tracking_ang_vel: 1.5 - lin_vel_z: -2.0 - ang_vel_xy: -0.05 - orientation: -2.0 - joint_torques_l2: -2.5e-5 - joint_acc_l2: -2.5e-7 - joint_acc_wheel_l2: -2.5e-9 - joint_power: -2.0e-5 - action_rate: -0.01 - stand_still: -2.0 - hip_pos: -2.0 - joint_pos_penalty: -1.0 - joint_mirror: -0.05 - upward: 1.0 - tracking_sigma: 0.25 - base_height_target: 0.4 - only_positive_rewards: false -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/sharpa_inhand/mujoco_hora.yaml b/conf/ppo/task/sharpa_inhand/mujoco_hora.yaml deleted file mode 100644 index 7937b66ee..000000000 --- a/conf/ppo/task/sharpa_inhand/mujoco_hora.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# @package _global_ -defaults: - - /task/sharpa_inhand/mujoco - - _self_ - -interactive: - action_mode: policy - policy_obs_mode: actor - camera_distance: 1.5 - camera_elevation: -20.0 - camera_azimuth: 90.0 - use_env_visual_model: true - -algo: - algo_log_name: hora_ppo - runtime_impl: hora_ppo - runtime_resolver: unilab.algos.torch.hora.rsl_rl:resolve_hora_ppo_runtime - obs_groups: - actor: [actor] - critic: [actor] - actor: - class_name: unilab.algos.torch.hora:HoraActorModel - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - priv_info_embed_dim: 9 - priv_mlp_hidden_dims: [256, 128, 9] - distribution_cfg: - class_name: GaussianDistribution - init_std: 1.0 - std_type: scalar - critic: - class_name: unilab.algos.torch.hora:HoraCriticModel - hidden_dims: [512, 256, 128] - activation: elu - obs_normalization: true - priv_info_embed_dim: 9 - priv_mlp_hidden_dims: [256, 128, 9] - algorithm: - class_name: unilab.algos.torch.hora:HoraPPO - -env: - obs: - observation_mode: separated diff --git a/conf/ppo/task/stewart_balance/drake.yaml b/conf/ppo/task/stewart_balance/drake.yaml deleted file mode 100644 index cdd440832..000000000 --- a/conf/ppo/task/stewart_balance/drake.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# @package _global_ -training: - task_name: StewartBalance - sim_backend: drake - render_spacing: 4.5 - -env: - drake_backend_mode: batch - drake_nthread: 0 - -algo: - num_envs: 128 - num_steps_per_env: 64 - max_iterations: 400 - empirical_normalization: true - obs_groups: - actor: [policy] - critic: [policy] - actor: - class_name: rsl_rl.models.MLPModel - hidden_dims: [128, 128] - activation: tanh - obs_normalization: true - distribution_cfg: - class_name: rsl_rl.modules.distribution.GaussianDistribution - init_std: 0.3 - std_type: scalar - critic: - class_name: rsl_rl.models.MLPModel - hidden_dims: [128, 128] - activation: tanh - obs_normalization: true - algorithm: - learning_rate: 1.0e-4 - num_learning_epochs: 5 - num_mini_batches: 4 - clip_param: 0.15 - entropy_coef: 1.0e-4 - value_loss_coef: 1.0 - desired_kl: 0.012 - max_grad_norm: 0.5 - gamma: 0.99 - lam: 0.95 - save_interval: 50 - -reward: - scales: - center: 0.7 - progress: 0.6 - still: 3.0 - fall_penalty: -6.0 diff --git a/conf/ppo/task/stewart_balance/motrix.yaml b/conf/ppo/task/stewart_balance/motrix.yaml deleted file mode 100644 index f018225f8..000000000 --- a/conf/ppo/task/stewart_balance/motrix.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# @package _global_ -# Stewart-platform ball-balancing (motrix). A short, runnable PPO baseline, not -# tuned for best final performance (raise max_iterations / num_envs for higher -# success rates). -training: - task_name: StewartBalance - sim_backend: motrix - render_spacing: 4.5 -algo: - num_envs: 128 - num_steps_per_env: 64 - max_iterations: 400 - empirical_normalization: true - obs_groups: - actor: [policy] - critic: [policy] - actor: - class_name: rsl_rl.models.MLPModel - hidden_dims: [128, 128] - activation: tanh - obs_normalization: true - distribution_cfg: - class_name: rsl_rl.modules.distribution.GaussianDistribution - init_std: 0.3 - std_type: scalar - critic: - class_name: rsl_rl.models.MLPModel - hidden_dims: [128, 128] - activation: tanh - obs_normalization: true - algorithm: - learning_rate: 1.0e-4 - num_learning_epochs: 5 - num_mini_batches: 4 - clip_param: 0.15 - entropy_coef: 1.0e-4 - value_loss_coef: 1.0 - desired_kl: 0.012 - max_grad_norm: 0.5 - gamma: 0.99 - lam: 0.95 - save_interval: 50 -reward: - scales: - center: 0.7 - progress: 0.6 - still: 3.0 - fall_penalty: -6.0 -play_profile: - enabled: true - env: - render_spacing: 2.0 diff --git a/conf/ppo/task/x2_wall_flip_tracking/motrix.yaml b/conf/ppo/task/x2_wall_flip_tracking/motrix.yaml deleted file mode 100644 index d2a45c89e..000000000 --- a/conf/ppo/task/x2_wall_flip_tracking/motrix.yaml +++ /dev/null @@ -1,100 +0,0 @@ -# @package _global_ -training: - task_name: X2WallFlipTracking - sim_backend: motrix - play_steps: 300 # 6s play video @ ctrl_dt=0.02 (fps 50) - play_env_num: 16 - render_spacing: 3.0 - cam_distance: 14.0 - cam_azimuth: 225.0 - cam_elevation: -18.0 - cam_lookat: [4.5, 4.5, 1.0] -interactive: - action_mode: policy -algo: - num_envs: 1024 - max_iterations: 9500 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - motrix_max_iterations: 3 - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -play_profile: - enabled: true - env: - render_spacing: 4.0 - scene: - enabled: true - source_model_file: src/unilab/assets/robots/x2/scene_flat_with_wall.xml - ground_texture_file: src/unilab/assets/robots/g1/textures/floor.png - skybox_rgb1: [0.90, 0.90, 0.91] - skybox_rgb2: [0.68, 0.68, 0.70] - ground_texrepeat: [0.25, 0.25] -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/conf/ppo/task/x2_wall_flip_tracking/mujoco.yaml b/conf/ppo/task/x2_wall_flip_tracking/mujoco.yaml deleted file mode 100644 index 83511b770..000000000 --- a/conf/ppo/task/x2_wall_flip_tracking/mujoco.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# @package _global_ -training: - task_name: X2WallFlipTracking - sim_backend: mujoco - play_steps: 300 # 6s play video @ ctrl_dt=0.02 (fps 50) - # Offline-render (play) only — does not affect the training loop. 16 envs are - # laid out on a 4x4 grid; render_spacing must exceed the per-env wall reach - # (~2.14m toward -Y) so neighbouring cells don't overlap. The oblique - # azimuth (225) views the grid corner-on with each robot in front of its - # wall (azimuth 90 would put the walls between camera and robots); lookat is - # the grid centre (offsets span 0..9m in X/Y at spacing 3.0). - play_env_num: 16 - render_spacing: 3.0 - cam_distance: 14.0 - cam_azimuth: 225.0 - cam_elevation: -18.0 - cam_lookat: [4.5, 4.5, 1.0] -interactive: - action_mode: policy -algo: - num_envs: 1024 - max_iterations: 9500 - save_interval: 500 - empirical_normalization: true - obs_groups: - actor: - - actor - critic: - - critic - algorithm: - entropy_coef: 0.005 - desired_kl: 0.01 -env: - sampling_mode: start - truncate_on_clip_end: false - sim_dt: 0.005 - control_config: - action_scale: - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - - 0.25 - anchor_pos_z_threshold: 0.5 - ee_body_pos_z_threshold: 0.5 - terminate_on_undesired_contacts: true - noise_config: - level: 0.0 -reward: - scales: - motion_global_root_pos: 0.5 - motion_global_root_ori: 0.5 - motion_body_pos: 2.0 - motion_body_ori: 1.5 - motion_body_lin_vel: 1.0 - motion_body_ang_vel: 1.0 - motion_ee_body_pos_z: 2.0 - motion_joint_pos: 0.5 - motion_joint_vel: 0.25 - action_rate_l2: -0.005 - joint_limit: -10.0 - undesired_contacts: -0.1 - std_root_pos: 0.3 - std_root_ori: 0.4 - std_body_pos: 0.3 - std_body_ori: 0.4 - std_body_lin_vel: 1.0 - std_body_ang_vel: 3.14 - std_joint_pos: 0.2 - std_joint_vel: 1.0 diff --git a/docs/sphinx/AGENTS.md b/docs/sphinx/AGENTS.md index cf2413609..fad46aaee 100644 --- a/docs/sphinx/AGENTS.md +++ b/docs/sphinx/AGENTS.md @@ -90,7 +90,7 @@ language-independent absolute path. ## Core Principles 1. **Evidence only**: only document facts that can be verified in `src/`, - `conf/`, `tests/`, `scripts/`, ADRs, or generated support data. + `src/unilab/conf/`, `tests/`, `scripts/`, ADRs, or generated support data. 2. **Code is the source of truth**: names, signatures, defaults, Hydra keys, and commands follow the repository, not memory. 3. **Owner layer first**: scripts assemble; contracts live in backend, env, @@ -106,7 +106,7 @@ language-independent absolute path. 7. **Use canonical commands**: user-facing examples use the top-level CLI: `uv run train --algo --task --sim `, `uv run eval ...`, or `uv run demo`. Script paths such as - `scripts/train_rsl_rl.py` may be named as implementation evidence, but they + `src/unilab/scripts/train_rsl_rl.py` may be named as implementation evidence, but they are not the primary command shape for docs readers. ## Before Writing @@ -116,9 +116,9 @@ language-independent absolute path. 3. Search first with `rg` / `rg --files`; update an existing page instead of creating a duplicate. 4. Gather evidence near the claim: - - algorithms and tasks: `conf/`, `scripts/train_*.py`, `src/unilab/algos/` - - env contract: `src/unilab/base/np_env.py`, `src/unilab/training/rsl_rl.py` - - backend contract: `src/unilab/base/backend/base.py` + - algorithms and tasks: `src/unilab/conf/`, `src/unilab/scripts/train_*.py`, `src/unilab/algos/` + - env contract: `src/unilab/base/np_env.py`, `src/unilab/algos/rsl_rl.py` + - backend contract: `unisim.backend.base` - registry: `src/unilab/base/registry.py` - runner/IPC: `src/unilab/ipc/`, `src/unilab/training/run.py` - architecture: ADRs and `development-standard.md` @@ -241,7 +241,7 @@ rules instead of treating the change as docs-only. Before reporting success, confirm: -- all cited `src/`, `conf/`, `tests/`, and `scripts/` paths exist; +- all cited `src/`, `src/unilab/conf/`, `tests/`, and `scripts/` paths exist; - English pages in scope have no manual navigation block; - root, `en/0-index.md`, and `zh_CN/0-index.md` remain included in toctrees; - any warnings from Sphinx are understood and not introduced by the current edit. diff --git a/docs/sphinx/source/adr/ADR-0000-index.md b/docs/sphinx/source/adr/ADR-0000-index.md index 007ef110a..7a7dc6e8b 100644 --- a/docs/sphinx/source/adr/ADR-0000-index.md +++ b/docs/sphinx/source/adr/ADR-0000-index.md @@ -19,6 +19,8 @@ orphan: true | [ADR-0003 Task Owner And Config Compose Contract](ADR-0003-task-owner-and-config-compose-contract.md) | Config owner | Accepted | | [ADR-0004 Registry Bootstrap Contract](ADR-0004-registry-bootstrap-contract.md) | Registry bootstrap | Accepted | | [ADR-0005 Unified Obs Critic Env And IPC Contract](ADR-0005-unified-obs-critic-env-and-ipc-contract.md) | Observation / IPC | Accepted | +| [ADR-0006 Community Manager API On NumPy Runtime](ADR-0006-community-manager-api-on-numpy-runtime.md) | Manager API / NumPy runtime | Accepted | +| [ADR-0007 UniSim Extraction Boundary](ADR-0007-unisim-extraction-boundary.md) | Physics package extraction | Accepted | ## ADR Governance diff --git a/docs/sphinx/source/adr/ADR-0001-runtime-model-and-layer-boundaries.md b/docs/sphinx/source/adr/ADR-0001-runtime-model-and-layer-boundaries.md index 46e228756..7fae6e2f8 100644 --- a/docs/sphinx/source/adr/ADR-0001-runtime-model-and-layer-boundaries.md +++ b/docs/sphinx/source/adr/ADR-0001-runtime-model-and-layer-boundaries.md @@ -58,12 +58,12 @@ UniLab 同时支持多种算法入口和两种仿真后端。没有统一 runtim ## Evidence In Repo - 架构基线文档: `docs/sphinx/source/zh_CN/4-developer_guide/0-index.md` -- Backend 抽象: `src/unilab/base/backend/base.py` +- Backend 抽象: `unisim.backend.base` - Env contract: `src/unilab/base/np_env.py` - Registry 入口: `src/unilab/base/registry.py` - Async runner: `src/unilab/ipc/async_runner.py` - PPO distributed adapter: `src/unilab/ipc/dp_launcher.py`, - `src/unilab/training/rsl_rl.py`, `scripts/train_rsl_rl.py` + `src/unilab/training/rsl_rl.py`, `src/unilab/scripts/train_rsl_rl.py` - PPO distributed tests: `tests/ipc/test_dp_launcher.py`, `tests/algos/test_rsl_rl_ppo.py`, `tests/scripts/test_train_script_configs.py` diff --git a/docs/sphinx/source/adr/ADR-0002-backend-capability-boundary-for-play-and-snapshot.md b/docs/sphinx/source/adr/ADR-0002-backend-capability-boundary-for-play-and-snapshot.md index 323f55982..2578003be 100644 --- a/docs/sphinx/source/adr/ADR-0002-backend-capability-boundary-for-play-and-snapshot.md +++ b/docs/sphinx/source/adr/ADR-0002-backend-capability-boundary-for-play-and-snapshot.md @@ -52,8 +52,8 @@ MuJoCo 与 Motrix 的渲染路径和输出形式不同。仓库当前存在两 ## Evidence In Repo - 后端文档与矩阵: `docs/sphinx/source/zh_CN/2-user_guide/3-backends/0-index.md` -- Backend 抽象: `src/unilab/base/backend/base.py` -- 训练入口与 play 边界: `scripts/train_rsl_rl.py`, `scripts/train_appo.py`, `scripts/train_offpolicy.py` +- Backend 抽象: `unisim.backend.base` +- 训练入口与 play 边界: `src/unilab/scripts/train_rsl_rl.py`, `src/unilab/scripts/train_appo.py`, `src/unilab/scripts/train_sac.py`, `src/unilab/scripts/train_td3.py`, `src/unilab/scripts/train_flashsac.py` ## Related Documents diff --git a/docs/sphinx/source/adr/ADR-0003-task-owner-and-config-compose-contract.md b/docs/sphinx/source/adr/ADR-0003-task-owner-and-config-compose-contract.md index 99d5525f8..42414e966 100644 --- a/docs/sphinx/source/adr/ADR-0003-task-owner-and-config-compose-contract.md +++ b/docs/sphinx/source/adr/ADR-0003-task-owner-and-config-compose-contract.md @@ -25,12 +25,17 @@ orphan: true 2. owner YAML 直接持有 `training.task_name`、`training.sim_backend`、`reward`、`env` 及 task-specific `algo`。 3. `training.sim_backend` 是 owner 身份字段,不是独立 backend switch。 4. CLI override 允许参数覆盖,但不能破坏 task owner 的 backend identity。 +5. Manager-Based production task 也不例外:owner YAML 完整持有 manager/term/callable 与 + observation mapping,compose 后在 Registry 冷路径物化为 typed cfg;Python 不保存 + task-specific config mirror。 ## Stable Contracts -- PPO/APPO owner 路径: `conf/{ppo,appo}/task//.yaml` -- Offpolicy owner 路径: `conf/offpolicy/task///.yaml` +- PPO/APPO owner 路径: `src/unilab/conf/{ppo,appo}/task//.yaml` +- Offpolicy owner 路径: `src/unilab/conf/{sac,td3,flashsac}/task//.yaml`(每个 off-policy 算法一棵独立配置树) - reward 注入与 backend 差异表达必须在 owner YAML 层显式存在。 +- Manager-Based cfg 使用 Hydra `_target_` 与 dotted callable reference;解析失败或类型错误 + 必须在 env/backend 构造前报错。 ## Consequences diff --git a/docs/sphinx/source/adr/ADR-0004-registry-bootstrap-contract.md b/docs/sphinx/source/adr/ADR-0004-registry-bootstrap-contract.md index 7c96f790c..5e0691f82 100644 --- a/docs/sphinx/source/adr/ADR-0004-registry-bootstrap-contract.md +++ b/docs/sphinx/source/adr/ADR-0004-registry-bootstrap-contract.md @@ -35,7 +35,7 @@ UniLab 的 env 注册依赖 `@registry.envcfg(...)` 与 `@registry.env(...)` dec ## Consequences -- 新增 env package 时,需要同步声明 bootstrap modules。 +- 新增 task leaf 时,需要在 `unilab.tasks` 中同步声明 bootstrap module。 - registry 相关回归可以在 `ensure_registries()` 边界直接测试,不必依赖顶层训练脚本间接发现。 - 文档可以把 registry bootstrap 作为正式架构引用,而不是“当前实现细节”。 @@ -48,7 +48,7 @@ UniLab 的 env 注册依赖 `@registry.envcfg(...)` 与 `@registry.env(...)` dec - Registry 入口: `src/unilab/base/registry.py` - Bootstrap helper: `src/unilab/base/registry.py` -- Env package 入口: `src/unilab/envs/locomotion/__init__.py`, `src/unilab/envs/motion_tracking/__init__.py`, `src/unilab/envs/manipulation/__init__.py` +- Task package 入口: `src/unilab/tasks/__init__.py` - Bootstrap tests: `tests/utils/test_algo_utils.py`, `tests/base/test_registry.py` ## Related Documents diff --git a/docs/sphinx/source/adr/ADR-0006-community-manager-api-on-numpy-runtime.md b/docs/sphinx/source/adr/ADR-0006-community-manager-api-on-numpy-runtime.md new file mode 100644 index 000000000..e0ecbf299 --- /dev/null +++ b/docs/sphinx/source/adr/ADR-0006-community-manager-api-on-numpy-runtime.md @@ -0,0 +1,272 @@ +--- +orphan: true +--- + +# ADR-0006 Community Manager API On NumPy Runtime + +语言: 简体中文 + +- Status: Accepted +- Date: 2026-08-17 +- Owners: Env / Config / Backend maintainers +- Supersedes: None +- Superseded by: None + +## Context + +UniLab 的 `NpEnv`、Hydra owner YAML、registry、`SimBackend` 与 heterogeneous +training runtime 已形成稳定 contract,但 task 的 observation、action、reward、 +termination、event、command 与 curriculum 仍主要由各 env 的私有方法组装。用户迁移 +Isaac Lab 或 mjlab task 时,需要重写 manager term、配置和 lifecycle。 + +本决策采用 mjlab v1.6.0 的 manager package 作为可逐文件审查的迁移基线: + +- repository: `mujocolab/mjlab` +- commit: `0fb8a681136be94ffc636a3dd423cabb97d91f10` +- source: `src/mjlab/managers/` 的 12 个 Python 文件 +- license: Apache-2.0;上游 `LICENSE` 声明 + `Copyright 2025, The mjlab Developers` + +该基线只定义 manager-facing API 与语义。它不把 mjlab 的 Torch、Warp、scene +composer、viewer、simulation 或 training runtime 带入 UniLab,也不恢复或参考 UniLab +历史上的 Manager-Based API 实现。 + +## Decision + +### 1. Source-aligned public surface + +`src/unilab/managers/` 按 pinned mjlab package 的模块职责和 exports 直接迁移。以下名称 +是 canonical public surface;Torch 类型替换为 NumPy 类型不构成改名: + +| Module | Canonical exports | +| --- | --- | +| `manager_base` | `ManagerBase`, `ManagerTermBase`, `ManagerTermBaseCfg` | +| `action_manager` | `ActionManager`, `ActionTerm`, `ActionTermCfg` | +| `observation_manager` | `ObservationManager`, `ObservationGroupCfg`, `ObservationTermCfg` | +| `reward_manager` | `RewardManager`, `RewardTermCfg` | +| `termination_manager` | `TerminationManager`, `TerminationTermCfg` | +| `event_manager` | `EventManager`, `EventMode`, `EventTermCfg` | +| `command_manager` | `CommandManager`, `CommandTerm`, `CommandTermCfg`, `NullCommandManager` | +| `curriculum_manager` | `CurriculumManager`, `CurriculumTermCfg`, `NullCurriculumManager` | +| `metrics_manager` | `MetricsManager`, `MetricsTermCfg`, `NullMetricsManager` | +| `recorder_manager` | `RecorderManager`, `RecorderTerm`, `RecorderTermCfg`, `NullRecorderManager` | +| `scene_entity_config` | `SceneEntityCfg` | + +Manager cfg 使用 plain dataclass instance;term 集合使用保持插入顺序的 typed `dict`。 +`func + params`、function/class term、class term 的 `(cfg, env)` 构造和局部 +`reset(env_ids)` 语义保持不变。显式空配置或 term 值为 `None` 表示用户选择禁用,允许 +使用 upstream Null manager/no-op 语义。 + +未来 env lifecycle 的 canonical 名称沿用迁移源的 `ManagerBasedRlEnv` 与 +`ManagerBasedRlEnvCfg`。如果为 Isaac Lab 拼写提供 `ManagerBasedRLEnv` / +`ManagerBasedRLEnvCfg`,它们必须是同一对象的无分支 alias,不能形成第二套实现。 +其他别名必须由实际 migration fixture 证明有价值,不能预先扩张 API。 + +### 2. NumPy runtime boundary + +Manager-facing tensor、buffer、term return、env IDs 和 entity view 使用 +`np.ndarray` 或 `slice`。Torch 的 `device`、`.to()`、`.cpu()` 与 Tensor-only API 不属于 +UniLab manager contract;manager package 不能 import Torch、runner、learner 或 IPC。 + +数值转换保持下列语义: + +- shape、dtype 和更新时序与上游一致;action history 与 observation history 不改变顺序; +- buffer 在 manager 构造或 reset owner 边界分配,step 热路径复用; +- 随机采样使用由 env 拥有并可复现的 NumPy generator,不依赖进程全局 RNG; +- shape 不匹配以及非有限 term 输出在最近 manager/term 边界直接报错;reward 不使用 + `nan_to_num` 把非法值静默变成零; +- observation 明确配置的 noise/delay/history/NaN policy 可以保留,但默认不能掩盖非法 + 输出。 + +### 3. UniLab env、config 与 IPC boundary + +Managers 只依赖一个 typed env context。P0 context 包含 `num_envs`、physics/control dt、 +episode counters、NumPy RNG、各 manager 属性,以及正式 scene/entity facade;不能要求 +`device` 或 backend 私有对象。 + +Manager 内可以使用社区常见的 `policy` / `actor` / `critic` observation group。env owner +必须显式把 actor-facing group 映射为 `NpEnvState.obs["obs"]`,并把可选 critic group +映射为 `NpEnvState.obs["critic"]`。runner、learner 与 IPC 不推断、不拼接 group。 +`reset() -> (obs_dict, info_dict)`、final observation 与 `obs_groups_spec` 保持现有 contract。 + +Production task 的唯一配置 source of truth 是 Hydra owner YAML。它完整声明 scene/backend +tuning、manager/group/term 的顺序与启停、具体 cfg 类型、callable、params、weight 和 +observation group mapping;compose 后按以下冷路径进入现有 registry: + +`owner YAML -> DictConfig -> typed config materialization -> Registry factory -> ManagerBasedRlEnv` + +具体 cfg 类型使用 Hydra `_target_`,term callable 使用完整 dotted reference。通用 +materializer 将其解析为 plain dataclass instance,并在未知字段、target/callable 解析失败、 +抽象或错误 term cfg 类型及缺少必填字段时 fail-closed。Python 只拥有 term 实现、公共 cfg +类型和通用 factory,不保存第二份 task-specific term 清单或默认值;直接构造 typed cfg +只用于底层单测。DictConfig 与解析逻辑不能进入 reset/step 热路径,scripts 不解释 term +业务规则。 + +### 4. Scene/entity owner boundary + +`SceneEntityCfg` 和 term 所需的最小 NumPy entity facade 属于 `src/unilab/base/` 公共 +contract;backend 负责通过 `SimBackend` materialize 名称、ID 和 state/control view,env +负责把 facade 组合进 manager context。该决策解决 #586 的 owner 问题,但不引入完整 +scene composer 或通用 asset hierarchy。 + +- entity name 以及 joint/body/geom/site/actuator selector 在 init/materialization/cache + 冷路径解析一次;热路径只持有已解析 `list[int]`、`np.ndarray` 或 `slice`; +- selector 保留上游 name/regex、`preserve_order`、names/IDs consistency check 和全选压缩为 + `slice(None)` 的语义; +- root/joint/body/site/geom/control 能力只能来自 `SimBackend` 已声明方法;不暴露 backend + model/data 私有对象; +- tendon/camera/light/material/texture/pair 等迁移表面可以存在,但 backend 未声明能力时在 + resolve/materialization 直接 `NotImplementedError`,不能返回空 ID 或跳过; +- 新 backend 能力必须作为独立 child 扩展 `SimBackend` 并补 conformance tests,不能在 + manager 或 env 中用 `getattr` / `hasattr` 探测私有实现。 + +Named sensor 使用 `SimBackend.bind_sensor_data(names)` 在 materialization 冷路径校验名称、 +每个 sensor 的展平宽度、batch shape 与 finite 值,并返回 immutable +`BackendSensorView`。term 热路径只调用 `view.read()`;MuJoCo、Drake 和 MJWarp adapter +分别保留已解析的 host-cache slice 或数值 slot。MotrixSim 当前公开接口只提供 named +sensor accessor、没有数值 sensor ID,因此 Motrix adapter 在 scene materialization 时缓存 +可用名称,并把原生批量 accessor 与 immutable 名称 tuple 封装为 backend-owned opaque +reader;term 不接触名称解析、XML 或 model metadata,未知名称在进入原生调用前 fail-closed。 + +这是 pinned mjlab sensor-facing 语义的 intentional NumPy/backend adaptation:社区侧的 +tensor/device view 在 UniLab 表达为按请求名称顺序拼接的二维 NumPy batch +`(num_envs, sum(sensor_widths))`。名称顺序、单 sensor 宽度和当前值可见,Torch device、 +backend model/data 与原生 handle 不属于 manager contract。 + +### 5. Fail-closed capability rule + +用户显式禁用与实现缺失是两种不同状态。前者允许 Null manager;后者必须失败: + +| Failure | Required behavior | +| --- | --- | +| cfg/term 类型错误、签名或 shape 不匹配 | `TypeError` / `ValueError`,包含 manager 与 term | +| term 输出 NaN/Inf | `ValueError`,包含 manager、group/term 与非法值类别 | +| backend/entity capability 未实现 | `NotImplementedError`,包含 manager、term、capability 与 backend | +| selector name/ID 不存在或不一致 | `KeyError` / `ValueError`,包含 entity 与 selector | + +不得 warning 后 skip、返回零/旧值、自动换 backend、禁用 feature 或回退到旧 env。当前 +不新增公共 exception hierarchy;只有 consumer 证明需要 machine-readable 分类时再单独 +决策。 + +### 6. Performance and deletion policy + +优先级固定为:社区 Manager-Based API 语义与结构一致性,优先于改变公共设计的局部性能 +优化。在此约束下,生产级 NumPy 热路径不能引入明显可避免的重复解析、逐环境 Python +循环、数组复制或临时分配。优化必须由同配置、同硬件 benchmark 证明有足够收益,并优先 +保持在内部预解析、预分配和批量 NumPy 实现;低收益但增加专用 fast path、缓存协议或长期 +复杂度的方案不采用。 + +Production task 迁移后必须在同一 task-family child 删除被替代的旧 dispatch、重复 +reward/config helper 和 bridge。Umbrella 完成时只保留一套 manager lifecycle,不保留 +fallback 到旧单体 env 的永久兼容路径。 + +## Stable Contracts + +### Compatibility matrix + +状态只表示本 ADR 固定的迁移目标;实际 support claim 仍需要代码、注册、配置和测试证据。 + +| Surface | Target | Notes | +| --- | --- | --- | +| manager modules、class/config names、dict order | Compatible | 直接保留 pinned mjlab 1.6.0 表面 | +| function/class term、`params`、local reset | Compatible | class term 在冷路径实例化 | +| action split/apply/history、reward dt scaling、termination timeout split | Compatible | NumPy 实现保持时序 | +| observation groups、clip/scale/noise/delay/history | Adapted | 数值为 NumPy;group 在 env boundary 显式映射 | +| manager buffers、env IDs、RNG | Adapted | Torch→NumPy;无 device API | +| `ManagerBasedRlEnv` return | Adapted | 保留 `NpEnvState` 与 UniLab reset/final-observation contract | +| config container | Adapted | Hydra owner YAML 唯一持有 task 配置,冷路径物化为 plain typed instances | +| `SceneEntityCfg` selectors | Adapted | 语义保留;只解析 `SimBackend` 已声明能力 | +| named sensor view | Adapted | 冷路径 bind;有序展平 NumPy batch;reader 由 backend 拥有 | +| event/domain randomization | Adapted | 调度语义保留;mutation 走 backend DR/capability contract | +| Metrics/Recorder | Adapted | lifecycle hook 存在时启用;缺失时显式失败或显式空配置 | +| Torch device、Warp mutation、viewer glue | Unsupported | 不进入 manager core,不提供静默替代 | +| Omniverse/USD/mjlab Scene/Simulation | Unsupported | 不属于 UniLab runtime | + +### Mechanical migration example + +迁移前的 mjlab term: + +```python +import torch +from mjlab.managers import RewardTermCfg + +def joint_error(env) -> torch.Tensor: + return torch.square(env.joint_pos - env.target_joint_pos).sum(dim=1) + +term = RewardTermCfg(func=joint_error, weight=-1.0) +``` + +迁移后的 UniLab term 只改 import、数值类型和对应 NumPy 运算: + +```python +import numpy as np +from unilab.managers import RewardTermCfg + +def joint_error(env) -> np.ndarray: + return np.square(env.joint_pos - env.target_joint_pos).sum(axis=1) + +term = RewardTermCfg(func=joint_error, weight=-1.0) +``` + +如果迁移还要求重写 term 结构、增加 backend 分支或改 runner/IPC,说明 adapter boundary +不够薄,必须停止并拆出 owner child。 + +### Provenance and change accounting + +每个 source-derived Python 文件必须注明上游 repository、tag/commit、原始路径、 +Apache-2.0 和 UniLab 的修改类别。实现 PR 分别报告: + +1. source-derived:保留的上游结构/语义; +2. mechanical:import、typing、Torch→NumPy 和格式转换; +3. UniLab-specific glue:新 facade、contract adapter 或行为; +4. deleted:删除的上游不适用代码和 UniLab 旧实现。 + +不得通过重新分类隐藏 glue 超预算;不建立长期 upstream mirror 或自动 sync tooling。 + +## Alternatives Considered + +- 重新设计一套更适合 UniLab 的 managers,再提供兼容 facade。拒绝:会形成 + UniLab-only 方言和两套行为,增加用户迁移与长期维护成本。 +- 在 manager 热路径保留 Torch。拒绝:破坏 NumPy runtime、backend isolation 与 + heterogeneous CPU physics → accelerator learner 数据面。 +- 一次迁移完整 mjlab scene/simulation/entity runtime。拒绝:复制第二套 backend/scene + abstraction,并引入 Warp/MuJoCo/Viewer 假设。 +- 先设计 compiler、fused term protocol 或专用 fast path。拒绝:在 benchmark 证明瓶颈前 + 增加结构复杂度,并可能牺牲社区 term 语义。 +- 缺失能力 warning + skip 或回退旧 env。拒绝:配置表面与真实执行不一致,不能用于生产。 +- task-owned Python factory 声明 callable/term,Hydra 只做字段 overlay。拒绝:会让同一 task + 在 Python 和 YAML 中拥有两份配置,增加迁移 friction 和语义漂移。 + +## Consequences + +- Manager port 的审查基线是 pinned upstream diff,而不是重新解释每个 manager 的职责。 +- NumPy、UniLab env/config contract 和显式 unsupported 是允许的偏离;其他偏离必须在 + compatibility matrix 中先记录。 +- Scene/entity 采用最小 base facade,#586 不再阻塞 manager port;真实 backend 能力仍按 + 独立 child 和 conformance evidence 接入。 +- Config/Registry 永久维护一个通用 Hydra `_target_` / dotted callable 到 typed manager cfg + 的冷路径 materializer;production task 不维护 Python config mirror。 +- 迁移初期允许 production 旧 task 与未接入的 manager package 同时存在,但 task 一旦迁移 + 就必须删除对应旧实现;umbrella 结束时不能保留双 lifecycle。 +- 性能 gate 关注明显低效与实测瓶颈,不以复杂度换取未经证明的小收益。 + +## Evidence In Repo + +- Env contract: `src/unilab/base/np_env.py` +- Backend contract: `unisim.backend.base` +- Scene config owner: `src/unilab/base/scene.py` +- Config schema and registry: `src/unilab/structured_configs.py`, + `src/unilab/base/config_materialization.py`, `src/unilab/base/registry.py`, `src/unilab/conf/` +- Observation/IPC contract: `docs/sphinx/source/adr/ADR-0005-unified-obs-critic-env-and-ipc-contract.md` +- Layer boundary: `docs/sphinx/source/adr/ADR-0001-runtime-model-and-layer-boundaries.md` +- Upstream checkout used for the decision: + `/home/user/ws/simulator/mjlab/src/mjlab/managers/` at `0fb8a681` + +## Related Documents + +- {doc}`ADR Index ` +- {doc}`Manager-Based API contract ` +- {doc}`RL Infrastructure 开发标准 ` +- [Roadmap #1042](https://github.com/unilabsim/UniLab/issues/1042) +- [Implementation issue #1043](https://github.com/unilabsim/UniLab/issues/1043) +- [Entity abstraction decision #586](https://github.com/unilabsim/UniLab/issues/586) diff --git a/docs/sphinx/source/adr/ADR-0007-unisim-extraction-boundary.md b/docs/sphinx/source/adr/ADR-0007-unisim-extraction-boundary.md new file mode 100644 index 000000000..fae9944b6 --- /dev/null +++ b/docs/sphinx/source/adr/ADR-0007-unisim-extraction-boundary.md @@ -0,0 +1,92 @@ +--- +orphan: true +--- + +# ADR-0007 UniSim Extraction Boundary + +语言: 简体中文 + +- Status: Accepted +- Date: 2026-09-02 +- Owners: Backend / Packaging / Env / Config maintainers +- Supersedes: None +- Superseded by: None + +## Context + +UniLab 已在 `unisim.backend` 形成统一 `SimBackend` contract,并注册 +MuJoCo、Motrix、Drake、MJWarp、Genesis、IsaacGym 和 IsaacSim。该层仍依赖 UniLab 的 +scene、asset、domain-randomization、dtype、playback 与 runtime helper,无法被物理引擎 +benchmark 或其他消费者独立使用。 + +Roadmap #1428 将统一物理层拆到 GitHub 仓库 `unilabsim/unisim`。PyPI distribution 使用 +`unisim-core`,Python import namespace 使用 `unisim`。本 ADR 固定 owner boundary 和迁移 +约束;不把 manager/task/training runtime 搬入 core,也不建立 benchmark 专属 backend API。 + +## Decision + +### Package and repository + +- `unisim-core` 是 distribution 名称,`unisim` 是唯一 public Python namespace。 +- 新仓库为 public `unilabsim/unisim`,沿用 Apache-2.0。 +- 迁移优先保留可追溯历史(filtered-history/import);不重写 UniLab 现有分支历史。 +- 版本沿用 UniLab 当前版本策略;每个发布版本记录 source commit、迁移说明和兼容范围。 + +### Ownership + +`unisim-core` owns: + +- backend-neutral state/control/reset/mutation 类型、capability、错误和生命周期; +- lazy adapter factory/registry、engine-native runtime 与必要的 subprocess IPC; +- cold-path materialization/selector 和 hot-path buffer/step 规则; +- conformance helper、benchmark API/result schema 预留、package 文档与 PyPI 发布。 + +UniLab owns: + +- Hydra owner YAML、task/env/manager lifecycle、`NpEnvState`、reward/observation/termination; +- runner、learner、checkpoint、sim2sim、robot asset registry、task XML/scene composition; +- 将 task-owned scene、DR、dtype/config 翻译为 UniSim 输入的 adapter layer。 + +`unisim` 不得 import UniLab、Hydra、Torch、Gymnasium、RSL-RL、训练脚本或 task code。 +UniLab env/manager 不得访问 engine model/data/private runtime。 + +### Migration and final state + +首发纵向切片为 core + MuJoCo + Motrix + conformance;benchmark 只预留 API、result schema +和 provenance 字段,当前不实现 workload、测量或结论。 + +roadmap 最终必须迁移并验证全部七类 backend:MuJoCo、Motrix、Drake、MJWarp、Genesis、 +IsaacGym、IsaacSim。迁移完成后,UniLab 删除对应实现、重复测试和 `unilab.base.backend` +compatibility shim,不保留长期双实现。 + +每个 adapter child 必须同时提交代码、focused conformance、support/optional-extra 文档 +和中英文迁移说明。out-of-process adapter 共用一份 subprocess protocol。 + +### Branch and release governance + +- UniLab declared base 是 `dev/issue-1042-manager-based-api`,执行期间只读;`main` 同样只读。 +- roadmap 集成分支为 `dev/issue-1428-unisim-extraction`,从 declared base 的只读快照创建。 +- child branch/PR 只合入 roadmap 集成分支;不得向 UniLab `main` 或 declared base 写入。 +- `unisim-core` 正式版本发布到 PyPI;UniLab 从正式 PyPI 解析 + `unisim-core>=0.1.14`,Python import namespace 为 `unisim`。 + +## Alternatives Considered + +- 继续把 backend 留在 UniLab:无法为独立 benchmark 提供轻量 consumer,依赖边界继续扩大。 +- distribution 与 import 均使用 `unisim-core`:不符合已确认的 public import API。 +- 一次迁移全部 adapter 后再发布首版:风险集中且无法尽早验证 package boundary;采用分阶段 + release,但不缩小最终全量迁移范围。 + +## Evidence In Repo + +- `unisim.backend.base`:统一 `SimBackend` contract。 +- `src/unilab/base/backend_factory.py`:backend factory 与 lazy adapter loading。 +- `tests/base/test_backend_conformance.py`、`tests/base/test_backend_imports.py`:现有边界测试。 +- #888 / PR #892:第一阶段可提取 physics boundary。 +- #1428:跨仓拆分 roadmap、child 顺序与验收标准。 + +## Related Documents + +- `docs/sphinx/source/zh_CN/4-developer_guide/2-contracts/2-backend_contract.md` +- `docs/sphinx/source/zh_CN/4-developer_guide/5-contributing_workflow.md` +- `docs/sphinx/source/zh_CN/4-developer_guide/1-architecture/3-layer_boundaries.md` diff --git a/docs/sphinx/source/adr/README.md b/docs/sphinx/source/adr/README.md index 007ef110a..772be3814 100644 --- a/docs/sphinx/source/adr/README.md +++ b/docs/sphinx/source/adr/README.md @@ -19,6 +19,7 @@ orphan: true | [ADR-0003 Task Owner And Config Compose Contract](ADR-0003-task-owner-and-config-compose-contract.md) | Config owner | Accepted | | [ADR-0004 Registry Bootstrap Contract](ADR-0004-registry-bootstrap-contract.md) | Registry bootstrap | Accepted | | [ADR-0005 Unified Obs Critic Env And IPC Contract](ADR-0005-unified-obs-critic-env-and-ipc-contract.md) | Observation / IPC | Accepted | +| [ADR-0006 Community Manager API On NumPy Runtime](ADR-0006-community-manager-api-on-numpy-runtime.md) | Manager API / NumPy runtime | Accepted | ## ADR Governance diff --git a/docs/sphinx/source/api_reference/algos/index.md b/docs/sphinx/source/api_reference/algos/index.md index 41c42cb8e..7e429d736 100644 --- a/docs/sphinx/source/api_reference/algos/index.md +++ b/docs/sphinx/source/api_reference/algos/index.md @@ -1,22 +1,21 @@ -# `unilab.algos` — Learning Algorithms +# Learning Algorithms — moved to `uni_rl` -- **`unilab.algos.torch`** — PPO (RSL-RL), APPO, FastSAC, FastTD3, FlashSAC, - HIM-PPO, HORA + distillation, generic off-policy runner. +The RL algorithm layer moved out of the `unilab` package into the +independently released **uni_rl** package (distribution name `unilab-rl`, +published on PyPI; issue #1480): -All trainers conform to a single runner contract — see -{doc}`../../en/4-developer_guide/2-contracts/5-runner_lifecycle`. - -```{toctree} -:maxdepth: 2 +- `uni_rl.algos.rsl_rl` / `uni_rl.algos.rsl_rl_ppo` / `uni_rl.algos.rsl_rl_runtime` — PPO (RSL-RL) integration +- `uni_rl.algos.appo` — APPO runner, learner, staging, worker +- `uni_rl.algos.fast_sac` / `uni_rl.algos.fast_td3` / `uni_rl.algos.flash_sac` — off-policy learners and runners +- `uni_rl.offpolicy` — generic off-policy runner, worker, thread budget +- `uni_rl.algos.him_ppo` — HIM-PPO +- `uni_rl.algos.hora` — HORA models, trainers, and distillation +- `uni_rl.algos.common` — shared actor factory, networks, normalization, compile helpers -torch -``` +UniLab keeps the training *entrypoints* (`src/unilab/scripts/train_*.py`), +which inject environments into uni_rl runners through +`uni_rl.env_contract.EnvFactory`; see `src/unilab/base/env_factory.py` for the +registry-backed adapter. -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.algos -``` +All trainers conform to a single runner contract — see +{doc}`../../en/4-developer_guide/2-contracts/5-runner_lifecycle`. diff --git a/docs/sphinx/source/api_reference/algos/torch.md b/docs/sphinx/source/api_reference/algos/torch.md deleted file mode 100644 index 347557974..000000000 --- a/docs/sphinx/source/api_reference/algos/torch.md +++ /dev/null @@ -1,29 +0,0 @@ -# `unilab.algos.torch` - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.algos.torch.common - unilab.algos.torch.appo - unilab.algos.torch.fast_sac - unilab.algos.torch.fast_td3 - unilab.algos.torch.flash_sac - unilab.algos.torch.him_ppo - unilab.algos.torch.hora - unilab.algos.torch.offpolicy -``` - -## Standalone PPO entrypoints - -```{eval-rst} -.. automodule:: unilab.algos.torch.rsl_rl_ppo - :members: -``` - -```{eval-rst} -.. automodule:: unilab.algos.torch.rsl_rl_runtime - :members: -``` diff --git a/docs/sphinx/source/api_reference/backend/index.md b/docs/sphinx/source/api_reference/backend/index.md index b00321b90..da562fb28 100644 --- a/docs/sphinx/source/api_reference/backend/index.md +++ b/docs/sphinx/source/api_reference/backend/index.md @@ -1,7 +1,7 @@ -# `unilab.base.backend` — Simulation Backends +# `unisim-core` — Simulation Backends -UniLab abstracts two CPU-side physics backends behind a single -`SimBackend` contract. +UniSim owns the unified physics contract and all production adapters. UniLab +only assembles task-owned scenes through `unilab.base.backend_factory`. | Backend | Strengths | Notes | |---|---|---| @@ -12,7 +12,7 @@ Pick a backend per task via the top-level `--sim ` CLI flag — see {doc}`../../en/2-user_guide/3-backends/0-index`. ```{eval-rst} -.. autoclass:: unilab.base.backend.base.SimBackend +.. autoclass:: unisim.backend.base.SimBackend :members: :show-inheritance: ``` @@ -23,16 +23,21 @@ Pick a backend per task via the top-level `--sim ` CLI flag — see :template: autosummary/module.rst :recursive: - unilab.base.backend.mujoco - unilab.base.backend.motrix + unisim.backend.mujoco + unisim.backend.motrix + unisim.backend.drake + unisim.backend.mjwarp + unisim.backend.genesis + unisim.backend.isaacgym + unisim.backend.isaacsim ``` ```{eval-rst} -.. automodule:: unilab.base.backend.playback_common +.. automodule:: unisim.backend.playback_common :members: ``` ```{eval-rst} -.. automodule:: unilab.base.backend.motrix_camera +.. automodule:: unisim.backend.motrix_camera :members: ``` diff --git a/docs/sphinx/source/api_reference/base/index.md b/docs/sphinx/source/api_reference/base/index.md index 96ec2b764..1b1da20d6 100644 --- a/docs/sphinx/source/api_reference/base/index.md +++ b/docs/sphinx/source/api_reference/base/index.md @@ -10,7 +10,6 @@ in this reference, read this one. | `Registry` | Task / backend / algorithm registration and lookup | | `Scene` | Cold-path scene materialization | | `observations`, `final_observation` | Observation builders & terminal handling | -| `augmentation` | Symmetry / mirror augmentation utilities | | `curriculum` | Curriculum schedule primitives | ```{eval-rst} @@ -32,7 +31,7 @@ in this reference, read this one. ``` ```{eval-rst} -.. autoclass:: unilab.base.backend.base.SimBackend +.. autoclass:: unisim.backend.base.SimBackend :members: :show-inheritance: :member-order: bysource diff --git a/docs/sphinx/source/api_reference/envs/index.md b/docs/sphinx/source/api_reference/envs/index.md index 6665cd124..f7eb11999 100644 --- a/docs/sphinx/source/api_reference/envs/index.md +++ b/docs/sphinx/source/api_reference/envs/index.md @@ -1,21 +1,11 @@ -# `unilab.envs` — Tasks +# `unilab.envs` — Environment runtime -Concrete RL tasks split by family: +Task-agnostic Manager-Based environment runtime and reusable MDP terms. +Concrete task implementations are owned by {doc}`../tasks/index`. -- **locomotion** — Go1, Go2, Go2w, Go2 + Airbot, Unitree G1 -- **manipulation** — Allegro / Sharpa in-hand cube -- **motion_tracking** — G1 whole-body motion tracking + flips - -Every env inherits `NpEnv` and is registered into the task `Registry` so it -can be selected via `uv run train --algo --task --sim `. - -```{toctree} -:maxdepth: 2 - -locomotion -manipulation -motion_tracking -``` +`ManagerBasedRLEnv` preserves UniLab's NumPy `NpEnv` contract while executing +community-style action, observation, reward, termination, event, command, and +curriculum managers. ```{eval-rst} .. autosummary:: diff --git a/docs/sphinx/source/api_reference/envs/locomotion.md b/docs/sphinx/source/api_reference/envs/locomotion.md deleted file mode 100644 index 1a9d5107a..000000000 --- a/docs/sphinx/source/api_reference/envs/locomotion.md +++ /dev/null @@ -1,15 +0,0 @@ -# `unilab.envs.locomotion` - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.envs.locomotion.common - unilab.envs.locomotion.g1 - unilab.envs.locomotion.go1 - unilab.envs.locomotion.go2 - unilab.envs.locomotion.go2_arm - unilab.envs.locomotion.go2w -``` diff --git a/docs/sphinx/source/api_reference/envs/manipulation.md b/docs/sphinx/source/api_reference/envs/manipulation.md deleted file mode 100644 index 5e2b2b73b..000000000 --- a/docs/sphinx/source/api_reference/envs/manipulation.md +++ /dev/null @@ -1,12 +0,0 @@ -# `unilab.envs.manipulation` - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.envs.manipulation.allegro_inhand - unilab.envs.manipulation.sharpa_inhand - unilab.envs.manipulation.stewart -``` diff --git a/docs/sphinx/source/api_reference/envs/motion_tracking.md b/docs/sphinx/source/api_reference/envs/motion_tracking.md deleted file mode 100644 index c4371bd6b..000000000 --- a/docs/sphinx/source/api_reference/envs/motion_tracking.md +++ /dev/null @@ -1,13 +0,0 @@ -# `unilab.envs.motion_tracking` - -Whole-body motion tracking tasks. G1 humanoid currently ships flip tracking -plus general motion tracking (PPO + SAC variants). - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.envs.motion_tracking.g1 -``` diff --git a/docs/sphinx/source/api_reference/index.md b/docs/sphinx/source/api_reference/index.md index df6920ca1..ea625f7a5 100644 --- a/docs/sphinx/source/api_reference/index.md +++ b/docs/sphinx/source/api_reference/index.md @@ -30,10 +30,16 @@ The contracts everything else depends on: `NpEnv`, `SimBackend`, `Registry`, :::{grid-item-card} 🧪 `unilab.envs` :link: envs/index :link-type: doc -Concrete tasks — locomotion, manipulation, motion tracking — layered on +Manager-Based environment runtime and task-agnostic MDP terms layered on top of `base`. ::: +:::{grid-item-card} 🤖 `unilab.tasks` +:link: tasks/index +:link-type: doc +Concrete locomotion, manipulation, and motion-tracking task packages. +::: + :::: ## Learning stack @@ -41,10 +47,10 @@ top of `base`. ::::{grid} 1 1 2 2 :gutter: 3 -:::{grid-item-card} 🎛 `unilab.algos` +:::{grid-item-card} 🎛 Learning algorithms → `uni_rl` :link: algos/index :link-type: doc -PPO / APPO / SAC / TD3 variants, in PyTorch. +PPO / APPO / SAC / TD3 variants moved to the uni_rl package (issue #1480). ::: :::{grid-item-card} 🏋 `unilab.training` @@ -53,11 +59,11 @@ PPO / APPO / SAC / TD3 variants, in PyTorch. Runtime helpers, monitoring, reward bookkeeping, runner orchestration. ::: -:::{grid-item-card} 🔗 `unilab.ipc` +:::{grid-item-card} 🔗 Shared-memory runtime → `uni_rl.ipc` :link: ipc/index :link-type: doc -Shared-memory rollout and replay primitives that connect CPU workers and -the GPU learner. +Shared-memory rollout and replay primitives moved to the uni_rl package +(issue #1480). ::: :::{grid-item-card} 🧮 `unilab.backend` @@ -91,22 +97,17 @@ Procedural and heightfield terrain generators. Scene rendering and viser bridges. ::: -:::{grid-item-card} 🔧 `unilab.tools` -:link: tools/index -:link-type: doc -Scene export, NaN visualizer, ONNX export. -::: - :::{grid-item-card} 🧰 `unilab.utils` :link: utils/index :link-type: doc Math, IO, and numerical helpers. ::: -:::{grid-item-card} 📝 `unilab.logging` +:::{grid-item-card} 📝 Training logging → `uni_rl.logging` :link: logging/index :link-type: doc -W&B / TensorBoard bridges and structured logging. +W&B / TensorBoard bridges and structured logging moved to the uni_rl package +(issue #1480). ::: :::: @@ -125,6 +126,7 @@ top_level base/index envs/index +tasks/index ``` ```{toctree} @@ -144,7 +146,6 @@ backend/index dr/index terrains/index visualization/index -tools/index utils/index logging/index ``` diff --git a/docs/sphinx/source/api_reference/ipc/index.md b/docs/sphinx/source/api_reference/ipc/index.md index c826fef1a..c91baf41a 100644 --- a/docs/sphinx/source/api_reference/ipc/index.md +++ b/docs/sphinx/source/api_reference/ipc/index.md @@ -1,32 +1,16 @@ -# `unilab.ipc` — Shared-Memory Runtime +# Shared-Memory Runtime — moved to `uni_rl` -The bridge between CPU simulation workers and the GPU learner. Everything -here is a building block of the **async runner** that powers APPO / FastSAC -/ FastTD3 / FlashSAC. +The async IPC layer moved out of the `unilab` package into the independently +released **uni_rl** package (issue #1480): `uni_rl.ipc` hosts the async +runner, shared-memory buffers, replay pipelines, inference slot, DP launcher / +sync, and weight sync. | Submodule | Role | |---|---| -| `async_runner` | The high-level orchestration loop | -| `shared_buffer` | NumPy-backed shared-memory ring/buffer | -| `rollout_ring_buffer` | Rollout window used by on-policy collectors | -| `replay_buffer` | Bounded shared ingress for off-policy transitions | -| `replay_pipelines.*` | Authoritative CUDA/MPS replay ring, device gather, and native H2D | -| `inference_slot` | Fixed shared observation/action slot for learner-owned off-policy inference | -| `weight_sync` | Push learner weights to on-policy collector workers | - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.ipc -``` - -## Async runner - -```{eval-rst} -.. automodule:: unilab.ipc.async_runner - :members: - :show-inheritance: -``` +| `uni_rl.ipc.async_runner` | The high-level orchestration loop | +| `uni_rl.ipc.shared_buffer` | NumPy-backed shared-memory ring/buffer | +| `uni_rl.ipc.rollout_ring_buffer` | Rollout window used by on-policy collectors | +| `uni_rl.ipc.replay_buffer` | Bounded shared ingress for off-policy transitions | +| `uni_rl.ipc.replay_pipelines.*` | Authoritative CUDA/MPS replay ring, device gather, and native H2D | +| `uni_rl.ipc.inference_slot` | Fixed shared observation/action slot for learner-owned off-policy inference | +| `uni_rl.ipc.weight_sync` | Push learner weights to on-policy collector workers | diff --git a/docs/sphinx/source/api_reference/logging/index.md b/docs/sphinx/source/api_reference/logging/index.md index f21a822fb..4750ccf55 100644 --- a/docs/sphinx/source/api_reference/logging/index.md +++ b/docs/sphinx/source/api_reference/logging/index.md @@ -1,12 +1,6 @@ -# `unilab.logging` — Logging Adapters +# Training Logging — moved to `uni_rl` -On-policy / off-policy metric adapters, trace events, common helpers. - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.logging -``` +The W&B / TensorBoard bridges and structured training loggers moved out of +the `unilab` package into the independently released **uni_rl** package +(issue #1480): `uni_rl.logging` hosts `OnPolicyLogger`, `OffPolicyLogger`, +and the trace-event recorder. diff --git a/docs/sphinx/source/api_reference/tasks/index.md b/docs/sphinx/source/api_reference/tasks/index.md new file mode 100644 index 000000000..eb4ed03d1 --- /dev/null +++ b/docs/sphinx/source/api_reference/tasks/index.md @@ -0,0 +1,27 @@ +# `unilab.tasks` — Concrete tasks + +Concrete RL tasks split by family: + +- **locomotion** — A2, Go1, Go2, Go2w, Go2 + Airbot, and Unitree G1 +- **manipulation** — Allegro / Sharpa in-hand cube and Stewart balance +- **motion_tracking** — G1 and X2 whole-body motion tracking + +Every task is registered into the task `Registry` so it can be selected via +`uv run train --algo --task --sim `. + +```{toctree} +:maxdepth: 2 + +locomotion +manipulation +motion_tracking +``` + +```{eval-rst} +.. autosummary:: + :toctree: _autosummary + :template: autosummary/module.rst + :recursive: + + unilab.tasks +``` diff --git a/docs/sphinx/source/api_reference/tasks/locomotion.md b/docs/sphinx/source/api_reference/tasks/locomotion.md new file mode 100644 index 000000000..c4e504491 --- /dev/null +++ b/docs/sphinx/source/api_reference/tasks/locomotion.md @@ -0,0 +1,16 @@ +# `unilab.tasks.locomotion` + +```{eval-rst} +.. autosummary:: + :toctree: _autosummary + :template: autosummary/module.rst + :recursive: + + unilab.tasks.locomotion.a2 + unilab.tasks.locomotion.common + unilab.tasks.locomotion.g1 + unilab.tasks.locomotion.go1 + unilab.tasks.locomotion.go2 + unilab.tasks.locomotion.go2_arm + unilab.tasks.locomotion.go2w +``` diff --git a/docs/sphinx/source/api_reference/tasks/manipulation.md b/docs/sphinx/source/api_reference/tasks/manipulation.md new file mode 100644 index 000000000..328e820de --- /dev/null +++ b/docs/sphinx/source/api_reference/tasks/manipulation.md @@ -0,0 +1,12 @@ +# `unilab.tasks.manipulation` + +```{eval-rst} +.. autosummary:: + :toctree: _autosummary + :template: autosummary/module.rst + :recursive: + + unilab.tasks.manipulation.allegro_inhand + unilab.tasks.manipulation.sharpa_inhand + unilab.tasks.manipulation.stewart +``` diff --git a/docs/sphinx/source/api_reference/tasks/motion_tracking.md b/docs/sphinx/source/api_reference/tasks/motion_tracking.md new file mode 100644 index 000000000..8ca1f557d --- /dev/null +++ b/docs/sphinx/source/api_reference/tasks/motion_tracking.md @@ -0,0 +1,14 @@ +# `unilab.tasks.motion_tracking` + +Whole-body motion-tracking tasks for G1 and X2 robots. + +```{eval-rst} +.. autosummary:: + :toctree: _autosummary + :template: autosummary/module.rst + :recursive: + + unilab.tasks.motion_tracking.common + unilab.tasks.motion_tracking.g1 + unilab.tasks.motion_tracking.x2 +``` diff --git a/docs/sphinx/source/api_reference/tools/index.md b/docs/sphinx/source/api_reference/tools/index.md deleted file mode 100644 index a8e1918a5..000000000 --- a/docs/sphinx/source/api_reference/tools/index.md +++ /dev/null @@ -1,15 +0,0 @@ -# `unilab.tools` — CLI Tools - -Console-script entrypoints registered in `pyproject.toml`: - -- `unilab-viz-nan` — interactive NaN trace viewer for failed runs. -- `unilab-export-scene` — dump the resolved scene of a task to disk. - -```{eval-rst} -.. autosummary:: - :toctree: _autosummary - :template: autosummary/module.rst - :recursive: - - unilab.tools -``` diff --git a/docs/sphinx/source/api_reference/training/index.md b/docs/sphinx/source/api_reference/training/index.md index 5e497f661..80d7238f5 100644 --- a/docs/sphinx/source/api_reference/training/index.md +++ b/docs/sphinx/source/api_reference/training/index.md @@ -1,8 +1,10 @@ # `unilab.training` — Training Runtime -Glue between `algos`, `envs` and `ipc`: experiment lifecycle, metric -monitoring, reward bookkeeping, seeding, and the top-level `run` helpers -invoked by the `train` / `eval` / `demo` CLI entrypoints. +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, +checkpoint resolution, sim2sim contracts) live in `unilab.utils`; resolved +env config adaptation lives in `unilab.base.config_adapter`. ```{eval-rst} .. autosummary:: diff --git a/docs/sphinx/source/api_reference/utils/index.md b/docs/sphinx/source/api_reference/utils/index.md index 99e6e4270..30a8b0133 100644 --- a/docs/sphinx/source/api_reference/utils/index.md +++ b/docs/sphinx/source/api_reference/utils/index.md @@ -1,7 +1,9 @@ # `unilab.utils` — Utilities -Device probing, tensor helpers, support-matrix bookkeeping, NaN guards, -and pure-numpy geometry/rotation helpers shared across envs and scripts. +Device probing, tensor helpers, training seeding, hardware monitoring, +reward bookkeeping, checkpoint resolution, sim2sim contract checks, NaN +guards, and pure-numpy geometry/rotation helpers shared across envs and +scripts. ```{eval-rst} .. autosummary:: diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index b818430fa..03721f11a 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -275,7 +275,11 @@ # instead of bouncing to the language index. Forward direction only — reverse # map is computed below. _LANGUAGE_PATH_FORWARD: dict[str, str] = { + "en/2-user_guide/3-backends/6-drake": "zh_CN/2-user_guide/3-backends/6-drake", "en/1-getting_started/5-faq": "zh_CN/1-getting_started/5-faq", + "en/4-developer_guide/1-architecture/6-manager_based_api": ( + "zh_CN/4-developer_guide/1-architecture/6-manager_based_api" + ), } # Keyed by (current_pagename, target_language) → target_pagename. _LANGUAGE_PATH_MAP: dict[tuple[str, str], str] = {} diff --git a/docs/sphinx/source/en/0-index.md b/docs/sphinx/source/en/0-index.md index ad2a30b34..5b17d0860 100644 --- a/docs/sphinx/source/en/0-index.md +++ b/docs/sphinx/source/en/0-index.md @@ -10,14 +10,15 @@ sd_hide_title: true # UniLab -### Contract-driven robot learning infrastructure for CPU simulation and accelerator learning. +### Configure task semantics once. Run robot RL across physics backends. -{bdg-primary}`Python >=3.10,<3.14` {bdg-secondary}`Hydra owner YAML` {bdg-info}`MuJoCo + Motrix` {bdg-success}`uv workflow` +{bdg-primary}`Python >=3.10,<3.14` {bdg-secondary}`Hydra + Manager API` {bdg-info}`Cross-backend contract` {bdg-success}`uv workflow` -UniLab routes robot RL through the `uv run train` / `uv run eval` CLI, -task-owner Hydra configs, and backend contracts. Use the landing page to -install, run a smoke training job, choose an algorithm/backend, or jump into -deployment and extension docs. +UniLab turns task semantics into reusable configuration: assemble manager terms, +select a physics backend, and run the same train/eval workflow on the hardware +available to you. Use this landing page to install, run a first demo, follow it +with a smoke job, choose an algorithm or backend, or jump into deployment and +extension docs. ```{button-ref} 1-getting_started/1-quick_demo :ref-type: doc @@ -43,20 +44,22 @@ User guide ::::{grid} 1 1 3 3 :gutter: 3 -:::{grid-item-card} CPU simulation, accelerator learning -The README describes UniLab as CPU physics simulation connected to policy -training through shared memory, with MuJoCo and Motrix as simulation backends. +:::{grid-item-card} Configure tasks without boilerplate +Compose actions, observations, rewards, terminations, events, commands, and +curricula from manager terms in Hydra owner YAML. Common task variants need no +new environment class. ::: :::{grid-item-card} Backend choice stays in config -Switch backends with CLI flags such as `--task go2_joystick_flat --sim motrix`; -the CLI composes the matching owner YAML under `conf/`. Do not use -`training.sim_backend` as a standalone backend switch. +Move between current and future physics adapters with CLI flags such as +`--task go2_joystick_flat --sim motrix`; the CLI composes the matching owner +YAML under `src/unilab/conf/`. ::: -:::{grid-item-card} Deployment paths are documented -The deployment docs cover sim-to-real, sim-to-sim, ONNX/runtime export, safety -layers, and robot-specific notes for G1, Go2, and Allegro. +:::{grid-item-card} Scale across hardware +The task contract connects CPU-parallel and external-worker simulation to +accelerator learners, so the experiment can grow with the hardware available +to you. ::: :::: @@ -68,6 +71,7 @@ curl -LsSf https://astral.sh/uv/install.sh | sh git clone https://github.com/unilabsim/UniLab.git cd UniLab uv sync --extra motrix +uv run demo dance uv run train --algo ppo --task go2_joystick_flat --sim motrix \ algo.max_iterations=1 algo.num_envs=16 training.no_play=true ``` @@ -90,13 +94,15 @@ machine. :::{grid-item-card} Run or replay training :link: 1-getting_started/1-quick_demo :link-type: doc -Start with PPO on Go2, then move to evaluation, playback, or checkpoint resume. +Run a pre-trained demo first, then move to PPO training, evaluation, playback, +or checkpoint resume. ::: -:::{grid-item-card} Choose a backend -:link: 2-user_guide/3-backends/3-choosing_a_backend +:::{grid-item-card} Choose a physics backend +:link: 2-user_guide/3-backends/0-index :link-type: doc -Compare MuJoCo and Motrix through task owner YAMLs and backend capability docs. +Select a backend through task owner YAMLs and read its installation and +capability requirements. ::: :::{grid-item-card} Pick an algorithm @@ -125,12 +131,13 @@ tasks, backends, algorithms, or terrain. ```{mermaid} flowchart LR - cli["uv run train/eval
--algo --task --sim"] --> owner["Task owner YAML
conf/*/task/..."] - cli --> script["Thin script routing
scripts/train_*.py"] + cli["uv run train/eval
--algo --task --sim"] --> owner["Task owner YAML
src/unilab/conf/*/task/..."] + cli --> script["Thin script routing
src/unilab/scripts/train_*.py"] owner --> registry["Registry bootstrap
src/unilab/base/registry.py"] registry --> env["NpEnv contract
obs dict + info dict"] - env --> backend["SimBackend
MuJoCo or Motrix"] - env --> runtime["Runner / IPC
shared memory lifecycle"] + env --> backend["SimBackend
unisim-core adapters"] + env --> factory["EnvFactory contract"] + factory --> runtime["Runner / IPC
unilab-rl async runtime"] runtime --> learner["Learner
PPO / APPO / SAC / TD3"] ``` @@ -148,11 +155,11 @@ committed benchmark manifest or separate recommendation metadata. | --- | --- | --- | | Go1 joystick | PPO, APPO, TD3 | PPO has tested MuJoCo and Motrix rows. APPO has tested MuJoCo rows and Motrix registered rows. TD3 has a Motrix owner YAML for `go1_joystick_flat`. | | Go2 joystick | PPO, FlashSAC, TD3 | PPO has tested MuJoCo and Motrix rows. FlashSAC has MuJoCo owner YAMLs for `go2_joystick_flat`; TD3 has a Motrix owner YAML for `go2_joystick_flat`. | -| Go2 arm manip-loco | PPO, HIM-PPO | Committed MuJoCo owner YAMLs are present under `conf/ppo/task/go2_arm_manip_loco/` and `conf/ppo_him/task/go2_arm_manip_loco/`. | -| Go2W joystick | PPO | PPO owner YAMLs exist for MuJoCo and Motrix flat/rough variants under `conf/ppo/task/go2w_joystick_*`. | +| Go2 arm manip-loco | PPO, HIM-PPO | Committed MuJoCo owner YAMLs are present under `src/unilab/conf/ppo/task/go2_arm_manip_loco/` and `src/unilab/conf/ppo_him/task/go2_arm_manip_loco/`. | +| Go2W joystick | PPO | PPO owner YAMLs exist for MuJoCo and Motrix flat/rough variants under `src/unilab/conf/ppo/task/go2w_joystick_*`. | | G1 locomotion / tracking | PPO, APPO, SAC, TD3 | PPO, APPO, and SAC include committed MuJoCo and Motrix owner YAMLs for G1 tasks; TD3 has a `g1_walk_flat` MuJoCo owner. | | Allegro in-hand | PPO, APPO | PPO and APPO have committed MuJoCo and Motrix owner YAMLs for Allegro in-hand tasks. | -| Sharpa in-hand | PPO, APPO HORA teacher, HORA distillation | Sharpa owner YAMLs are committed for PPO/APPO teacher paths; student distillation uses `conf/hora_distill/task/sharpa_inhand/mujoco.yaml`. | +| Sharpa in-hand | PPO, APPO HORA teacher, HORA distillation | Sharpa owner YAMLs are committed for PPO/APPO teacher paths; student distillation uses `src/unilab/conf/hora_distill/task/sharpa_inhand/mujoco.yaml`. | ```{toctree} :hidden: diff --git a/docs/sphinx/source/en/1-getting_started/1-quick_demo.md b/docs/sphinx/source/en/1-getting_started/1-quick_demo.md index d7c3327b3..91e35b3af 100644 --- a/docs/sphinx/source/en/1-getting_started/1-quick_demo.md +++ b/docs/sphinx/source/en/1-getting_started/1-quick_demo.md @@ -33,7 +33,20 @@ make setup-motrix # make sync-xpu ``` -## Train +## First Success + +Run a pre-trained policy before changing any task configuration: + +```bash +# Fetches the checkpoint and assets from Hugging Face on first run. +uv run demo dance +``` + +Available demo names are `teaser`, `dance`, `wallflip`, `boxtracking`, +`locomani`, and `inhandgrasp`. Use `uv run demo --help` for device and refresh +options. + +## Train A Task ```bash uv run train --algo ppo --task go2_joystick_flat --sim motrix @@ -43,7 +56,7 @@ This command routes to the registered `go2_joystick_flat` task with the Motrix backend. The CLI keeps algorithm, task, and backend selection explicit through `--algo`, `--task`, and `--sim`; internally it composes the matching owner YAML. -## Evaluate Or Demo +## Evaluate And Replay ```bash uv run eval --algo ppo --task go2_joystick_flat --sim motrix --load-run -1 @@ -52,12 +65,8 @@ uv run eval --algo ppo --task go2_joystick_flat --sim motrix --load-run -1 uv run eval --algo ppo --task go2_joystick_flat --sim motrix \ --load-run -1 --render-mode record -# Demo playback (fetches a pre-trained checkpoint from Hugging Face on first run) -uv run demo dance ``` -Available demo names: `teaser`, `dance`, `wallflip`, `boxtracking`, `locomani`, `inhandgrasp`. - Mainland China users: motions, scenes, robot meshes, and demo checkpoints come from Hugging Face on first run. If `huggingface.co` is unreachable, switch to the community mirror before running training, eval, or demo commands: diff --git a/docs/sphinx/source/en/1-getting_started/2-installation.md b/docs/sphinx/source/en/1-getting_started/2-installation.md index cc590dbd4..b2d7f727d 100644 --- a/docs/sphinx/source/en/1-getting_started/2-installation.md +++ b/docs/sphinx/source/en/1-getting_started/2-installation.md @@ -7,8 +7,9 @@ live in the getting-started and algorithm pages. - Python `>=3.10,<3.14`, from `pyproject.toml`. - `uv`, used for dependency sync and command execution. -- `cmake`, required by the local setup documented in - `docs/sphinx/source/zh_CN/1-getting_started/2-installation.md`. +- Git and `curl`, used to clone the repository and fetch runtime assets. +- `cmake`, required when building the Drake native batch extension. The Drake + setup script uses CMake and a C++ toolchain. - For the `mujoco` extra: a C++17 toolchain and Python development headers, because `mujoco-uni-runtime` ships as a source distribution and compiles its native extension during `uv sync` (against the locked mujoco version). @@ -23,39 +24,69 @@ live in the getting-started and algorithm pages. ## Clone And Sync ```bash +# Linux / macOS: curl -LsSf https://astral.sh/uv/install.sh | sh + +# Windows PowerShell: +# powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" + git clone https://github.com/unilabsim/UniLab.git cd UniLab +# Recommended main-environment interpreter: +uv python install 3.13 ``` +UniLab accepts Python `3.10` through `3.13`; `3.13` is the recommended main +environment. IsaacGym and IsaacSim use their own worker Python versions below. + +If you plan to use Drake, install CMake on the host as well: + ```bash +# macOS: brew install cmake + # Ubuntu / Debian: # sudo apt-get install cmake ``` -Choose one sync path: +Choose one core setup path: ```bash +# Full default setup: MuJoCo + Motrix, with shell completion. make setup -make setup-motrix + +# Fastest path for the first Motrix demo. +# make setup-motrix + +# MuJoCo only. +# make setup-mujoco ``` -`make setup` runs `uv sync` and installs shell completion. `make setup-motrix` -runs `uv sync --extra motrix` and installs the same completion entry. If `make` -is unavailable, run the underlying sync directly: +`make setup` runs `uv sync --extra mujoco --extra motrix` and installs shell +completion. `make setup-motrix` runs `uv sync --extra motrix` and installs the +same completion entry. `make setup-mujoco` runs `uv sync --extra mujoco` and +installs completion. Run only one of these paths. If `make` is unavailable, run +the matching commands directly: ```bash -uv sync -uv sync --extra motrix +# Full default setup: +uv sync --extra mujoco --extra motrix +uv run --no-sync unilab-complete install + +# Motrix only: +# uv sync --extra motrix && uv run --no-sync unilab-complete install + +# MuJoCo only: +# uv sync --extra mujoco && uv run --no-sync unilab-complete install ``` ## Conda And Pip The recommended path is still the in-repo `make setup` / `make setup-motrix` (or -`uv`) workflow. Conda can serve as an outer environment for Python, CUDA, or -system-library isolation, but once the environment is active keep using the -repository's `make` / `uv` commands inside it: +`uv`) workflow. Use `make setup-mujoco` when Motrix is not needed. Conda can +serve as an outer environment for Python, CUDA, or system-library isolation, +but once the environment is active keep using the repository's `make` / `uv` +commands inside it: ```bash conda create -n unilab python=3.13 @@ -66,20 +97,111 @@ cd UniLab make setup-motrix ``` -Use `make setup` if you do not need Motrix. ROCm and XPU still go through the -platform-specific `make` targets below. +Use `make setup-mujoco` if you do not need Motrix. ROCm and XPU still go through +the platform-specific `make` targets below. + +From a source checkout, pip is a fallback path. Install the package first, then +add optional runtimes explicitly: + +```bash +# Editable install for local development: +pip install -e . + +# Regular install (omit -e) for a wheel-style deployment: +# pip install . + +# Motrix, when needed: +pip install motrixsim-core==0.8.2 + +# MuJoCo, when needed (install the runtime in two steps): +pip install "mujoco>=3.5,<3.11" pybind11 wheel +pip install --no-build-isolation "mujoco-uni-runtime==0.4.0" +``` + +The editable install points at the checkout; the regular install copies the +package and its task configs (`unilab/conf/`) into the environment. In both +cases, `train`, `eval`, and `demo` work from any directory, while logs and +checkpoints are written under the current working directory. The MuJoCo runtime +must be installed after the matching `mujoco` package and with +`--no-build-isolation`; pip's default isolated build cannot see that dependency. +For MJWarp, Genesis, platform-specific torch indexes, ROCm/XPU profiles, and +native-extension rebuild behavior, prefer the uv paths above. Robot meshes and +textures are intentionally excluded from the wheel and downloaded on the cold +path from the `unilabsim/unilab-robots` dataset. Ensure the installed package +location is writable, or pre-fetch assets with `uv run unilab-pull-assets` from a +source checkout. The isaacgym / isaacsim backends and the HORA multi-GPU +submission path still assume a source checkout; use their dedicated setup pages +below. + +## Runtime Assets + +Large assets are not bundled into the wheel; they are downloaded lazily on +cold paths (first use of the owning feature) from Hugging Face dataset repos: + +- [Robot meshes and textures](https://huggingface.co/datasets/unilabsim/unilab-robots) +- [Motion clips](https://huggingface.co/datasets/unilabsim/unilab-motions) +- [Scenes](https://huggingface.co/datasets/unilabsim/unilab-scenes) +- [Grasp caches](https://huggingface.co/datasets/unilabsim/unilab-caches) +- [Demo checkpoints](https://huggingface.co/datasets/unilabsim/unilab-checkpoints) + +Pre-fetch robot assets with `uv run unilab-pull-assets`. For mainland China, +set `HF_ENDPOINT=https://hf-mirror.com` when the default Hugging Face endpoint +is unreachable. + +## Backend Extras + +The base package installs the public `unisim-core` contract; simulator-specific +dependencies are optional. Choose the path that matches your backend. The +commands below are alternatives for a single-backend environment. If you plan +to compare several in-process backends, combine their extras in one `uv sync` +command; external worker scripts remain separate. + +For example, a local comparison environment can install MuJoCo, Motrix, MJWarp, +and Genesis together: -`pip install -e .` and `pip install .` are only for dev verification inside a -source checkout; they do not yet support running training from an arbitrary -directory via a built wheel/sdist. The training entrypoints still depend on the -repository's `conf/` and `scripts/`. The pip-only / out-of-repo / published-wheel -validation path is tracked by issue #360. +```bash +uv sync --extra mujoco --extra motrix --extra mjwarp --extra genesis +``` + +| Backend | Install path | Important prerequisites | +| --- | --- | --- | +| MuJoCo | `make setup-mujoco` or `uv sync --extra mujoco` | C++17 compiler and Python development headers for the native extension | +| Motrix | `make setup-motrix` or `uv sync --extra motrix` | Motrix runtime is installed from the pinned Python package | +| MJWarp | `uv sync --extra mujoco --extra mjwarp` | NVIDIA CUDA and an explicit CUDA process device | +| Genesis | `uv sync --extra genesis` | The validated path uses Linux x86_64, an NVIDIA GPU, and the pinned torch/Genesis versions | +| Drake | `make setup-drake` | C++20, Eigen/fmt/spdlog, and an existing Drake prefix or the script's download path | +| IsaacGym | `bash scripts/tools/setup_isaacgym_env.sh` | Linux x86_64, NVIDIA driver, and a separate Python 3.8 worker environment | +| IsaacSim | `bash scripts/tools/setup_isaacsim_env.sh` | Linux x86_64, NVIDIA CUDA, a separate Python 3.11 worker, and Kit EULA acceptance | + +The Drake, IsaacGym, and IsaacSim setup scripts install their external runtime +outside the repository and can be re-run safely. They do not install the +external simulator into the main UniLab environment. Read the backend pages for +runtime variables, renderer requirements, and verification commands: + +- {doc}`MuJoCo <../2-user_guide/3-backends/1-mujoco>` +- {doc}`Motrix <../2-user_guide/3-backends/2-motrix>` +- {doc}`MJWarp <../2-user_guide/3-backends/0-index>` +- {doc}`Genesis <../2-user_guide/3-backends/5-genesis>` +- {doc}`Drake <../2-user_guide/3-backends/6-drake>` +- {doc}`IsaacGym <../2-user_guide/3-backends/3-isaacgym>` +- {doc}`IsaacSim <../2-user_guide/3-backends/4-isaacsim>` ## Platform Profiles Linux CUDA and macOS use the default `pyproject.toml`. The default Linux torch wheel source is the PyTorch `cu128` index configured in `pyproject.toml`. +On Apple Silicon macOS, `make setup-motrix` is the shortest interactive path. +The CLI routes Motrix playback through `mxpython` when needed; MuJoCo playback +uses the `mjpython` application bundled by the official MuJoCo wheel. Torch's +`mps` device is selected automatically when available, and the portable +`cuda` alias resolves to MPS when CUDA is absent. + +On Windows, use the direct `uv sync` commands from above unless GNU `make` and +Bash are available. Building the MuJoCo native extension requires MSVC Build +Tools and Python development headers. If you want to use the Makefile, install +GNU Make and Bash separately (for example through Chocolatey or WSL). + ROCm and Intel XPU have explicit Makefile targets: ```bash @@ -102,6 +224,16 @@ ROCm notes: (or `uv sync --extra motrix`); confirm the active profile before committing any non-ROCm dependency change. - The training device field keeps `cuda` semantics; do not set it to `rocm`. +- When installing from PyPI instead of a source checkout, `make sync-rocm` does + not apply. Install the torch build validated by the repository from the + PyTorch ROCm index first, then `unilab`. The published dependency range is + `torch>=2.8,<2.12`, so pip keeps the installed ROCm build instead of + replacing it with the CUDA wheel: + + ```bash + pip install torch==2.11.0 --index-url https://download.pytorch.org/whl/rocm7.2 + pip install unilab + ``` Intel XPU notes: @@ -117,7 +249,8 @@ For a local package mirror, set the uv index before syncing: ```bash export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple -uv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple +uv sync --extra mujoco --extra motrix \ + --index-url https://pypi.tuna.tsinghua.edu.cn/simple ``` ## Smoke Check diff --git a/docs/sphinx/source/en/1-getting_started/3-evaluation_and_playback.md b/docs/sphinx/source/en/1-getting_started/3-evaluation_and_playback.md index 42f6f70bd..43e187961 100644 --- a/docs/sphinx/source/en/1-getting_started/3-evaluation_and_playback.md +++ b/docs/sphinx/source/en/1-getting_started/3-evaluation_and_playback.md @@ -22,37 +22,43 @@ Render modes: - `record` — write MP4 to `runs//playback/`. - `none` — skip rendering, just compute metrics. +For `--sim mujoco --render-mode interactive`, `uv run eval` launches the dedicated +`play_interactive.py` MuJoCo viewer directly. This mode rolls out one environment +so the viewer camera and controls remain interactive; `training.play_env_num` is +ignored. + `training.export_onnx=false` currently applies only to the off-policy playback path -(`scripts/train_offpolicy.py` and CLI runs with `--algo sac|td3|flashsac`). It skips +(`src/unilab/scripts/train_sac.py` / `src/unilab/scripts/train_td3.py` / `src/unilab/scripts/train_flashsac.py` +and CLI runs with `--algo sac|td3|flashsac`). It skips `policy.onnx` export and verification but still runs playback and video recording. ## MuJoCo Viewer Scripts Use `uv run eval` for regular evaluation and video export. When you need a live `mujoco.viewer` window for policy debugging, use the low-level -`scripts/play_interactive.py` script. +`src/unilab/scripts/play_interactive.py` script. -`scripts/play_interactive.py` is the general MuJoCo viewer entrypoint for PPO, +`src/unilab/scripts/play_interactive.py` is the general MuJoCo viewer entrypoint for PPO, APPO, SAC, FlashSAC, and HORA distill policies. It uses `--algo / --task / --sim` to select the algorithm and owner config. The viewer is always `mujoco.viewer`; `--sim` only selects which config to read. ```bash # Use the owner config's interactive.action_mode; the global default is zero action -uv run scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco +uv run src/unilab/scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco # Random actions -uv run scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco \ +uv run src/unilab/scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco \ interactive.action_mode=random # Policy actions -uv run scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco \ +uv run src/unilab/scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco \ algo.load_run=-1 interactive.action_mode=policy -uv run scripts/play_interactive.py --algo flashsac --task g1_walk_flat --sim motrix \ +uv run src/unilab/scripts/play_interactive.py --algo flashsac --task g1_walk_flat --sim motrix \ algo.load_run=-1 interactive.action_mode=policy -uv run scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco \ +uv run src/unilab/scripts/play_interactive.py --algo ppo --task go2_joystick_flat --sim mujoco \ interactive.action_mode=policy interactive.keyboard=true ``` diff --git a/docs/sphinx/source/en/1-getting_started/4-project_structure.md b/docs/sphinx/source/en/1-getting_started/4-project_structure.md index 40ab3d3d2..fa19760fc 100644 --- a/docs/sphinx/source/en/1-getting_started/4-project_structure.md +++ b/docs/sphinx/source/en/1-getting_started/4-project_structure.md @@ -7,11 +7,11 @@ changing behavior. | Path | Owner Role | | --- | --- | | `scripts/` | Thin training and tooling entrypoints. Scripts compose Hydra config and call owner-layer code. | -| `conf/` | Hydra roots and task owner YAMLs. The top-level CLI exposes backend selection as `--task` plus `--sim`, then composes the matching owner YAML. | +| `src/unilab/conf/` | Hydra roots and task owner YAMLs. The top-level CLI exposes backend selection as `--task` plus `--sim`, then composes the matching owner YAML. | | `src/unilab/base/` | Registry, env state, scene, and backend contracts. | | `src/unilab/envs/` | Task env implementations and task-specific reset, reward, observation, and DR logic. | -| `src/unilab/algos/` | PPO, APPO, off-policy, HIM-PPO, and HORA algorithm code. | -| `src/unilab/ipc/` | Shared-memory and async runner primitives. | +| `uni_rl` (unilab-rl repo) | PPO, APPO, off-policy, HIM-PPO, and HORA algorithm code. | +| `uni_rl.ipc` (unilab-rl repo) | Shared-memory and async runner primitives. | | `src/unilab/training/` | Shared training helpers for logging, playback, seed handling, and config guards. | | `src/unilab/visualization/` | Playback, rendering, NaN inspection, and scene/export utilities. | | `tests/` | Contract, config, env, algorithm, script, and integration tests. | @@ -22,11 +22,12 @@ changing behavior. The main config roots are: -- `conf/ppo/config.yaml` for torch PPO. -- `conf/appo/config.yaml` for APPO. -- `conf/offpolicy/config.yaml` plus `conf/offpolicy/algo/*.yaml` for SAC, - TD3, and FlashSAC. -- `conf/ppo_him/config.yaml` and `conf/hora_distill/config.yaml` for the +- `src/unilab/conf/ppo/config.yaml` for torch PPO. +- `src/unilab/conf/appo/config.yaml` for APPO. +- `src/unilab/conf/sac/config.yaml`, `src/unilab/conf/td3/config.yaml`, and + `src/unilab/conf/flashsac/config.yaml` for SAC, TD3, and FlashSAC, each with its + algorithm hyperparameters inlined. +- `src/unilab/conf/ppo_him/config.yaml` and `src/unilab/conf/hora_distill/config.yaml` for the specialized HIM-PPO and HORA paths. Task owner YAMLs are the backend identity. Examples: diff --git a/docs/sphinx/source/en/2-user_guide/1-training/1-cli_reference.md b/docs/sphinx/source/en/2-user_guide/1-training/1-cli_reference.md index 5809775a8..914ef33b6 100644 --- a/docs/sphinx/source/en/2-user_guide/1-training/1-cli_reference.md +++ b/docs/sphinx/source/en/2-user_guide/1-training/1-cli_reference.md @@ -7,11 +7,11 @@ keeps the lower-level scripts available for debugging Hydra composition. | Goal | Command Shape | Routed Script | | --- | --- | --- | -| PPO | `uv run train --algo ppo --task --sim ` | `scripts/train_rsl_rl.py` | -| APPO | `uv run train --algo appo --task --sim ` | `scripts/train_appo.py` | -| SAC | `uv run train --algo sac --task --sim ` | `scripts/train_offpolicy.py` | -| TD3 | `uv run train --algo td3 --task --sim ` | `scripts/train_offpolicy.py` | -| FlashSAC | `uv run train --algo flashsac --task --sim ` | `scripts/train_offpolicy.py` | +| PPO | `uv run train --algo ppo --task --sim ` | `src/unilab/scripts/train_rsl_rl.py` | +| APPO | `uv run train --algo appo --task --sim ` | `src/unilab/scripts/train_appo.py` | +| SAC | `uv run train --algo sac --task --sim ` | `src/unilab/scripts/train_sac.py` | +| TD3 | `uv run train --algo td3 --task --sim ` | `src/unilab/scripts/train_td3.py` | +| FlashSAC | `uv run train --algo flashsac --task --sim ` | `src/unilab/scripts/train_flashsac.py` | Examples: @@ -42,22 +42,33 @@ On a fresh checkout, one setup command syncs the environment and installs the completion: ```bash +# Full default environment (MuJoCo + Motrix): make setup -# When you need Motrix: -make setup-motrix +# MuJoCo only: +# make setup-mujoco + +# Motrix only (the shortest path for Motrix demos): +# make setup-motrix ``` -`make setup` runs `uv sync` followed by `uv run --no-sync unilab-complete install`; -`make setup-motrix` runs `uv sync --extra motrix` followed by the same completion -install. The install command picks Bash or Zsh from `$SHELL` / platform and only -writes user-level rc files. The current shell is not auto-activated; reopen the -terminal or source the rc file to apply. +`make setup` runs `uv sync --extra mujoco --extra motrix` followed by +`uv run --no-sync unilab-complete install`; `make setup-mujoco` and +`make setup-motrix` select only their named extra and install the same completion. +Choose one setup path for an environment. The install command picks Bash or Zsh +from `$SHELL` / platform and only writes user-level rc files. The current shell +is not auto-activated; reopen the terminal or source the rc file to apply. If `make` is unavailable, run the steps directly: ```bash -uv sync && uv run --no-sync unilab-complete install +# Full default environment: +uv sync --extra mujoco --extra motrix +uv run --no-sync unilab-complete install + +# Or choose one backend extra: +# uv sync --extra mujoco && uv run --no-sync unilab-complete install +# uv sync --extra motrix && uv run --no-sync unilab-complete install ``` Bash users (Linux / WSL) can instead add this to `~/.bashrc`: @@ -90,6 +101,9 @@ uv run eval --algo ppo --task go2_joystick_flat --sim motrix --load-run -1 \ Supported render modes are `auto`, `interactive`, `record`, and `none`. +The MuJoCo interactive mode (`--sim mujoco --render-mode interactive`) routes +directly to `play_interactive.py` and always rolls out one environment. + ## Demo ```bash @@ -123,8 +137,8 @@ The lower-level scripts remain available when you need to inspect Hydra config groups or reproduce a script-level issue. For normal usage, keep route-defining values in the unified CLI flags above. -For off-policy routes, keep `--algo` aligned with the owner tree under -`conf/offpolicy/task//`; do not include the algorithm name in `--task`. +For off-policy routes, `--algo` selects the per-algorithm owner tree +`src/unilab/conf//`; do not include the algorithm name in `--task`. ## Common Overrides diff --git a/docs/sphinx/source/en/2-user_guide/1-training/2-hydra_config.md b/docs/sphinx/source/en/2-user_guide/1-training/2-hydra_config.md index 9fb08cfed..cd2ed7937 100644 --- a/docs/sphinx/source/en/2-user_guide/1-training/2-hydra_config.md +++ b/docs/sphinx/source/en/2-user_guide/1-training/2-hydra_config.md @@ -7,11 +7,11 @@ identity of the task, backend, reward, scene, and task-specific runtime fields. | Stack | Owner YAML Shape | | --- | --- | -| PPO | `conf/ppo/task//.yaml` | -| APPO | `conf/appo/task//.yaml` | -| SAC / TD3 / FlashSAC | `conf/offpolicy/task///.yaml` | -| HIM-PPO | `conf/ppo_him/task//.yaml` | -| HORA distillation | `conf/hora_distill/task//.yaml` | +| PPO | `src/unilab/conf/ppo/task//.yaml` | +| APPO | `src/unilab/conf/appo/task//.yaml` | +| SAC / TD3 / FlashSAC | `src/unilab/conf//task//.yaml` | +| HIM-PPO | `src/unilab/conf/ppo_him/task//.yaml` | +| HORA distillation | `src/unilab/conf/hora_distill/task//.yaml` | Examples: @@ -21,8 +21,8 @@ uv run train --algo ppo --task go2_joystick_flat --sim motrix uv run train --algo sac --task g1_walk_flat --sim mujoco ``` -For off-policy, `--algo` selects the first owner-path segment under -`conf/offpolicy/task//`; do not include the algorithm name in `--task`. +For off-policy, `--algo` selects the per-algorithm config tree `src/unilab/conf//`; +do not include the algorithm name in `--task`. ## Safe Overrides diff --git a/docs/sphinx/source/en/2-user_guide/1-training/3-logging.md b/docs/sphinx/source/en/2-user_guide/1-training/3-logging.md index a766838ba..49422b03f 100644 --- a/docs/sphinx/source/en/2-user_guide/1-training/3-logging.md +++ b/docs/sphinx/source/en/2-user_guide/1-training/3-logging.md @@ -23,11 +23,11 @@ stack overrides `training.log_root` or `training.log_dir`: | Algorithm | Log root | `algo_log_name` source | | --- | --- | --- | -| PPO | `logs/rsl_rl_ppo//` | `conf/ppo/config.yaml` | -| APPO | `logs/appo//` | `conf/appo/config.yaml` | -| SAC | `logs/fast_sac//` | `conf/offpolicy/algo/sac.yaml` | -| FlashSAC | `logs/flash_sac//` | `conf/offpolicy/algo/flashsac.yaml` | -| TD3 | `logs/fast_td3//` | `conf/offpolicy/algo/td3.yaml` | +| PPO | `logs/rsl_rl_ppo//` | `src/unilab/conf/ppo/config.yaml` | +| APPO | `logs/appo//` | `src/unilab/conf/appo/config.yaml` | +| SAC | `logs/fast_sac//` | `src/unilab/conf/sac/config.yaml` | +| FlashSAC | `logs/flash_sac//` | `src/unilab/conf/flashsac/config.yaml` | +| TD3 | `logs/fast_td3//` | `src/unilab/conf/td3/config.yaml` | A run directory is named `YYYY-MM-DD_HH-MM-SS_`, for example `2026-03-09_18-30-00_mujoco`. Common artifacts include `run_config.json`, diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/0-index.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/0-index.md index d9ff6c63b..e79f2dfd3 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/0-index.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/0-index.md @@ -6,13 +6,13 @@ lives, and which command shape selects it. For general flags, see | Algorithm | Style | Entrypoint | Config Evidence | | --- | --- | --- | --- | -| PPO | synchronous on-policy | `scripts/train_rsl_rl.py` | `conf/ppo/config.yaml` | -| APPO | async on-policy | `scripts/train_appo.py` | `conf/appo/config.yaml` | -| SAC | off-policy | `scripts/train_offpolicy.py` | `conf/offpolicy/algo/sac.yaml` | -| TD3 | off-policy | `scripts/train_offpolicy.py` | `conf/offpolicy/algo/td3.yaml` | -| FlashSAC | off-policy | `scripts/train_offpolicy.py` | `conf/offpolicy/algo/flashsac.yaml` | -| HIM-PPO | height-estimator PPO path | `scripts/train_him_ppo.py` | `conf/ppo_him/config.yaml` | -| HORA | teacher/student distillation path | `scripts/train_hora_distill.py` | `conf/hora_distill/config.yaml` | +| PPO | synchronous on-policy | `src/unilab/scripts/train_rsl_rl.py` | `src/unilab/conf/ppo/config.yaml` | +| APPO | async on-policy | `src/unilab/scripts/train_appo.py` | `src/unilab/conf/appo/config.yaml` | +| SAC | off-policy | `src/unilab/scripts/train_sac.py` | `src/unilab/conf/sac/config.yaml` | +| TD3 | off-policy | `src/unilab/scripts/train_td3.py` | `src/unilab/conf/td3/config.yaml` | +| FlashSAC | off-policy | `src/unilab/scripts/train_flashsac.py` | `src/unilab/conf/flashsac/config.yaml` | +| HIM-PPO | height-estimator PPO path | `scripts/train_him_ppo.py` | `src/unilab/conf/ppo_him/config.yaml` | +| HORA | teacher/student distillation path | `scripts/train_hora_distill.py` | `src/unilab/conf/hora_distill/config.yaml` | ```{toctree} :hidden: diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/1-ppo.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/1-ppo.md index e52e20183..4277eff75 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/1-ppo.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/1-ppo.md @@ -1,8 +1,8 @@ # PPO PPO is the default synchronous on-policy training path. It uses -`scripts/train_rsl_rl.py`, composes from `conf/ppo/config.yaml`, and runs the -RSL-RL adapter code in `src/unilab/algos/torch/rsl_rl_ppo.py` and +`src/unilab/scripts/train_rsl_rl.py`, composes from `src/unilab/conf/ppo/config.yaml`, and runs the +RSL-RL adapter code in `uni_rl.algos.rsl_rl_ppo` (unilab-rl repo) and `src/unilab/training/rsl_rl.py`. ## Quick Start @@ -27,7 +27,7 @@ Use `uv run eval` for checkpoint playback: uv run eval --algo ppo --task go2_joystick_flat --sim mujoco --load-run -1 ``` -Logs are grouped by `algo.algo_log_name`; the default in `conf/ppo/config.yaml` +Logs are grouped by `algo.algo_log_name`; the default in `src/unilab/conf/ppo/config.yaml` is `rsl_rl_ppo`. ## Single-node multi-GPU training diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/2-appo.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/2-appo.md index aea0cc9c9..bde402557 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/2-appo.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/2-appo.md @@ -1,7 +1,7 @@ # APPO -APPO is UniLab's asynchronous PPO path. It uses `scripts/train_appo.py`, -`conf/appo/config.yaml`, and the runtime under `src/unilab/algos/torch/appo/`. +APPO is UniLab's asynchronous PPO path. It uses `src/unilab/scripts/train_appo.py`, +`src/unilab/conf/appo/config.yaml`, and the runtime under `uni_rl.algos.appo` (unilab-rl repo). The config exposes `algo.steps_per_env`, `training.collector_device`, and `training.replay_queue_size`; the algorithm config includes V-trace clipping fields. @@ -73,4 +73,4 @@ gantt - `algo.save_interval`: checkpoint save interval. The default log root is `logs/appo//`, from `algo.algo_log_name=appo` -in `conf/appo/config.yaml`. +in `src/unilab/conf/appo/config.yaml`. diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/3-sac.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/3-sac.md index 4c46cce36..d45cdf62f 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/3-sac.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/3-sac.md @@ -1,13 +1,13 @@ # SAC -SAC is selected through the shared off-policy entrypoint -`scripts/train_offpolicy.py`, which TD3 and FlashSAC share as well. The main -config is `conf/offpolicy/config.yaml`, and the SAC algorithm defaults live in -`conf/offpolicy/algo/sac.yaml`. The current log name is `fast_sac`. +SAC runs through `src/unilab/scripts/train_sac.py`; TD3 and FlashSAC have their own +entrypoints and per-algorithm config trees. The main config is +`src/unilab/conf/sac/config.yaml`, with the SAC algorithm defaults inlined there. The +current log name is `fast_sac`. ## Runtime Model -The off-policy runner decouples CPU simulation from accelerator learning through +The off-policy runner decouples simulation collection from accelerator learning through bounded shared memory. A collector subprocess publishes packed transitions through two ingress slots, while the complete replay ring is authoritative on one CUDA or Apple MPS learner device. Host replay allocation therefore does not @@ -25,7 +25,7 @@ uv run train --algo sac --task g1_walk_rough --sim motrix training.no_play=true ## Key Fields -For the off-policy playback path (`scripts/train_offpolicy.py` / CLI `--algo sac`), +For the off-policy playback path (`src/unilab/scripts/train_sac.py` / CLI `--algo sac`), set `training.export_onnx=false` to skip `policy.onnx` export while still recording playback video. See {doc}`/en/1-getting_started/3-evaluation_and_playback`. @@ -33,7 +33,7 @@ playback video. See {doc}`/en/1-getting_started/3-evaluation_and_playback`. - `algo.num_envs=4096` - `algo.batch_size=8192` is the learner batch per update. - `algo.max_iterations=500` -- `training.use_amp=true` in the shared off-policy config +- `training.use_amp=true` in `src/unilab/conf/sac/config.yaml` The off-policy device replay path uses synchronized, learner-owned inference: collectors exchange observations and actions through shared memory and do not own an actor. @@ -44,3 +44,17 @@ uv run train --algo sac --task g1_walk_flat --sim mujoco \ algo.max_iterations=1000 \ training.no_play=true ``` + +## Single-node multi-GPU device placement + +`training.devices` assigns rank i's learner to `cuda:devices[i]`; each rank owns one +collector. For mjwarp, the rank process and its collector process explicitly bind Warp's +default/current device to that same learner device before probe or production environment +materialization. The collector therefore does not fall back to Warp's fresh-process default +of `cuda:0`. The local binding is recorded as `collector_backend_device` in the runtime +manifest. + +MuJoCo has a committed multi-GPU scaling benchmark. The mjwarp per-rank placement contract is +covered by `tests/base/backend/test_process_device.py` and the off-policy runner/worker unit +tests; the repository does not currently contain an mjwarp multi-GPU throughput or convergence +benchmark. diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/4-td3.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/4-td3.md index 5b75c187e..7bd9e322b 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/4-td3.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/4-td3.md @@ -1,7 +1,7 @@ # TD3 -TD3 shares the off-policy training script with SAC and FlashSAC. Select it -with `--algo td3`; owner YAML evidence lives under `conf/offpolicy/task/td3/`. +TD3 runs through `src/unilab/scripts/train_td3.py` in its own config tree. Select it +with `--algo td3`; owner YAML evidence lives under `src/unilab/conf/td3/task/`. ## Quick Start @@ -11,11 +11,11 @@ uv run train --algo td3 --task g1_walk_flat --sim mujoco ## Key Fields -For the off-policy playback path (`scripts/train_offpolicy.py` / CLI `--algo td3`), +For the off-policy playback path (`src/unilab/scripts/train_td3.py` / CLI `--algo td3`), set `training.export_onnx=false` to skip `policy.onnx` export while still recording playback video. See {doc}`/en/1-getting_started/3-evaluation_and_playback`. -- Defaults live in `conf/offpolicy/algo/td3.yaml`. +- Defaults are inlined in `src/unilab/conf/td3/config.yaml`. - `algo.algo_log_name=fast_td3`. - `algo.max_iterations=5000`. - `algo.policy_frequency=2`. diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/5-flash_sac.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/5-flash_sac.md index f1ce54b40..18fdf0eb6 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/5-flash_sac.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/5-flash_sac.md @@ -1,11 +1,11 @@ # FlashSAC -FlashSAC is the third algorithm on the shared off-policy entrypoint. Select it -with `--algo flashsac`; defaults live in -`conf/offpolicy/algo/flashsac.yaml`, and the implementation lives under -`src/unilab/algos/torch/flash_sac/`. +FlashSAC runs through `src/unilab/scripts/train_flashsac.py` in its own config tree. +Select it with `--algo flashsac`; defaults are inlined in +`src/unilab/conf/flashsac/config.yaml`, and the implementation lives under +`uni_rl.algos.flash_sac` (unilab-rl repo). -It shares the off-policy training script with SAC and TD3, but does not use the +It shares the off-policy runner design with SAC and TD3, but does not use the same default networks: the actor uses a block-based structure and the critic uses a distributional (categorical) Q variant. @@ -18,7 +18,7 @@ uv run train --algo flashsac --task go2_joystick_flat --sim mujoco training.no_p ## Key Fields -For the off-policy playback path (`scripts/train_offpolicy.py` / CLI `--algo flashsac`), +For the off-policy playback path (`src/unilab/scripts/train_flashsac.py` / CLI `--algo flashsac`), set `training.export_onnx=false` to skip `policy.onnx` export while still recording playback video. See {doc}`/en/1-getting_started/3-evaluation_and_playback`. diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/6-him_ppo.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/6-him_ppo.md index 14efa87c7..d0c196b91 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/6-him_ppo.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/6-him_ppo.md @@ -1,8 +1,8 @@ # HIM-PPO HIM-PPO has its own config group and script. The entrypoint is -`scripts/train_him_ppo.py`, the base config is `conf/ppo_him/config.yaml`, and -the committed task owner is `conf/ppo_him/task/go2_arm_manip_loco/mujoco.yaml`. +`scripts/train_him_ppo.py`, the base config is `src/unilab/conf/ppo_him/config.yaml`, and +the committed task owner is `src/unilab/conf/ppo_him/task/go2_arm_manip_loco/mujoco.yaml`. ## Current Entrypoint diff --git a/docs/sphinx/source/en/2-user_guide/2-algorithms/7-hora.md b/docs/sphinx/source/en/2-user_guide/2-algorithms/7-hora.md index 808ccf28b..a2e11c19e 100644 --- a/docs/sphinx/source/en/2-user_guide/2-algorithms/7-hora.md +++ b/docs/sphinx/source/en/2-user_guide/2-algorithms/7-hora.md @@ -3,7 +3,7 @@ The committed HORA path is the Sharpa in-hand teacher/student flow. Teacher owners live under the PPO and APPO task trees through the `7-hora` profile for `sharpa_inhand`; student distillation uses `scripts/train_hora_distill.py` and -`conf/hora_distill/task/sharpa_inhand/mujoco.yaml`. +`src/unilab/conf/hora_distill/task/sharpa_inhand/mujoco.yaml`. ## Teacher @@ -13,16 +13,16 @@ uv run train --algo appo --task sharpa_inhand --sim mujoco --profile hora traini ``` The HORA PPO owner sets `algo.algo_log_name=hora_ppo` and resolves the runtime -through `unilab.algos.torch.hora.rsl_rl:resolve_hora_ppo_runtime`. The APPO +through `uni_rl.algos.hora.rsl_rl:resolve_hora_ppo_runtime`. The APPO variant sets `algo.algo_log_name=hora_appo`. ## Student Distillation Student distillation is implemented by `scripts/train_hora_distill.py` and -configured by `conf/hora_distill/task/sharpa_inhand/mujoco.yaml`. The top-level +configured by `src/unilab/conf/hora_distill/task/sharpa_inhand/mujoco.yaml`. The top-level CLI does not currently declare a separate HORA distillation `--algo` route, so the public CLI examples on this page stay on the teacher path above. Teacher checkpoint resolution is implemented in -`src/unilab/algos/torch/hora/distill_config.py`. The student log family is +`src/unilab/training/hora_distill_config.py`. The student log family is `hora_distill`. diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/0-index.md b/docs/sphinx/source/en/2-user_guide/3-backends/0-index.md index 6f6f9a122..16e321e6b 100644 --- a/docs/sphinx/source/en/2-user_guide/3-backends/0-index.md +++ b/docs/sphinx/source/en/2-user_guide/3-backends/0-index.md @@ -1,29 +1,62 @@ # Simulation Backends -UniLab currently uses two backend names in registry/config paths: `1-mujoco` and -`2-motrix`. User commands select them with `--sim`, which routes to the matching -task owner YAML; do not switch a run by overriding `training.sim_backend` alone. +UniLab exposes backend names through registry/config paths, including `mujoco`, +`motrix`, `mjwarp`, `drake`, `isaacgym`, `genesis`, and `isaacsim` where an owner is registered. +User commands select them with `--sim`, which routes to the matching task owner +YAML; do not switch a run by overriding `training.sim_backend` alone. ## Runtime Prerequisites - Install Motrix support with `uv sync --extra motrix`. +- IsaacGym and IsaacSim use dedicated external worker runtimes; see their + backend pages for installation and runtime requirements. - Any run using `--sim mujoco`, MuJoCo playback, or MuJoCo-only debugging tool still requires a working MuJoCo runtime. +- Drake uses the external `drake-uni` package plus a locally built C++ batch + extension; see {doc}`6-drake` before selecting `--sim drake`. - On macOS, the package CLI routes Motrix interactive playback through `mxpython` when needed. Direct script calls that open the native Motrix renderer should use `uv run mxpython`. ## Select A Backend +UniLab selects the simulator through the task owner config. For normal usage, +choose the task and backend with `--task` and `--sim`; off-policy commands keep +the algorithm in `--algo`, not in `--task`. Do not switch a run by overriding +`training.sim_backend` alone; that field is set by the owner YAML and identifies +the composed backend. + +### Quick Choice + +| Need | Prefer | +| --- | --- | +| Default path or broadest owner coverage | MuJoCo | +| Native interactive playback through the backend | Motrix | +| MuJoCo-only tools such as `scripts/play_viser.py` | MuJoCo | +| Task owner exists only under `src/unilab/conf/...//mujoco.yaml` | MuJoCo | +| Task owner exists under `src/unilab/conf/...//motrix.yaml` and the support matrix marks the combination as tested or configured | Motrix | + +The support matrix is generated from registry, owner YAML, and tests; use it as +the current evidence source: {doc}`../../5-reference/5-support_matrix`. + ```bash uv run train --algo ppo --task go1_joystick_flat --sim mujoco uv run train --algo ppo --task go1_joystick_flat --sim motrix +uv run train --algo ppo --task g1_walk_flat --sim isaacsim +``` + +More combinations: + +```bash +uv run train --algo ppo --task stewart_balance --sim drake \ + algo.max_iterations=1 algo.num_envs=8 training.no_play=true +uv run train --algo sac --task g1_walk_flat --sim mujoco ``` Owner YAML locations: -- PPO / APPO: `conf/{ppo,appo}/task//.yaml` -- Off-policy: `conf/offpolicy/task///.yaml` +- PPO / APPO: `src/unilab/conf/{ppo,appo}/task//.yaml` +- Off-policy (SAC / TD3 / FlashSAC): `src/unilab/conf//task//.yaml` The selected owner YAML sets `training.sim_backend` as an identity field. @@ -54,10 +87,38 @@ the generated source data. - {doc}`Backend capability boundary ADR ` - {doc}`Registry bootstrap ADR ` +## The unisim-core boundary + +UniLab's physics backends are provided by the independent `unisim-core` +distribution, with `unisim` as the Python namespace. For example: + +```bash +uv sync --extra mujoco +uv run python -c "import unisim; print(unisim.ADAPTER_SPECS)" +``` + +`unisim` has no dependency on UniLab, Hydra, or training components. MuJoCo, +Motrix, Drake, MJWarp, Genesis, IsaacGym, and IsaacSim use one public contract. +Missing proprietary SDKs or GPU workers produce an explicit cold-path diagnostic; +no backend silently falls back to another engine. + +Backend physics is owned exclusively by `unisim-core`. UniLab keeps only the +owner-layer assembly entry point `unilab.base.backend_factory`; contracts and +adapters are imported from `unisim`. The former `unilab.base.backend` +implementation and compatibility layer have been removed; do not add backend +APIs to UniLab. + +Benchmark v1 reserves only `BenchmarkCase`, `BenchmarkResult`, and provenance +schema. Workloads, timing, comparisons, and performance claims require a +separately authorized issue. + ```{toctree} :hidden: 1-mujoco 2-motrix -3-choosing_a_backend +3-isaacgym +4-isaacsim +5-genesis +6-drake ``` diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/1-mujoco.md b/docs/sphinx/source/en/2-user_guide/3-backends/1-mujoco.md index 7027c355b..9587b49c3 100644 --- a/docs/sphinx/source/en/2-user_guide/3-backends/1-mujoco.md +++ b/docs/sphinx/source/en/2-user_guide/3-backends/1-mujoco.md @@ -4,13 +4,13 @@ MuJoCo is the default backend path in the committed owner configs. The Python dependencies are the official `mujoco` package (`>=3.5`, with the default version pinned by the committed `uv.lock`) plus `mujoco-uni-runtime` in `pyproject.toml`, and the adapter lives -under `src/unilab/base/backend/mujoco/`. +under `unisim.backend.mujoco`. ## When To Use It - You want the default training route for PPO, APPO, off-policy SAC/TD3, or FlashSAC. -- The task owner exists only as `conf/...//mujoco.yaml`. +- The task owner exists only as `src/unilab/conf/...//mujoco.yaml`. - You need MuJoCo-specific tooling such as `scripts/play_viser.py` or scene export from a MuJoCo XML/MJB model. @@ -23,8 +23,8 @@ uv run train --algo sac --task g1_walk_flat --sim mujoco ``` Playback mode is resolved by the backend contract in -`src/unilab/base/backend/base.py`. MuJoCo reports physics-state playback support -in `src/unilab/base/backend/mujoco/backend.py`; `auto` playback records video +`unisim.backend.base`. MuJoCo reports physics-state playback support +in `unisim.backend.mujoco.backend`; `auto` playback records video rather than opening the Motrix native interactive renderer. ## Switching MuJoCo Versions diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/2-motrix.md b/docs/sphinx/source/en/2-user_guide/3-backends/2-motrix.md index 1a63c0c69..83b91a52b 100644 --- a/docs/sphinx/source/en/2-user_guide/3-backends/2-motrix.md +++ b/docs/sphinx/source/en/2-user_guide/3-backends/2-motrix.md @@ -2,7 +2,7 @@ Motrix is an optional backend installed through the `motrix` extra. The pinned package is `motrixsim-core==0.8.2`, and the adapter lives under -`src/unilab/base/backend/motrix/`. +`unisim.backend.motrix`. ## Setup @@ -14,7 +14,7 @@ uv sync --extra motrix ## When To Use It -- The task owner exists under `conf/...//motrix.yaml`. +- The task owner exists under `src/unilab/conf/...//motrix.yaml`. - You want Motrix native interactive playback; the backend advertises native interactive renderer and video-capture capability. - The generated support matrix marks your entrypoint/task/backend combination as diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/3-choosing_a_backend.md b/docs/sphinx/source/en/2-user_guide/3-backends/3-choosing_a_backend.md deleted file mode 100644 index 0461d50fb..000000000 --- a/docs/sphinx/source/en/2-user_guide/3-backends/3-choosing_a_backend.md +++ /dev/null @@ -1,32 +0,0 @@ -# Choosing a Backend - -UniLab selects the simulator through the task owner config. For normal usage, -choose the task and backend with `--task` and `--sim`; off-policy commands keep -the algorithm in `--algo`, not in `--task`. Do not switch a run by overriding -`training.sim_backend` alone; that field is set by the owner YAML and identifies -the composed backend. - -## Quick Choice - -| Need | Prefer | -| --- | --- | -| Default path or broadest owner coverage | MuJoCo | -| Native interactive playback through the backend | Motrix | -| MuJoCo-only tools such as `scripts/play_viser.py` | MuJoCo | -| Task owner exists only under `conf/...//mujoco.yaml` | MuJoCo | -| Task owner exists under `conf/...//motrix.yaml` and the support matrix marks the combination as tested or configured | Motrix | - -The support matrix is generated from registry, owner YAML, and tests; use it as -the current evidence source: {doc}`/zh_CN/5-reference/5-support_matrix`. - -## Examples - -```bash -uv run train --algo ppo --task go2_joystick_flat --sim mujoco -uv run train --algo ppo --task go2_joystick_flat --sim motrix -uv run train --algo sac --task g1_walk_flat --sim mujoco -``` - -`registry.make(..., sim_backend=None)` resolves the default backend in -`src/unilab/base/registry.py`; `--task` and `--sim` remain the user-facing -route. diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/3-isaacgym.md b/docs/sphinx/source/en/2-user_guide/3-backends/3-isaacgym.md new file mode 100644 index 000000000..99846f88f --- /dev/null +++ b/docs/sphinx/source/en/2-user_guide/3-backends/3-isaacgym.md @@ -0,0 +1,213 @@ +# IsaacGym Backend + +IsaacGym (NVIDIA Preview 4) is an end-of-life GPU physics simulator from NVIDIA +that only supports Python 3.6-3.8. The UniLab main environment requires +Python >= 3.10, so IsaacGym cannot be installed into it; it is used through an +external, standalone Python 3.8 environment located purely via environment +variables, with no machine-local paths written into the repository. + +Current status: `IsaacGymBackend` (a subprocess backend whose physics runs in +the external Python 3.8 worker) is implemented and registered; `g1_walk_flat` +ships isaacgym owner configs +(`src/unilab/conf/{ppo,sac}/task/g1_walk_flat/isaacgym.yaml`), and the cross-backend +contract audit (`scripts/audit_sim2sim_contracts.py`) covers the +mujoco/isaacgym pair. Playback rendering uses IsaacGym's native rendering +(viewer + camera sensor); both interactive and video-recording modes work +(see "Training and Evaluation" below). Real-machine end-to-end validation +depends on the external environment described below and is not covered by +repo CI. The repository also ships a physics benchmark script +`scripts/benchmark/physics/benchmark_physics_step_isaacgym.py`, which locates +the external environment through variables such as +`UNILAB_BENCHMARK_HOLOSOMA_DEPS`. This page covers preparing the external +environment, training and evaluation, benchmark validation, and +troubleshooting. + +## Model Contract + +The backend consumes the task's MJCF scene directly, but IsaacGym's MJCF +importer is only partially trusted: kinematics (body/dof names and order) are +verified against a host-side XML scan at INIT, and every actuation-relevant +parameter is parsed from the XML rather than read from the importer. + +- **Control**: only `` actuators are supported — + `SimBackend.step(ctrl)` carries per-DoF position targets, reproduced with + PhysX `DOF_MODE_POS` drives (force = kp·(target − q) − kv·q̇, clamped to the + symmetric forcerange). Scenes with ``/``/other actuator + types, non-unit gear, or asymmetric forceranges fail closed at scene scan. +- **Self-collision is disabled** (actor collision filter). MJCF + `` pairs (e.g. G1's elbow↔wrist and pelvis↔hip overlaps) + cannot be reproduced per link pair through the gymapi; disabling + self-collision entirely is the ecosystem-standard approximation and a + superset of the exclusions. Models that rely on self-contact are not + faithfully reproduced. +- **Joint limits**: the importer drops them, so PhysX applies no joint stops; + `get_joint_range()` still reports the XML values. Joint `armature` and + `frictionloss` (resolved through MJCF default classes) are applied to the + PhysX dofs. + +## Prerequisites + +- Linux x86_64 with an NVIDIA GPU driver installed. +- Network access to the NVIDIA download site: the script downloads + `IsaacGym_Preview_4_Package.tar.gz` automatically from + (no login required). On + offline machines, download it yourself first and pass `--tarball `. +- Disk space: roughly 5 GB for miniconda, the conda environment, and the + IsaacGym package combined. + +## Automated Setup + +From the repository root, run: + +```bash +scripts/tools/setup_isaacgym_env.sh +``` + +The script installs everything under `$HOME/.cache/unisim/isaacgym` by default; +override the install root with the `UNISIM_ISAACGYM_HOME` environment variable. +The former `UNILAB_ISAACGYM_HOME` name remains accepted as a migration fallback. +The tarball is downloaded automatically to +`$UNISIM_ISAACGYM_HOME/IsaacGym_Preview_4_Package.tar.gz`; on offline machines, +pass a pre-downloaded package with `--tarball `. The script is +idempotent and skips completed steps when re-run. + +The setup flow: a dedicated miniconda, then a Python 3.8 `hsgym` conda +environment (including `libstdcxx-ng`, which fixes the GLIBCXX issue on Ubuntu +24.04), then unpacking the tarball, `pip install -e isaacgym/python`, and +finally an import self-check. + +After installation, add the export lines printed by the script to your shell rc +(e.g. `~/.bashrc`): + +```bash +export UNILAB_BENCHMARK_HOLOSOMA_DEPS="$HOME/.cache/unisim/isaacgym" +export UNILAB_BENCHMARK_HSGYM_PYTHON="$UNILAB_BENCHMARK_HOLOSOMA_DEPS/miniconda3/envs/hsgym/bin/python3.8" +export UNILAB_BENCHMARK_HSGYM_LIB="$UNILAB_BENCHMARK_HOLOSOMA_DEPS/miniconda3/envs/hsgym/lib" +``` + +## Validation + +Validate the environment with the benchmark script. The benchmark loads robot +models from URDF, so you must provide your own URDF model tree +(`go1_description/`, `g1_description/`, ...) and point `--models-root` or +`UNILAB_BENCHMARK_MODELS_ROOT` at its root directory: + +```bash +PYTHONPATH="$UNILAB_BENCHMARK_HOLOSOMA_DEPS/isaacgym/python" \ +LD_LIBRARY_PATH="$UNILAB_BENCHMARK_HSGYM_LIB" \ +uv run --no-project "$UNILAB_BENCHMARK_HSGYM_PYTHON" \ + scripts/benchmark/physics/benchmark_physics_step_isaacgym.py \ + --tasks g1_walk_flat --batch-sizes 256 --models-root "$UNILAB_BENCHMARK_MODELS_ROOT" +``` + +## Training and Evaluation + +Once the external environment is installed, training works out of the box. +The worker runtime is discovered automatically from `~/.cache/unisim/isaacgym`; +when using a custom install root, export `UNISIM_ISAACGYM_HOME` before +training. `g1_walk_flat` currently ships isaacgym owner configs for PPO and +SAC: + +```bash +# SAC +uv run train --algo sac --task g1_walk_flat --sim isaacgym + +# PPO +uv run train --algo ppo --task g1_walk_flat --sim isaacgym +``` + +Playback rendering is provided natively by IsaacGym: the interactive mode +opens the gym viewer inside the worker process, and the record mode renders +offscreen with a camera sensor and writes `play_video.mp4` (the camera tracks +env 0's root; the view is adjustable via `training.cam_distance` / +`cam_elevation` / `cam_azimuth`). `play_render_mode=auto` (the default) +selects the interactive viewer when a display is reachable +(`DISPLAY`/`WAYLAND_DISPLAY`) and falls back to recording on headless hosts; +recording requires a finite `training.play_steps` (the default configs +provide one). + +```bash +# Training enters playback automatically (auto); headless servers record video +uv run train --algo sac --task g1_walk_flat --sim isaacgym + +# Evaluate a trained checkpoint in the interactive viewer +uv run eval --algo sac --task g1_walk_flat --sim isaacgym \ + --render-mode interactive --load-run + +# Record a video on headless hosts (force record) +uv run eval --algo sac --task g1_walk_flat --sim isaacgym \ + --render-mode record --load-run training.play_steps=800 +``` + +Note: both the interactive viewer and camera capture require the worker sim +to run on a GPU (`env.isaacgym_device_id >= 0`); a CPU-pipeline sim has no +graphics context and render requests fail closed with an explanatory error. + +Common overrides (Hydra arguments follow the command directly): + +```bash +# Small smoke run: 64 environments, 3 iterations only +uv run train --algo sac --task g1_walk_flat --sim isaacgym \ + algo.num_envs=64 algo.max_iterations=3 + +# Pick the GPU used by the worker +uv run train --algo sac --task g1_walk_flat --sim isaacgym env.isaacgym_device_id=1 +``` + +Cross-backend migration (sim2sim): the isaacgym owner configs are fully +contract-compatible with the mujoco owner under the audit guard +(`src/unilab/utils/sim2sim.py`, verdict TRANSFERABLE), so checkpoints of the +same task transfer across backends. Playback rendering works on isaacgym, so +cross-backend policy evaluation (playing a mujoco-trained checkpoint on +isaacgym, or vice versa) runs directly through the `uv run eval` commands +above. + +## Manual Setup + +If the automated script fails, the equivalent manual command sequence is: + +```bash +export UNISIM_ISAACGYM_HOME="${UNISIM_ISAACGYM_HOME:-$HOME/.cache/unisim/isaacgym}" +mkdir -p "$UNISIM_ISAACGYM_HOME" + +# 1. Dedicated miniconda +curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh +bash /tmp/miniconda.sh -b -u -p "$UNISIM_ISAACGYM_HOME/miniconda3" +rm /tmp/miniconda.sh + +# 2. Python 3.8 conda environment +"$UNISIM_ISAACGYM_HOME/miniconda3/bin/conda" tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main +"$UNISIM_ISAACGYM_HOME/miniconda3/bin/conda" tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r +"$UNISIM_ISAACGYM_HOME/miniconda3/bin/conda" install -y -n base -c conda-forge mamba +"$UNISIM_ISAACGYM_HOME/miniconda3/bin/mamba" create -y -n hsgym python=3.8 -c conda-forge --override-channels + +# 3. Ubuntu 24.04 GLIBCXX fix +"$UNISIM_ISAACGYM_HOME/miniconda3/bin/conda" install -y -n hsgym -c conda-forge libstdcxx-ng + +# 4. Download (or reuse) the tarball and install IsaacGym +curl -fL --retry 3 "https://developer.nvidia.com/isaac-gym-preview-4" \ + -o "$UNISIM_ISAACGYM_HOME/IsaacGym_Preview_4_Package.tar.gz" +tar -xzf "$UNISIM_ISAACGYM_HOME/IsaacGym_Preview_4_Package.tar.gz" -C "$UNISIM_ISAACGYM_HOME" +"$UNISIM_ISAACGYM_HOME/miniconda3/envs/hsgym/bin/pip" install -e "$UNISIM_ISAACGYM_HOME/isaacgym/python" +``` + +## Troubleshooting + +- **Tarball download or validation fails**: the script verifies the download + is a valid gzip tarball. If it fails, delete + `$UNISIM_ISAACGYM_HOME/IsaacGym_Preview_4_Package.tar.gz` and re-run, or pass + a manually downloaded package with `--tarball `. +- **First INIT handshake times out (worker unresponsive)**: the first + `gymtorch` import JIT-compiles a C++ extension (several minutes, cached + under `~/.cache/torch_extensions/py38_cu121/gymtorch/`). The setup script's + self-check pre-warms this compile. If a compile process was ever killed + hard, a stale `lock` file in that directory blocks later loads forever — + delete it and retry. The worker needs the env's `bin/` on `PATH` (for + ninja); `IsaacGymBackend` injects it automatically. +- **`GLIBCXX_3.4.32 not found` on Ubuntu 24.04**: the prebuilt IsaacGym + libraries link against a newer libstdc++ than the system provides. The setup + script installs conda-forge `libstdcxx-ng` into the `hsgym` environment to + fix this; at runtime, point `LD_LIBRARY_PATH` at that env's `lib/`. +- **`from isaacgym import gymapi` fails**: make sure `LD_LIBRARY_PATH` points + at `$UNILAB_BENCHMARK_HSGYM_LIB` (the `lib/` directory of the hsgym env) and + that `PYTHONPATH` includes `isaacgym/python`. diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/4-isaacsim.md b/docs/sphinx/source/en/2-user_guide/3-backends/4-isaacsim.md new file mode 100644 index 000000000..66f6f0f43 --- /dev/null +++ b/docs/sphinx/source/en/2-user_guide/3-backends/4-isaacsim.md @@ -0,0 +1,126 @@ +# IsaacSim Backend + +UniLab's `isaacsim` backend runs IsaacSim 5.1.0 and IsaacLab v2.3.0 in a +dedicated Python 3.11 worker process. The host process keeps the regular +`SimBackend` NumPy contract; pipe messages carry lifecycle commands and shared +memory carries batched state. The current support boundary is headless physics +plus eval-owned native rendering for the registered G1 flat task owners. The +support matrix intentionally marks the PPO and SAC owners as `Configured`, not +`Tested`, because the rendering protocol is covered by deterministic worker +tests but has not completed playback on the currently available IsaacSim host. + +## Runtime boundary + +IsaacSim 5.1.0 is installed in a separate Python 3.11 environment because the +main UniLab environment supports Python 3.10--3.13. The setup entry point is +`scripts/tools/setup_isaacsim_env.sh`; it installs under +`$UNISIM_ISAACSIM_HOME` (default `$HOME/.cache/unisim/isaacsim`) and accepts the Kit +EULA through `OMNI_KIT_ACCEPT_EULA=1` for non-interactive worker startup. + +The backend resolves these optional variables without importing Kit in the host +process: + +- `UNISIM_ISAACSIM_HOME` selects the runtime root. +- `UNISIM_ISAACSIM_PYTHON` overrides the worker interpreter path. +- The former `UNILAB_ISAACSIM_HOME` and `UNILAB_ISAACSIM_PYTHON` names remain + accepted as migration fallbacks. +- `OMNI_KIT_ACCEPT_EULA=1` keeps worker startup non-interactive. + +The expected runtime layout is +`$UNISIM_ISAACSIM_HOME/venv/bin/python`, the Python 3.11 site-packages and +library directories under that venv, and an IsaacLab v2.3.0 source checkout at +`$UNISIM_ISAACSIM_HOME/IsaacLab`. + +The render intent is part of the worker's cold `INIT` handshake. Training does +not inject a render mode and starts the inexpensive headless, camera-disabled +Kit experience. Eval selects one of these modes before Kit starts: + +- `auto`: use the interactive Kit viewer when `DISPLAY` or `WAYLAND_DISPLAY` + is present; otherwise use headless recording. +- `interactive`: start non-headless Kit and fail before worker launch when no + display variable is present. +- `record`: start the headless rendering experience with IsaacLab RGB cameras; + `training.play_steps` must be finite. +- `none`: run policy evaluation without a viewer or camera. + +The record contract is RGB `(height, width, 3)`, `uint8`, contiguous, and +non-uniform. Invalid or placeholder frames fail closed instead of producing a +video. Width and height default to 1280 x 720 in the IsaacSim owner YAML and +can be overridden through `env.isaacsim_render_width` and +`env.isaacsim_render_height` before env creation. + +The current worker supports MJCF materialization, batched articulation state, +position-target stepping, masked root/joint resets, a native Kit viewer, and +headless IsaacLab RGB camera capture. Contact-force sensors, reset or interval +domain randomization, and host pre-step callbacks remain unsupported and fail +closed. + +Use the top-level CLI to select the backend and owner: + +```bash +uv run train --algo ppo --task g1_walk_flat --sim isaacsim +uv run eval --algo sac --task g1_walk_flat --sim isaacsim \ + --load-run --render-mode record \ + training.play_steps=120 training.play_env_num=1 training.export_onnx=false +uv run eval --algo sac --task g1_walk_flat --sim isaacsim \ + --load-run --render-mode interactive training.play_env_num=1 +``` + +Record mode writes `play_video.mp4` in the selected run directory. These +commands require the external runtime and an NVIDIA CUDA device. The repository +does not claim completed full training or stable native playback; those claims +require a maintainer validation entry. + +## Current Runtime Validation + +A bounded SAC record eval and a bounded interactive eval using an existing +checkpoint were attempted on IsaacSim 5.1.0, IsaacLab v2.3.0, Kit 107.3.3, +Ubuntu 24.04.4, an RTX 4090, and NVIDIA driver 595.84. Both paths crashed during +`AppLauncher` initialization, before camera or viewer creation, with frames in +`librtx.scenedb.plugin.so`, +`libcarb.scenerenderer-rtx.plugin.so`, and `libomni.hydra.rtx.plugin.so` after +EGL initialization warnings. A minimal camera-enabled `AppLauncher` probe also +failed with `multi_gpu=False`. + +This is a runtime blocker, not successful playback evidence. The backend keeps +the render protocol and its fail-closed tests, while the support matrix remains +at `Configured`. No placeholder video is generated when the real renderer does +not initialize. + +## Inspecting The Contract + +```bash +VIRTUAL_ENV="$HOME/.cache/unisim/isaacsim/venv" \ +OMNI_KIT_ACCEPT_EULA=1 \ +uv run --active --no-project \ + scripts/tools/probe_isaacsim_contract.py \ + --model-file src/unilab/assets/robots/g1/scene_flat.xml \ + --num-envs 2 --steps 2 --device cuda:0 \ + --output /tmp/isaacsim-contract.json +``` + +The command is a bounded developer probe. It only touches the XML/importer +during cold-path materialization and is useful for checking a newly installed +runtime; it is not a training or playback validation. + +## Contract matrix + +| UniLab contract | IsaacSim/IsaacLab operation | Observed result | Production constraint | +|---|---|---|---| +| MJCF scene materialization | `isaaclab.sim.converters.MjcfConverter` | G1 MJCF converts to USD successfully | Enable `isaacsim.asset.importer.mjcf` explicitly in headless workers | +| Batched articulation | `Articulation` + `ArticulationCfg` | 2 environments, 29 joints, 30 bodies | Resolve names at materialization; importer order is not the MJCF order | +| Quaternion layout | `robot.data.root_quat_w` / `body_quat_w` | `wxyz` | Keep `wxyz` at the shared-memory boundary | +| Base angular velocity | `robot.data.root_ang_vel_w` | World frame | Public getter remains world-frame; reset qvel conversion is a cold-path contract operation | +| Partial reset | `write_root_pose_to_sim`, `write_root_velocity_to_sim`, `write_joint_state_to_sim`, `reset(env_ids)` | Selected row changes; other row deltas are zero | Use masked batched writes; reject duplicate/out-of-range ids | +| Position control | `set_joint_position_target`, `write_data_to_sim`, `SimulationContext.step` | Target moves the first joint over bounded steps | `step(ctrl)` carries position targets; gains/limits are materialized explicitly | +| State getter boundary | `Articulation.data.*` tensors | All getters are batched with expected leading dimension | Worker copies tensors to host-owned shared-memory slots; hot getters do not parse assets | +| Rendering startup | `AppLauncher` cold mode selection | Mock worker verifies none/record/interactive mode, dimensions, and graphics handshake | Mode cannot change after env materialization | +| Offline RGB | IsaacLab `Camera` + `CameraCfg` | Protocol tests verify video writing and reject bad shape, dtype, or uniform frames; current real host crashes before camera creation | Require finite steps and keep support at `Configured` until real playback succeeds | +| Interactive viewer | non-headless Kit + `SimulationContext.set_camera_view` | Protocol tests drive a frame and map window close to `RenderClosedError`; current host has no successful bounded GUI evidence | Explicit interactive requires a display; `auto` falls back to record without one | +| Domain randomization | IsaacLab manager/event APIs | Not exercised | Non-empty unsupported plans must fail closed | + +The importer returns a different joint/body ordering (for example, left/right +branches are interleaved). The worker builds name-to-index maps and reorders +every state/control array; positional assumptions would violate the +`SimBackend` index contract. The full owner and capability status is maintained +in {doc}`../../5-reference/5-support_matrix`. diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/5-genesis.md b/docs/sphinx/source/en/2-user_guide/3-backends/5-genesis.md new file mode 100644 index 000000000..eefa41df7 --- /dev/null +++ b/docs/sphinx/source/en/2-user_guide/3-backends/5-genesis.md @@ -0,0 +1,153 @@ +# Genesis Backend + +[Genesis](https://github.com/Genesis-Embodied-AI/Genesis) (PyPI distribution +`genesis-world`, pinned to 1.3.3) is a GPU physics simulator that UniLab runs +**in-process**: `GenesisBackend` serves the standard `SimBackend` NumPy +contract on top of it, so physics shares the training process with the +learner — no worker subprocess, no IPC. + +Current status: `GenesisBackend` is implemented and registered; `g1_walk_flat` +ships PPO and SAC owner configs +(`src/unilab/conf/{ppo,sac}/task/g1_walk_flat/genesis.yaml`), and the cross-backend +contract audit (`scripts/audit_sim2sim_contracts.py`) covers the +mujoco/genesis pair in both algo trees (verdict TRANSFERABLE). Support level +is **experimental**. Evidence: registry + owner YAML + compose/contract +coverage, plus a real-machine slow-lane env smoke +(`tests/envs/locomotion/g1/test_g1_owner_contract.py`: compose -> env +construction -> keyframe reset -> 12 finite steps -> cleanup, run for both +the ppo and sac trees). The SAC cell is marked `Tested` after a full +real-machine training validation (5000/5000 iterations on 2026-08-31, RTX +4090 / torch 2.8.0+cu128 / genesis-world 1.3.3: reward/mean 6.5 -> 244.8, +episode length -> 987/1000, 10.26M env steps in 224 s wall time) plus record +playback validation on the final checkpoint; the PPO cell stays `Configured` +(no training validation yet). + +Env-construction lifecycle (fixed in #1383): entity validation during +`ManagerBasedRlEnv` construction reads state getters before the env's +`materialize()` hook, so the adapter's `materialize()` is idempotent and +lazily triggered (the first state access completes `scene.build`, the same +pattern as the IsaacGym backend). The adapter design otherwise follows the +measured mappings of `scripts/tools/genesis_feasibility/REPORT.md`. + +## Model Contract + +Genesis 1.3.3 drops three MJCF features at import (REPORT §3): the global +`