Repository navigation
feat(deploy): G1 WBT task-owned physical deployment - #105
Conversation
1f4dfc4 to
28dace4
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It is a broad, cross-package refactor of the public deploy runtime contract plus a complex new multi-phase task and committed binary artifacts, which warrants final human review.
2 open findings
What changed in this PR
This PR adds a complete, task-owned physical-deployment path for the G1 whole-body-tracking (WBT) "dance" task and, in doing so, restructures the motrix_deploy runtime contract. The deployment framework moves from a policy-centric loop (PolicyContext/PolicyRuntime/DeployTask.build_observation) to a Controller-based lifecycle: DeployTask becomes an abstract Controller (reset(state)/step(state, context)->ControllerStep/request_stop/validate_command + default_duration_s), observation/action/termination logic moves into a reusable PolicyProcessor wrapped by PolicyController, and ControlSession/Runtime own scheduling, I/O, cleanup and result reporting. The new G1WbtDeployTask orchestrates prepare → policy-hold → playback → damping phases itself, and a new profile compiler emits the G1 artifact (embedded motion NPZ payload, firmer standing-hold gains, hardware-observable termination thresholds).
Changes:
- Rename and restructure core deploy abstractions (
PolicyRuntime→Policy,PolicyContext→ControlContextwithdt_s,Go2WalkDeployTaskV1→Go2WalkDeployTask,bind_control_session/run(control, steps=...)→bind_session/run()), makingDeployTaska complete task-owned controller. - Add the G1 WBT deployment profile compiler, task spec/payload pipeline,
sim.yamlrecipe, and software-PD simulation runtime accounting (policy_simulation_time_s/real_time_factor). - Separate backend-supported state capabilities from optional sensor bindings (unbound optional fields stay
None); drop privileged body-height termination and the committed artifact's/artifacts/gitignore entry.
| File | Description |
|---|---|
motrix_envs/src/motrix_envs/deploy/g1_wbt.py |
New G1 WBT profile compiler: builds task spec, motion NPZ payload, and DeploymentProfile. |
motrix_envs/src/motrix_envs/deploy/__init__.py |
Imports g1_wbt for registration side-effect (correctly commented). |
motrix_envs/src/motrix_envs/deploy/go2_walk.py |
Drops removed termination_min_base_height field. |
motrix_rl/src/motrix_rl/deploy/service.py |
Writes profile.payloads into the exported artifact alongside the ONNX model. |
motrix_rl/src/motrix_rl/deploy/source_rollout.py |
Applies OnnxPolicyRuntime→OnnxPolicy rename. |
motrix_rl/tests/test_deploy_export.py |
Updates test task fixture to the new reset(state)/step/request_stop contract. |
motrix_deploy/tests/test_task_plugins.py |
Adds session-controller loading/execution tests for the new create_task(spec, robot, policy, steps) signature. |
motrix_deploy/tests/test_simulation_runtime.py |
Updates runtime fixture to new advance_control_period/_physics_time_s/run() interface. |
motrix_deploy/tests/test_simulation_config.py |
New tests for simulation scene/timing/sensor-binding recipe decoding. |
motrix_deploy/tests/test_runtime_binding.py |
Updates runtime-binding tests for the new session API. |
wiki/design/deploy-command-input.md |
Updates design doc to the ControlContext/ControlSession/PolicyController naming. |
motrix_deploy_tasks/.../g1-wbt-dance/sim.yaml + committed artifact + .gitignore |
New default recipe pointing at a committed artifacts/g1-wbt-dance.deploy/ artifact. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
28dace4 to
e558a3f
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
This is a large cross-cutting deployment-runtime refactor and it contains a concrete export-blocking defect (the manifest omits task payloads), so it needs human review and fixes before approval.
1 open finding
2 resolved since last review
🧠 Review effort: Balanced
e558a3f to
b8b54d4
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It is a broad control-plane refactor spanning multiple packages and both simulation backends, with a committed binary artifact and hardware-adjacent contracts that warrant final human verification.
1 open finding
1 resolved since last review
🧠 Review effort: Balanced



Summary
Validation
Limits
artifacts/g1-wbt-dance.deploy/) is intentionally committed as the recipe's default model export, which is why/artifacts/was removed from.gitignore.