RobotForge
Published·~14 min

Quadruped locomotion: gaits and phase diagrams

Trot, bound, pace, gallop — four families of quadruped gait, each a different phase pattern. The phase diagram you'll see in every legged robotics paper, demystified.

by RobotForge
#mobile-robots#quadruped#locomotion

A quadruped has four legs and each one swings or stands at any moment. The pattern of when each leg is in contact with the ground is called the gait. Four major gaits cover most of biology and almost all of robotics. Here's the phase-diagram language that unites them.

The phase diagram

A gait repeats with period T. For each leg i, define:

  • Phase offset φ_i ∈ [0, 1) — when in the cycle that leg lifts off, as a fraction of T.
  • Duty factor β_i ∈ [0, 1] — fraction of the cycle that leg spends on the ground.

Every gait is a choice of (φ_i, β_i) for each of the four legs. The phase diagram is a visual representation of this choice.

gait FL FR HL HR phase diagram (grey = stance, orange = swing) Trot β=0.5 FL FR HL HR Bound β=0.4 FL FR HL HR Pace β=0.5 FL FR HL HR
Phase diagrams for three common gaits. Left: leg configuration (orange = swing at t=0, grey = stance). Right: timing bars across one cycle, stance (grey) vs swing (orange).

The four canonical gaits

Trot

Diagonal pairs move together: front-left + hind-right, then front-right + hind-left. Offset 0.5 cycle, duty factor ~0.5. The default "just walk" gait for most quadrupeds. Stable (two contact points always), moderate speed, low energy.

Pace

Same-side pairs move together: both left legs, then both right. Common in horses, less so in robots because it induces a side-to-side sway that's hard to control.

Bound

Front and hind pairs move together: both fronts push off, then both hinds. Used at speed — cheetahs bound. Has a flight phase (all legs in the air) at high speeds. Aggressive, fast, tricky to stabilize.

Gallop

Four-phase gait with each leg offset slightly. Duty factor < 0.25 at full speed. Has a flight phase. Fastest biological gait; most quadruped robots can't gallop yet.

Duty factor and ground contact

The duty factor encodes how much of the cycle each foot is on the ground. Consequences:

  • β > 0.5: at least one leg is always on the ground. "Walking" gaits.
  • β = 0.5: right at the boundary. Trot, pace.
  • β < 0.5: flight phases appear. "Running" gaits. Bound, gallop.

Lower β → higher speed, higher peak forces, more unstable. Biology has converged on this trade-off independently many times.

How gaits get implemented

Two approaches in modern robotics:

Hand-designed (classical)

A central pattern generator produces a periodic signal for each joint. Phase offsets and duty factors are parameters. A swing-phase controller computes end-effector trajectories in the air; a stance-phase controller stabilizes body pose. This is what Boston Dynamics' Spot ran for years.

Learned (2023–26)

A neural network policy maps observations (joint state, IMU, body velocity, phase) to actions (joint position targets). Trained with PPO in MuJoCo MJX with domain randomization. The policy learns gaits without being told what a gait is. Often discovers trot naturally, then transitions to bounds at higher commanded speeds.

This is how ANYmal, Go1/G1, MIT Mini-Cheetah, and most modern research robots walk in 2026.

Gait transitions

At low speed: walk (duty factor 0.75+). Slight speed: trot. Faster: bound or gallop. Biological quadrupeds switch gaits to minimize energy cost — there's an optimal gait for each speed.

Modern learned policies handle this automatically because they're trained across a speed range. Classical controllers need explicit gait-selection logic.

Where to experiment

Two good starting points:

  • DeepMind MuJoCo Playground ships a Go1 and Unitree humanoid environment with ready RL training scripts. Clone, train, watch it learn to trot in 2 hours on a 4090.
  • SpotMicro and Mini Pupper hobbyist builds come with classical trot controllers you can modify and observe directly.

Next

ZMP and the capture point — the classical stability criteria that predate learned gaits but still show up in many modern stacks as safety layers.

Comments

    Sign in to post a comment.