Repository navigation
Feat/appo g1 motion tracking - #52
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for a new APPO task (g1_motion_tracking) by registering motion-tracking environments and introducing task/reward Hydra configs, plus extending play-mode configuration.
Changes:
- Register
unilab.envs.motion_trackingin registry-import helpers soG1MotionTrackingcan be discovered. - Add new APPO task + reward configs for
g1_motion_tracking, and include it in the train-script config smoke test. - Make APPO play-mode step count and camera parameters configurable via Hydra, and pass camera parameters to the renderer.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/scripts/test_train_script_configs.py | Extends APPO config-load test matrix to include g1_motion_tracking. |
| src/unilab/utils/algo_utils.py | Ensures motion-tracking env modules are imported/registered. |
| scripts/train_appo.py | Imports motion-tracking registry; makes play steps configurable; passes camera params to renderer. |
| conf/appo/task/g1_motion_tracking.yaml | New task config selecting G1MotionTracking + reward override. |
| conf/appo/reward/g1_motion_tracking.yaml | New reward-scale config for motion tracking. |
| conf/appo/config.yaml | Adds global play-mode defaults (play_steps, camera params). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -168,7 +170,14 @@ def play_appo(cfg: DictConfig, rl_cfg: dict): | |||
|
|
|||
| print("Rendering frames...") | |||
| frames = render_many.render_states_get_frames( | |||
| state_list, env.cfg.model_file, width=1280, height=720, camera_id=-1 | |||
| state_list, | |||
| env.cfg.model_file, | |||
| width=1280, | |||
| height=720, | |||
| camera_id=-1, | |||
| cam_distance=cfg.training.cam_distance, | |||
| cam_elevation=cfg.training.cam_elevation, | |||
| cam_azimuth=cfg.training.cam_azimuth, | |||
| ) | |||
There was a problem hiding this comment.
play_appo currently renders all frames into memory (frames = render_states_get_frames(...)) before writing the video. Increasing the default play_steps to 1000 can easily create multi-GB frame lists at 1280x720 (and OOM) even with a modest number of steps/envs. Consider keeping the historical default (150) here and only overriding training.play_steps in task-specific configs that truly need longer videos, or refactoring playback to stream/chunk frames instead of accumulating them all at once.
都听你的 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.