How the Go2 demo works

The demo runs a real MuJoCo simulation of a Unitree Go2 in your browser. A neural network policy I trained reads the robot's state 50 times a second and decides where its 12 joints should go. Nothing runs on a server.

Training

Checking it before it reaches the browser

The policy trains on MJX (MuJoCo on JAX/GPU) but runs on MuJoCo 4.0's CPU build in the browser. Small differences between the two can make a policy flail, so every export goes through these checks:

| Check | Result | |---|---| | Browser forward pass vs the training framework, 1,000 recorded steps | max difference 8×10⁻⁷ | | Walk 60 s at 1 m/s in CPU MuJoCo | 58.7 m, no fall | | Pushes of 0.5–3 m/s, standing and walking, 10 directions each | 120 of 120 recovered |

In the browser

What broke along the way

Credits