Skip to content

docs: add DirectEnv and ManagerEnv user guides (#39) - #41

Merged
wlgys8 merged 3 commits into
mainfrom
39-directenv-managerenv-user-docs
Sep 14, 2026
Merged

wlgys8 merged 3 commits into
mainfrom
39-directenv-managerenv-user-docs

Conversation

@wlgys8

@wlgys8 wlgys8 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Closes #39, refs #40

内容

使用教程重构

  • 平铺 12 页重组为四层树形结构:基础框架 → 构建环境 → 训练与结果 → 进阶主题,每层 index 承担宏观导览(解决什么问题 / 含哪几步 / 下一步去哪)
  • 页内统一「最小可用示例 → 概念展开 → 契约细节 → 参考表格」的循序展开顺序

新增 DirectEnv / ManagerEnv 编写指南

  • 双语(zh_CN/en)成对编写:最小示例 → 生命周期 → 配置/逐组展开 → 注册约定
  • ManagerEnv 每类 term 按「做什么 / 如何定义」成对讲解,定义模式从内置 mdp 实现提炼
  • 生命周期流水线 SVG(2×3 蛇形布局、light/dark 双主题、仅总览图呈公共骨架)

新增图示

  • rl-loop(仿真 RL 循环:obs → policy → action,reward/done → trainer)
  • env/direct/manager 三个生命周期流水线变体
  • 均经栅格化目检,嵌入使用 only-light/only-dark

基础框架页重写

  • 按「RL 典型流程 → package 与流程对应 → 一次训练完整流程」自顶向下展开
  • 移除用户在此阶段无需了解的仿真后端细节

其他

  • 新增 SimBackend.compile_writes 便捷方法(feat: add SimBackend.compile_writes convenience API #40),motrix_env_core 调用点与测试已迁移,文档示例同步
  • write-motrixlab-task-docs 技能新增框架教程编写规范(tutorial-standard.md)
  • 解散过薄的奖励设计独立页(并入环境构建总览);修复全部受影响交叉链接

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several newly added/rewritten docs contain copy-paste-breaking snippets or misdirecting links that should be corrected before merging to keep the tutorial path reliable.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR restructures the MotrixLab user tutorial documentation (zh_CN/en) to add DirectEnv/ManagerEnv authoring guides and a layered tutorial navigation, while also introducing a small SimBackend API convenience (compile_writes) and migrating core call sites/tests to it.

Changes:

  • Add SimBackend.compile_writes(...) as a convenience twin to compile_reads / compile_model, and migrate call sites/tests.
  • Rebuild the tutorial IA into layered sections (tutorial overview → building envs → training → advanced), adding new pages for DirectEnv/ManagerEnv, runs/checkpoints, and advanced topics.
  • Add new SVG pipeline diagrams (light/dark variants) and fix/adjust cross-links after page moves/removals.
File summaries
File Description
motrix_env_core/tests/test_direct_env_sim_backend.py Update tests to use SimBackend.compile_writes.
motrix_env_core/src/motrix_env_core/sim/backend.py Add compile_writes convenience API on SimBackend.
motrix_env_core/src/motrix_env_core/numba/manager/sim_reset.py Migrate reset write compilation to compile_writes.
motrix_env_core/src/motrix_env_core/numba/manager/env.py Migrate action write compilation to compile_writes.
docs/source/zh_CN/user_guide/tutorial/training/training_and_result.md Update training doc links to new training subtree filenames.
docs/source/zh_CN/user_guide/tutorial/training/task_config.md Fix relative links to repo configs/algo_base/* after doc move.
docs/source/zh_CN/user_guide/tutorial/training/runs_and_checkpoints.md New page documenting run directory layout and checkpoint manifest semantics.
docs/source/zh_CN/user_guide/tutorial/training/index.md New training section index page and toctree.
docs/source/zh_CN/user_guide/tutorial/rewards.md Remove thin standalone rewards page (content folded into other pages).
docs/source/zh_CN/user_guide/tutorial/index.md New tutorial overview landing page.
docs/source/zh_CN/user_guide/tutorial/building_envs/sim_backend.md New SimBackend concept page for environment–sim boundary and program compilation.
docs/source/zh_CN/user_guide/tutorial/building_envs/scene.md Rename/retitle SceneCfg page to fit new IA.
docs/source/zh_CN/user_guide/tutorial/building_envs/manager_env.md New ManagerEnv authoring guide page.
docs/source/zh_CN/user_guide/tutorial/building_envs/index.md New “building environments” section index and toctree.
docs/source/zh_CN/user_guide/tutorial/building_envs/direct_env.md New DirectEnv authoring guide page.
docs/source/zh_CN/user_guide/tutorial/basic_frame.md Rewrite basic framework page to match new macro→detail flow and diagrams.
docs/source/zh_CN/user_guide/tutorial/advanced/motrix_deploy.md New advanced tutorial page for deployment workflow.
docs/source/zh_CN/user_guide/tutorial/advanced/input_devices_and_bindings/extending.md New advanced subpage describing how to extend input components.
docs/source/zh_CN/user_guide/tutorial/advanced/input_devices_and_bindings/built_in.md New advanced subpage enumerating built-in input contracts/bindings.
docs/source/zh_CN/user_guide/tutorial/advanced/input_devices_and_bindings.md New advanced overview page for command input architecture.
docs/source/zh_CN/user_guide/tutorial/advanced/index.md New advanced section index page and toctree.
docs/source/zh_CN/user_guide/tutorial/advanced/export_onnx.md Fix links after moving training pages under tutorial/training/.
docs/source/zh_CN/user_guide/tutorial/advanced/custom_training_backend.md New advanced tutorial page for adding a custom training backend.
docs/source/zh_CN/user_guide/index.md Update top-level user guide toctree to new tutorial structure.
docs/source/zh_CN/user_guide/getting_started/hello_motrixlab.md Update “next steps” link to new SceneCfg tutorial location.
docs/source/zh_CN/user_guide/envs/whole_body_tracking/index.md Update link to moved runs/checkpoints page.
docs/source/en/user_guide/tutorial/training/training_and_result.md Update training doc links to new training subtree filenames.
docs/source/en/user_guide/tutorial/training/task_config.md Fix relative links to repo configs/algo_base/* after doc move.
docs/source/en/user_guide/tutorial/training/runs_and_checkpoints.md New page documenting run directory layout and checkpoint manifest semantics.
docs/source/en/user_guide/tutorial/training/index.md New training section index page and toctree.
docs/source/en/user_guide/tutorial/rewards.md Remove thin standalone rewards page (content folded into other pages).
docs/source/en/user_guide/tutorial/index.md New tutorial overview landing page.
docs/source/en/user_guide/tutorial/building_envs/sim_backend.md New SimBackend concept page for environment–sim boundary and program compilation.
docs/source/en/user_guide/tutorial/building_envs/scene.md Rename/retitle SceneCfg page to fit new IA.
docs/source/en/user_guide/tutorial/building_envs/manager_env.md New ManagerEnv authoring guide page.
docs/source/en/user_guide/tutorial/building_envs/index.md New “building environments” section index and toctree.
docs/source/en/user_guide/tutorial/building_envs/direct_env.md New DirectEnv authoring guide page.
docs/source/en/user_guide/tutorial/basic_frame.md Rewrite basic framework page to match new macro→detail flow and diagrams.
docs/source/en/user_guide/tutorial/advanced/motrix_deploy.md New advanced tutorial page for deployment workflow.
docs/source/en/user_guide/tutorial/advanced/input_devices_and_bindings/extending.md New advanced subpage describing how to extend input components.
docs/source/en/user_guide/tutorial/advanced/input_devices_and_bindings/built_in.md New advanced subpage enumerating built-in input contracts/bindings.
docs/source/en/user_guide/tutorial/advanced/input_devices_and_bindings.md New advanced overview page for command input architecture.
docs/source/en/user_guide/tutorial/advanced/index.md New advanced section index page and toctree.
docs/source/en/user_guide/tutorial/advanced/export_onnx.md Fix links after moving training pages under tutorial/training/.
docs/source/en/user_guide/tutorial/advanced/custom_training_backend.md New advanced tutorial page for adding a custom training backend.
docs/source/en/user_guide/index.md Update top-level user guide toctree to new tutorial structure.
docs/source/en/user_guide/getting_started/hello_motrixlab.md Update “next steps” link to new SceneCfg tutorial location.
docs/source/en/user_guide/envs/whole_body_tracking/index.md Update link to moved runs/checkpoints page.
docs/source/_static/images/tutorial/rl-loop-light.svg New RL loop diagram (light theme).
docs/source/_static/images/tutorial/rl-loop-dark.svg New RL loop diagram (dark theme).
docs/source/_static/images/tutorial/manager-env-lifecycle-light.svg New ManagerEnv lifecycle diagram (light theme).
docs/source/_static/images/tutorial/manager-env-lifecycle-dark.svg New ManagerEnv lifecycle diagram (dark theme).
docs/source/_static/images/tutorial/env-lifecycle-light.svg New shared ArrayEnv lifecycle skeleton (light theme).
docs/source/_static/images/tutorial/env-lifecycle-dark.svg New shared ArrayEnv lifecycle skeleton (dark theme).
docs/source/_static/images/tutorial/direct-env-lifecycle-light.svg New DirectEnv lifecycle diagram (light theme).
docs/source/_static/images/tutorial/direct-env-lifecycle-dark.svg New DirectEnv lifecycle diagram (dark theme).
.agents/skills/write-motrixlab-task-docs/SKILL.md Expand skill scope to cover tutorial pages + standards.
.agents/skills/write-motrixlab-task-docs/references/tutorial-standard.md New tutorial documentation standard reference.
Review details
  • Files reviewed: 38/58 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/source/en/user_guide/tutorial/building_envs/manager_env.md
Comment thread docs/source/en/user_guide/tutorial/building_envs/sim_backend.md
Comment thread docs/source/zh_CN/user_guide/tutorial/building_envs/manager_env.md
Comment thread docs/source/zh_CN/user_guide/tutorial/building_envs/sim_backend.md
Comment thread docs/source/en/user_guide/tutorial/basic_frame.md Outdated
Comment thread docs/source/zh_CN/user_guide/tutorial/basic_frame.md Outdated
@wlgys8
wlgys8 force-pushed the 39-directenv-managerenv-user-docs branch from 62535a6 to bf35da4 Compare September 14, 2026 04:50
@wlgys8
wlgys8 requested a lite review from Copilot September 14, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several newly added/edited tutorial pages contain confirmed documentation issues (broken relative links and non-runnable “minimal skeleton” snippets) that should be fixed to meet the PR’s stated “examples match current API” acceptance criteria.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (5)

docs/source/en/user_guide/tutorial/advanced/export_onnx.md:17

  • The link text has a grammatical error (“runs Directories”) and does not match the title of the referenced page, which reduces consistency across the tutorial navigation.
    docs/source/zh_CN/user_guide/tutorial/training/task_config.md:149
  • This relative link points to a non-existent path when resolved from this document (it would land under docs/configs/...). To reach the repository-root configs/ directory from docs/source/zh_CN/user_guide/tutorial/training/, the path needs one more "../".
    docs/source/en/user_guide/tutorial/training/task_config.md:149
  • This relative link resolves to a non-existent path from this document (it would point under docs/configs/...). To reference the repository-root configs/ directory from docs/source/en/user_guide/tutorial/training/, the link needs one more "../" (same issue repeats for the other algo_base links below).
    docs/source/zh_CN/user_guide/tutorial/building_envs/manager_env.md:21
  • The minimal skeleton code block uses @configclass, SceneCfg, and ManagerResetCfg but does not import them, so readers copying the snippet will hit NameError/ImportError immediately. Import these symbols in the snippet to keep it runnable apart from the intentionally omitted config groups.
    docs/source/en/user_guide/tutorial/building_envs/manager_env.md:24
  • The minimal skeleton code block uses @configclass, SceneCfg, and ManagerResetCfg but does not import them, so readers copying the snippet will hit NameError/ImportError immediately. Import these symbols in the snippet to keep it runnable apart from the intentionally omitted config groups.
from motrix_env_core import registry
from motrix_env_core.manager import (
    ManagerBasedEnvCfg,
    ManagerEnv,
)
  • Files reviewed: 38/58 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread docs/source/en/user_guide/tutorial/training/index.md Outdated
Address review comments on PR #41:
- add missing configclass and SceneCfg imports in manager env skeleton
- use SimWrite instead of non-existent Write in compile_writes docs
- point SimBackend references to the dedicated sim_backend page
@wlgys8
wlgys8 merged commit b9a16c3 into main Sep 14, 2026
5 checks passed
@wlgys8
wlgys8 deleted the 39-directenv-managerenv-user-docs branch September 14, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: 编写 DirectEnv 与 ManagerEnv 的用户文档

2 participants