一句话问题
G1WalkEnv.update_state() 的 reward、observation、termination 仍由 task 方法和固定拼接顺序直接编排,不能通过统一的结构化 plan 选择和验证 term。
为什么现在做
最小交付结果
让 G1WalkFlat 的 NumPy update_state 数值部分消费 #919 resolved plan;owner config 可选择已注册 reward/observation/termination term,现有 step/reset/curriculum 行为保持不变。
In scope
- 注册 G1 walk 当前实际使用的 reward、actor/critic observation 和 termination term。
- owner YAML 表达 term 选择、顺序、weight 和既有数值参数;算法超参数仍由原 YAML compose。
- 从 config 冷路径生成 plan,并由 Tier 1 executor 写入 task-owned/preallocated outputs。
obs_groups_spec 从 resolved observation layout 得到一致维度,保持 actor/critic 现有 ABI。
- 对未知非零 reward、非法 observation layout 和 output shape fail closed。
- 保留 curriculum、action preparation、DR、autoreset 和 terminal observation 现有 owner/lifecycle。
Non-goals
- 不实现或启用 Numba 自动融合;现有实验性 Numba 路径暂时保留作后续 baseline。
- 不迁移 motion tracking、G1 rough/23DoF 或其他 locomotion task。
- 不修改 backend、runner、training entrypoint、checkpoint 或 sim2sim contract。
- 不新增 history、通用 event/DR 或新的 observation feature。
Owner 与预计改动
- Owner:
src/unilab/envs/locomotion/g1/、相关 term registration、G1 owner config 和局部测试。
- 预计 9–15 个文件,≤800 行净手写改动,1 个 PR。
- PR base:
refactor/issue-902-mjwarp-squashed-delivery;不得向 main 提 PR。
Acceptance criteria
Stop conditions
- 超过 15 个文件或 800 行净手写改动。
- 需要修改
NpEnv lifecycle、backend contract、runner 或训练 ABI。
- 为保持当前数值行为必须顺手迁移 G1 rough/23DoF 或其他 task。
- observation 可配置化会导致无法在冷路径确定稳定维度。
Dependencies
一句话问题
G1WalkEnv.update_state()的 reward、observation、termination 仍由 task 方法和固定拼接顺序直接编排,不能通过统一的结构化 plan 选择和验证 term。为什么现在做
最小交付结果
让
G1WalkFlat的 NumPyupdate_state数值部分消费 #919 resolved plan;owner config 可选择已注册 reward/observation/termination term,现有 step/reset/curriculum 行为保持不变。In scope
obs_groups_spec从 resolved observation layout 得到一致维度,保持 actor/critic 现有 ABI。Non-goals
Owner 与预计改动
src/unilab/envs/locomotion/g1/、相关 term registration、G1 owner config 和局部测试。refactor/issue-902-mjwarp-squashed-delivery;不得向main提 PR。Acceptance criteria
G1WalkFlatNumPy 路径的 reward/obs/termination 全部来自同一 resolved plan。obs_groups_spec。getattr/hasattr探测 backend 私有能力。make test-all。Stop conditions
NpEnvlifecycle、backend contract、runner 或训练 ABI。Dependencies