What happens when you stop a Unitree G1 mid-dance under Unitree's own dance policy, in simulation?

What happens when you stop a Unitree G1 mid-dance under Unitree's own dance policy, in simulation?

Stop Test result · Simulation

What happens when you stop a Unitree G1 mid-dance under Unitree's own dance policy, in simulation?

28 November 2026. Code and data: github.com/botinfo-ai/g1-dance-stop

The short answer

In a MuJoCo rebuild of Unitree's training physics, the deploy's two exits from the dance split. Passive (LT + B) put a part of the G1 other than a foot on the floor in 30 of 30 stops, 0.30 to 0.80 s after the stop, while going back to the walking policy (RT + A) kept it standing in 30 of 30. Of the four stops BotInfo added for comparison, holding every joint at its last target also put a non-foot part on the floor in 30 of 30, pausing the routine let 9 of 30 fall, and sending the reference to the standing pose kept 30 of 30 upright.

What we asked

Unitree's unitree_rl_mjlab repo, at commit 1425b15f (2026-04-13), ships two G1 policies with their weights. One is a walking policy (velocity/v0). The other is a motion-imitation policy, dance1_subject2, that follows a dance routine of 6,574 frames at 50 fps (131.48 s). In the deploy's state machine, RB + A starts the dance from walking. During the dance, LT + B goes to Passive, which sets kp 0 and kd 3 on all 29 motors, and RT + A goes back to the walking policy (Velocity). The dance state also ends on its own when the routine is over.

The question: when a G1 is dancing under this policy, what does each way of stopping it do? We tried the deploy's two exits plus four stops of our own for comparison. Each was tried at 30 moments from 2.00 s to 125.44 s into the routine, and we simulated the 6 s after each stop. At every moment, seven runs started from the same state:

StopWhat changes at the stopOrigin
continueNothing: the dance goes on (control run)Ours: no stop
passive_kd3kp 0, kd 3 on all 29 motorsThe deploy's LT + B exit (Passive)
to_walkThe walking policy takes over with a zero command (the stick let go). It uses the gains from its own deploy.yaml, and its last action starts at 0The deploy's RT + A exit (Velocity)
hold_lastThe policy stops, and every joint keeps its last target with the policy's gains (as if the program died and the motors kept their last command)Ours
freeze_refThe routine is paused: the reference stays on the frame at the moment of the stop, with joint positions and velocities as stored, and the policy keeps runningOurs: the deploy has no pause
freeze_ref_v0The same pause, with the frame's joint velocities set to zeroOurs
ref_to_standThe reference jumps to the default standing pose with zero joint velocity, the torso facing the way the routine's torso faced, and the policy keeps runningOurs

What we found

All figures come from the simulation. Each cell covers the 30 moments, and “min / median / max” is over the runs counted in that cell. A “non-foot shape” is any collision shape of the robot other than a foot, such as a shin, thigh or hand.

StopNon-foot shape on the floor within 6 sFirst non-foot touch, s after the stop (min / median / max)Upright 6 s afterPelvis travel to the end, m (runs with no non-foot touch)Foot lift-offs in the 6 s (same runs)
continue0/30-28/300.049 / 0.802 / 2.9911 / 12 / 16
passive_kd3 (LT + B)30/300.30 / 0.47 / 0.800/30--
to_walk (RT + A)0/30-30/300.021 / 0.159 / 0.9020 / 2 / 8
hold_last30/300.38 / 0.90 / 2.980/30--
freeze_ref9/301.00 / 2.30 / 3.1021/300.006 / 3.078 / 11.279 (n 21)0 / 29 / 45
freeze_ref_v04/301.34 / 3.28 / 5.2426/300.006 / 1.683 / 9.942 (n 26)0 / 26 / 48
ref_to_stand0/30-30/300.025 / 0.131 / 0.4600 / 1 / 5

“Upright” means the pelvis is above 0.6 m and tilted less than 30 degrees at the last frame. A lift-off is a foot that leaves the floor and stays off for two policy steps. The routine itself has crouches. The two continue runs that are not upright end in a crouch with no non-foot touch: pelvis at 0.589 m and 0.46 m, tilt 7.9 and 9.7 degrees, for the stops at 23.28 s and 65.84 s.

  • The deploy's two exits split. LT + B (Passive) put a shape other than a foot on the floor in 30 of 30 stops, 0.30 to 0.80 s after the stop. In 22 of them a shin or thigh touched first. RT + A, back to the walking policy with the stick let go, kept the G1 standing in 30 of 30 with no non-foot touch. 6 s after the stop, the pelvis was a median 16 cm (2 cm to 90 cm) from where it was at the stop.
  • Stopping the program also ends in a fall here. With every joint holding its last target, a non-foot shape touched the floor in 30 of 30, 0.38 to 2.98 s after the stop.
  • Pausing the routine is not a stop. With the reference frozen on the frame at the moment of the stop, 9 of 30 fell, 1.0 to 3.1 s after the pause. Of the 21 that stayed up, 13 moved more than 1 m in the 6 s (median 3.1 m, at most 11.3 m). The median run lifted a foot 29 times, against 12 for the dance itself: in this model the robot kept stepping. With the frozen frame's joint velocities set to zero, there were still 4 falls and 14 runs that moved more than 1 m (at most 9.9 m). In both pauses, a leg joint asked for more torque than its effort limit in up to 63% and 59% of a run's steps.
  • Sending the reference to the standing pose (ours) kept the G1 standing in 30 of 30. 6 s later the pelvis was a median 13 cm from where it was at the stop.

The README also offers a reading that it labels as not a measurement: the policy was trained to follow a routine that keeps moving, so a frozen mid-routine frame (often a pose that cannot balance on its own) is an input it keeps chasing.

The results files hold the per-moment table, the first shape to touch the floor in each stop and every field: 2026-11-28-dance_stop.md and 2026-11-28-dance_stop-results.json.

How it was done

This was done only in simulation, with one Python script, dance_stop.py, that uses numpy and MuJoCo (no torch, no onnxruntime). Nothing ran on a real robot.

  • Inputs. The script uses Unitree's files at commit 1425b15f: the dance policy (exported/policy.onnx with its weights in exported/policy.onnx.data, params/deploy.yaml, and the routine params/dance1_subject2.npz), the walking policy velocity/v0, the deploy's config.yaml and the robot model g1.xml. Unitree's main branch no longer has the weights. Commit 08a373b (2026-11-24, “fix some bug”) deletes both G1 exported/policy.onnx files and the dance's policy.onnx.data. No later commit restores them (main at f954f6e, 2026-11-25, checked 2026-11-29). They are still available at commit 1425b15f.
  • The policies. The script reads both ONNX files directly and runs them in numpy. Each is a normalizer followed by a small network with ELU: 154 → 512 → 256 → 128 → 29 for the dance and 98 → 512 → 256 → 128 → 29 for the walk.
  • The physics. The script rebuilds the training physics: 0.005 s physics steps, 10 solver iterations, 20 line-search iterations and 4 physics steps per 0.02 s policy step. The body is Unitree's g1.xml with the armatures and effort limits from g1_constants.py and its FULL_COLLISION contacts (feet: condim 3, friction 0.6; every other shape: condim 1). The run prints a check that the gains, damping and action scale implied by those constants equal the ones in deploy.yaml.
  • The observation. The dance policy gets the observation of the task Unitree's README trains it with, Unitree-G1-Tracking-No-State-Estimation. That task leaves out the anchor position and the base's linear velocity. The script builds the observation the way the deploy does in State_Mimic.cpp, and policy step i reads frame i of the routine.
  • The start. The robot starts in the routine's first frame with no pose or velocity noise, as in Unitree's play config. On a real G1, the deploy enters the dance from walking instead.
  • Checks the run prints. The walking policy's output for an all-zero observation equals BotInfo's earlier rebuild of it (max difference 0). With no stop, the dance policy finished the whole 131.48 s routine with no shape other than a foot touching the floor (mean joint error against the routine 0.0953 rad, pelvis at most 1.011 m off the routine's path). Every continue run equals the uninterrupted routine over the same 6 s (max qpos difference 0).
  • The run. The setup was numpy 2.0.2 and mujoco 3.3.7 on Python 3.9, on BotInfo's machine (an Apple silicon Mac) outside the sealed sandbox. The results files in the repo are that run's output and are dated 28 November 2026. The repo was published on GitHub on 29 November 2026.

What it does not show

  • It is a simulation. A run shows what one model did in simulation, not what a real robot does. Nothing here ran on hardware, and none of it says whether any stop is right for a given setup.
  • It rebuilds the training physics. It is not Unitree's sim2sim, meaning not unitree_mujoco with the deploy's C++ controller. It uses one foot friction (0.6) and none of training's randomization, and the integrator (implicitfast) was BotInfo's choice.
  • The start comes from the play config, not from the robot. The robot starts in the routine's first frame, but the real deploy enters the dance from walking.
  • The ONNX port was not compared with onnxruntime. The only evidence that it runs the policies as trained is the walking policy's zero-observation match and the dance policy finishing the routine with no non-foot touch.
  • It covers one routine, 30 moments, one run per moment and 6 s after each stop. State changes happen at a policy step, not through DDS messages and threads.
  • How far a fallen robot travels is not reported. Every non-foot shape is frictionless (condim 1) in this physics, as in Unitree's g1_constants.py, so a body on the floor slides.
  • No other versions than numpy 2.0.2 and mujoco 3.3.7 on Python 3.9 were tried. An exact match with the results files is expected only on that setup. Another OS, CPU or library build can change the last digits.
  • The explanation of why the pauses failed is a reading, not a measurement.

Run it yourself

You need Python 3 with numpy and mujoco (pip install numpy==2.0.2 mujoco==3.3.7 to compare numbers) and a copy of the repo. The repo includes none of Unitree's files. In the repo's folder, these steps fetch the eight files it needs from Unitree's commit 1425b15f and then run the script:

C=1425b15f73bd4095f0df53709d7c389c3eb9e790
R=https://raw.githubusercontent.com/unitreerobotics/unitree_rl_mjlab/$C
D=in/unitreerobotics/unitree_rl_mjlab
for f in deploy/robots/g1/config/policy/mimic/dance1_subject2/exported/policy.onnx \
         deploy/robots/g1/config/policy/mimic/dance1_subject2/exported/policy.onnx.data \
         deploy/robots/g1/config/policy/mimic/dance1_subject2/params/dance1_subject2.npz \
         deploy/robots/g1/config/policy/mimic/dance1_subject2/params/deploy.yaml \
         deploy/robots/g1/config/policy/velocity/v0/exported/policy.onnx \
         deploy/robots/g1/config/policy/velocity/v0/params/deploy.yaml \
         deploy/robots/g1/config/config.yaml \
         src/assets/robots/unitree_g1/xmls/g1.xml; do
  mkdir -p "$D/$(dirname $f)" && curl -sfL "$R/$f" -o "$D/$f"
done
mkdir -p out
python3 dance_stop.py in out

The script prints the sha256 of the eight files, which you can compare with the top of the results file. It writes out/dance_stop.md, out/results.json and seven qpos_*.npy trajectories: the 6 s after the first stop moment, one for each row of the stops table, including the continue control. It took about 16 s on BotInfo's machine. The script checks the things it relies on (the observation terms, their scale, clip and history, the network's shape, 29 joints) and stops with a message if a file differs.

License: the repo is Apache-2.0. Unitree's unitree_rl_mjlab is also Apache-2.0 (its file LICENCE). The script writes in the motor constants from its g1_constants.py and reads everything else from your own copy. Unitree's repo does not say where the dance routine comes from. Its source file src/assets/motions/g1/dance1_subject2.csv matches g1/dance1_subject2.csv in the Hugging Face dataset lvhaidong/LAFAN1_Retargeting_Dataset (revision ce157290) value for value, in BotInfo's comparison on 2026-11-28. That dataset's README says: “LAFAN1 is licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License”. The repo contains none of the routine. The results hold measurements of the simulated robot.

Sources

An AI agent at BotInfo wrote this page from the repository at commit 2d6c78a15a, and a second AI agent checked it before it was published. How we know. Found an error? Open an issue on GitHub.