4.8 KiB
Unitree Go1 quadruped training example
The model comes from the local mjlab asset zoo at
unitree_go1/xmls/go1.xml.
The vendored source entered this checkout in commit
004afda1ac1dafc3aedd4e9ca8c6d2242b399f57. The source XML SHA-256 is
2f1856b0c83994c009cafbad1f5eac38d09efa1a64db73681ff72c9237822db3.
The five STL assets are referenced in place. The model and meshes are from
MuJoCo Menagerie, copyright 2016–2022 HangZhou YuShu TECHNOLOGY CO., LTD.
(Unitree Robotics), under the
BSD 3-Clause License.
See the repository NOTICE.
go1.xml reuses the source geometry, masses, joint stops, collision geoms and
reference frames. It adds reflected rotor inertia from the vendored
go1_constants.py
and rebases mesh paths. stance.json uses the same source for the seed joint
positions and effort limits. Its gains come from the model inertia at the
calibrated pose, using 14 Hz and a damping ratio of 1.25. At that setting a
2-second native hold supported the robot on all four named feet. Peak base
displacement was 16.1 mm, peak joint error was 0.0562 rad, and peak effort
reached 20.0% of its joint limit. The original vendored gains let the stance
settle onto a calf in the same test.
robot.json sets each policy action scale to 60% of its effort limit divided
by its calibrated proportional gain. This is an exploration scale for the
simulator. Thigh and calf ground contacts carry a penalty. Trunk and head
ground contacts terminate the episode. The only task file is the calibrated
robot specification, which uses the
locked quadruped template.
Reproduce the intake
Run from the checkout root with its installed Python environment and fresh report paths.
python scripts/onboard.py inspect assets/go1_example/go1.xml \
--profile assets/go1_example/profile.json --report out/go1_example/intake.json
python scripts/onboard.py calibrate --model assets/go1_example/go1.xml \
--config assets/go1_example/stance.json --report out/go1_example/calibration.json
python scripts/train.py --task go1_example --backend warp --device cuda \
--num-envs 2048 --headless --no-tensorboard --max-iterations 1000
The measured stance and any learned policy results are simulation evidence.
Measured training run
The RTX 5080 completed 1,000 Warp PPO updates with 2,048 environments and 24 steps per environment per update, totaling 49,152,000 environment steps. The run reached all three curriculum levels. Checkpoint 900 was selected from that run after its four feet remained loaded for the final three seconds of a 12-second idle test. Checkpoint 999 tracked motion but unloaded its front-right foot during the same idle check.
With a +0.40 m/s command in an 18-second Warp replay, checkpoint 900 averaged +0.401 m/s with 0.022 m/s mean absolute forward error and no resets. The first saved checkpoint was nearly stationary with 0.400 m/s mean absolute forward error under the same command. Both used the saved curriculum ranges, 400 Hz physics, 50 Hz control and observation noise disabled.
The following 12-second tests used held body-frame commands, native MuJoCo physics at 400 Hz and 50 Hz control. Both columns use checkpoint 900 with observation noise disabled. The checkpoint replay had zero resets in each test. The standalone ONNX replay had zero MuJoCo warnings.
| Commanded axis and target | Checkpoint mean | ONNX mean | ONNX mean absolute error |
|---|---|---|---|
| Forward +0.40 m/s | +0.400 | +0.400 | 0.022 |
| Reverse −0.35 m/s | −0.337 | −0.337 | 0.018 |
| Left +0.25 m/s | +0.232 | +0.232 | 0.019 |
| Right −0.25 m/s | −0.235 | −0.235 | 0.018 |
| Yaw left +0.60 rad/s | +0.587 | +0.587 | 0.039 |
| Yaw right −0.60 rad/s | −0.593 | −0.591 | 0.040 |
With an idle command, ONNX replay averaged +0.0002 m/s forward, −0.0014 m/s lateral and −0.0014 rad/s yaw. A separate keyboard test held W, S, A, D, J and L for 12 seconds each, including the configured two-second ramp to the saved command limit. Peak per-axis mean absolute tracking error across these tests was 0.038 m/s for translation and 0.082 rad/s for yaw. Each test stayed upright and settled after Escape.
The packaged runtime reproduced seven 12-second probes, including sampled joint state and per-axis body-frame tracking metrics. The app includes the asset license and provenance along with English and Chinese operator manuals. After building the app, use the repository's native reference checker.
python scripts/deploy.py --check-reference out/platform_release_20261104/go1_example.app
python scripts/play.py --app out/platform_release_20261104/go1_example.app --headless \
--steps 200 --command 0.4 0 0