unitree_rl_gym trains a walking policy in Isaac Gym with thousands of robots at once (num_envs = 4096), then checks it in MuJoCo, then runs it on the real robot. Isaac Gym needs an NVIDIA GPU, so this page runs only the second step: the policy you see was trained by Unitree, and MuJoCo WASM runs it here.
The loop. MuJoCo steps every 2 ms. Every 10 steps (50 Hz) the policy reads the observation and sets new joint targets. A PD law turns the targets into torques:
The observation is 47 numbers (41 for H1): body rate, gravity in the body frame, the command, joint angles and speeds, the last action, and a clock (sin and cos of the gait phase, period 0.8 s).
The network is small: an LSTM with 64 units, then 32 ELU units, then one output per leg joint. The LSTM state carries memory between steps, so the policy can sense slip and pushes over time.
PPO (rsl_rl) collects 24 steps from every robot, then makes 5 passes of updates that keep the new policy close to the old one:
with ε = 0.2, γ = 0.99, λ = 0.95 (GAE) and an adaptive learning rate that holds the KL step near 0.01.
The reward is a sum of weighted terms, each times dt = 0.02 s. The Data panel shows every term of the chosen robot live. The two main ones track the command:
Negative totals are clipped to zero (only_positive_rewards), so early falls do not teach the robot to end the episode.
Domain randomization. Each training robot gets a random floor friction (0.1 to 1.25 for the humanoids), a random payload on the pelvis (−1 to +3 kg) and a velocity push every 5 s (up to 1.5 m/s). A policy that works on all of them has a good chance to work on the real robot.
Curriculum. legged_gym can make terrain harder as the robots improve (terrain.curriculum), but the shipped configs use a flat plane, so the curriculum is off and these policies only know flat ground.
Sim2sim, then sim2real. A policy that only works in Isaac Gym has learned the simulator, not walking. Running it in a second engine (MuJoCo, this page) is a cheap test. deploy/deploy_real then runs the same network on the robot over DDS. This page does not do that step.
Go2: the repository trains a Go2 policy but ships no pretrained Go2 weights, so the Go2 here walks with a scripted trot (sine joint targets on the same PD loop), not a policy. Robots, policies and configs: BSD-3-Clause, Unitree Robotics. MuJoCo: Apache-2.0. Sources and conversion: CREDITS.md.