Repository navigation
feat(envs): improve Go2 flat-walk task - #191
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve the
go2-walk-flattask with a measured gait schedule, hard-case command curriculum, updated reward terms, and a trained deployment artifact.The change keeps training and deployment observation generation consistent and explicitly preserves the existing
go2-walk-roughbehavior.Scope
This PR only contains Go2 flat-walk related changes:
artifacts/go2-walk-flat.deployIt intentionally does not include:
command_filterorspeed_controlconfigurationUpstream deployment contract fields such as
motrix-deploy/v1,onnx/v1, andgo2_walk/v1remain unchanged.Main changes
Gait schedule and training/deployment parity
Add a measured Go2 gait schedule that interpolates gait frequency and swing fraction from planar command speed:
gait_schedule_speed_low/highgait_schedule_frequency_low/highgait_schedule_swing_fraction_low/highgait_schedule_smoothing_time_sgait_schedule_yaw_weightgait_schedule_lateral_weightThe same schedule is serialized into the deployment task profile and implemented by
Go2WalkPolicyProcessor, so deployed observation phase progression matches the trained policy.Standing and walking transitions now restart from the full-support phase, and this behavior is covered by training/deployment parity tests.
Command curriculum
Add configurable hard-case command sampling and a training-iteration-based curriculum for Go2 flat-walk.
The Go2 flat configuration covers the expanded yaw envelope and includes hard commands for lateral motion, yaw, combined forward/lateral/yaw motion, and boundary speeds. Evaluation/play configurations disable hard-case sampling and curriculum.
Reward and walking behavior
Refine the Go2 flat reward and walking behavior with:
Rough isolation
go2-walk-roughexplicitly stays on its upstream behavior:gait_schedule_enabledisFalse(0.4, 0.9)Training/deployment parity tests continue to cover both
go2-walk-flatandgo2-walk-rough.Go2 model changes
Two Go2-wide model changes are required by the trained artifact:
motrix_robots/src/motrix_robots/unitree.py: rear thigh default pose changes from1.0to0.8motrix_robots/src/motrix_robots/assets/go2/go2_mjx.xml: remove the default jointdamping="2"These values are reflected in the exported artifact and are needed for consistency with the trained policy.
Deployment artifact
The trained artifact is included at:
artifacts/go2-walk-flat.deploy/manifest.jsonartifacts/go2-walk-flat.deploy/policy/model.onnxPolicy SHA-256:
The hash recorded in the manifest matches the actual ONNX file.
Tests
Target tests:
Result:
Quick suite:
.venv/bin/python -m pytest -q -m "not slow and not integration"Result:
Pre-commit:
Result:
Whitespace check:
Result: