Teaching it to walk

STX-Q1 learns to walk in simulation first. The robot's URDF is converted to a MuJoCo model. A walking policy, a small neural network, is trained with reinforcement learning (PPO) across thousands of copies of the robot running in parallel on a GPU, using MuJoCo's JAX backend, MJX.

The trained policy walking in MuJoCo

How the training works

  • Observations: the policy sees gravity's direction and the turn rate from the IMU, its twelve joint angles and speeds, its last action, and the speed it has been asked to go. It also sees a gait clock.
  • Actions: twelve joint position targets, 50 times a second. They go to servo models with the AX-12's stiffness, damping and a one-step delay.
  • A trot prior: a built-in trot pattern gives the policy a natural gait to start from. Earlier runs without it found strange gaits, with legs crossing or twitching.
  • Symmetry: left and right legs are trained to behave as mirror images.
  • Domain randomisation: every robot gets a different floor friction, extra trunk mass, servo stiffness and strength, so the policy can't rely on one exact robot.
  • Terrain: later runs train on scattered low blocks as well as flat ground.

Training runs on an RTX 5080 at about 12,900 simulation steps per second (measured). A run of 150 million steps takes a few hours.

Results

The current best policy, run 9, trots at about 0.117 m/s on flat ground when asked for 0.12 m/s, and at about 0.08 m/s over blocks. It's stress-tested with 256 robots per condition, changing one thing at a time. It didn't fall in any of these conditions (simulation results):

ChangeSpeed on flat ground
Nominal robot0.117 m/s
Servos half as stiff0.104 m/s
0.6 kg extra on the trunk0.114 m/s
Floor 40 % as grippy0.117 m/s
Servos at 60 % strength0.113 m/s
Two-tick action delay0.123 m/s

The realistic robot, with IMU filtering, gyro bias, a little backlash and delay all at once, still manages 0.108 m/s. A sideways shove of 0.3 m/s causes no falls.

Run 10 added randomised gear backlash. It was no faster under backlash and wobbled more in pitch, so run 9 stays the deployment policy. The real servos' backlash will be measured before backlash training is tried again.

The policy turning on the spot

Replay

The 3D model view can replay a 20-second recording of run 9 in simulation: stand, walk forwards, walk and turn, back up, step sideways, turn on the spot, and stand again.

From simulation to the robot

A trained policy is exported to ONNX, with a manifest describing exactly which robot and observations it expects. Before it can run on hardware it has to pass a sim-to-sim gate: it runs in plain MuJoCo with the deployment runtime, outside the training code. On the robot, the same runtime runs on the Jetson behind the safety layers.

Updated 1 December 2026