Robot Gaits and Gait Training

A gait is the pattern in which a robot moves its legs. This guide starts with the gaits of four-legged animals and robot dogs, with a shorter look at two-legged walking and running. It then covers the ways robots are given a gait, from hand-written leg poses to reinforcement learning in simulation. The last sections cover training a specific gait, how long it takes, what can go wrong, and how gaits help a robot climb steps and cross obstacles.

Gaits in brief

Every gait is a repeating cycle called a stride. During one stride each foot spends part of the time on the ground, called the stance phase, and part in the air, called the swing phase. Two numbers describe most gaits. The first is the duty factor, the share of the stride that one foot spends on the ground. The second is when each foot lands relative to the others.

By convention, a duty factor above 0.5 counts as walking and 0.5 or below counts as running. A slow walk keeps each foot down for three quarters of the stride. A gallop keeps each foot down for about a third or less, so the body spends part of each stride in the air.

In the 1960s the zoologist Milton Hildebrand showed that any symmetrical gait can be described with three numbers. These are the duty factors of the front and hind feet and the delay between a hind foot and the front foot on the same side. Footfall charts like the ones below, which he used throughout his work, are still standard in biology and robotics.

Types of quadruped gaits

Each chart shows one stride, read from left to right. A bar shows when that foot is on the ground. Blue bars are front feet and teal bars are hind feet. Bars that run past the right edge carry on at the left, since the stride repeats.

Duty factors are typical values chosen to show each pattern. Real animals and robots vary them with speed.

GaitPatternStabilityWhere it shows up
Crawl / walkOne foot at a time. A crawl keeps three feet down at all times.Static (crawl), mostly static (walk)Slow and careful moves, rough ground, hobby robots like Bittle
TrotDiagonal pairs swing togetherDynamicThe default gait of nearly every robot dog, including Go2, Spot and Pupper v3
PaceSame-side pairs swing togetherDynamic, rolls side to sideCamels, giraffes and some dogs. Rare on robots outside research.
AmbleFour beats like a walk, but faster, with each foot on the ground for less than half the strideDynamicGaited horses such as the Icelandic tölt
CanterThree beats. One diagonal pair lands together, between a single hind foot and a single front foot.DynamicThe slow form of the transverse gallop in horses. Rare on robots.
BoundFront pair lands, then back pair, then a leapDynamic, pitches front to backSmall fast animals, MIT Mini Cheetah demos
PronkAll four feet push off togetherDynamic, a series of hopsSpringbok and gazelles. A common robot test gait.
GallopFour separate beats with a long airborne phaseDynamicTop speed in horses, dogs and cheetahs. Record-setting robots like Boston Dynamics Cheetah, which ran on a treadmill.

Gaits in simulation

The clips below show a Unitree Go2 model doing each gait in MuJoCo. Each gait is a hand-written foot schedule with the timing from the charts above, with no trained policy behind it. The first hand-written bound and pronk let the back legs do most of the work, so their settings were tuned by a search program. It tries dozens of random variations of the settings in simulation, such as how long each pair of feet stays down and how hard it pushes. It scores each run, here on even front and back ground time, forward travel and staying level. It then tries new variations close to the best scorers and repeats until the results stop improving. This method is called the cross-entropy method, and it took about a minute per gait on a laptop. The robot only keeps its balance on this flat floor. Each clip plays in real time, then part of it again at quarter speed. The camera stays still, so the robot crosses the frame. The four squares in the corner light up while each foot is on the ground, with front feet on top and hind feet below.

Walk. One foot moves at a time and three stay down. The slowest and steadiest gait.
Trot. Diagonal pairs swing together. The everyday gait of robot dogs.
Pace. Both feet on one side swing together, which rolls the body from side to side.
Bound. The front pair lands, then the back pair, whose push sends the robot into a long leap.
Pronk. All four feet push off together and the robot is briefly in the air.
Gallop. Four separate footfalls in rotary order, right hind, left hind, left front, right front.

The strips below take one full stride of four of these gaits and split it into six moments, left to right. They show the same patterns as the charts, now on the robot's legs.

Six frames of a Unitree Go2 walking in MuJoCo, one stride
Walk. Three feet are on the ground in every frame.
Six frames of a Unitree Go2 trotting in MuJoCo, one stride
Trot. Left front and right hind, then right front and left hind.
Six frames of a Unitree Go2 bounding in MuJoCo, one stride
Bound. Front pair, both pairs briefly, back pair, then airborne.
Six frames of a Unitree Go2 galloping in MuJoCo, one stride
Gallop. Each foot lands on its own beat.

Static and dynamic stability

A gait is statically stable when the body's center of mass stays above the area between the feet that are on the ground. A robot in a crawl could freeze at any moment and stay standing, since three feet always hold it up. That makes the crawl easy to program and hard to fall out of, but it is slow.

A trot has only two feet down at a time. The robot would tip over if it froze mid-stride, so it stays up by putting the next foot in the right place. This is called dynamic stability, and every fast gait depends on it. Dynamic gaits need sensors that report body tilt, usually an IMU, and motors that react quickly.

Gait and speed

Animals change gait as they speed up, from walk to trot to gallop. In 1981, Hoyt and Taylor measured the oxygen used by ponies on a treadmill. Each gait had a speed where it cost the least energy per distance, and the ponies chose speeds close to those minimums. A later study by Farley and Taylor in 1991 found a different trigger for the trot-to-gallop switch. Horses change gait when the peak force on their muscles and bones reaches a limit, whatever the speed.

The zoologist R. McNeill Alexander compared animals of different sizes with the Froude number. It divides the square of speed by gravity times hip height. Animals moving at the same Froude number tend to move in similar ways. Humans switch from walking to running at about 0.5. Horses switch from walk to trot at about 0.35.

The same idea helps robots. A small robot like the Pupper v3 should change gait at a much lower speed than a large one like Spot. Many robots keep a single trot at every speed, since one gait is simpler to control.

Robots that switch gait on their own as they speed up are still mostly research. In 2021, a Berkeley team trained a Unitree A1 with a reward for saving energy and nothing about gait. It walked at 0.375 m/s, trotted at 0.9 m/s and bounded at 1.5 m/s. A 2025 study got a Unitree Go1 and an ANYmal C to pick a four-beat walk at low speed and a trot at high speed. An EPFL policy for the A1 switched between trotting and pronking by itself to leap gaps of up to 30 cm.

Robots on sale offer a menu of gaits instead, chosen with the app, remote or code. The Unitree Go2 has modes such as classic walk, free walk, running, bound and cross step. The DEEP Robotics Lite3 has flat-ground and rough-terrain gaits, and its manual says which to use on each surface. The Xiaomi CyberDog 2 adds bound, pronk and a three-legged gait. Even Spot's automatic setting usually just picks a trot, with crawl, amble, jog and hop as separate choices. Its automatic stairs mode is the closest a commercial robot comes to changing gait on its own.

The usual way to compare gaits, robots and animals on efficiency is the cost of transport. It divides the power used by weight times speed, so it has no units and a lower number is better. Energy penalties during training lower it, and makers quote it less often than speed.

Biped gaits

Two-legged robots have fewer gaits than four-legged ones. Most of the difference between them is whether both feet are ever on the ground together, or both in the air.

GaitPatternWhere it shows up
WalkAt least one foot is always down. Each step has a double support phase with both feet on the ground, then a single support phase while the other leg swings.Every humanoid. Early robots such as ASIMO walk flat-footed with bent knees, while newer ones roll from heel to toe more like a person.
RunFeet alternate with a flight phase between steps, when neither foot touches the groundCassie, ASIMO in short bursts, and newer humanoids such as the Unitree G1 and H1
HopBoth feet push off and land togetherJumps and some recovery moves on research robots
Side step and turn in placeShort steps sideways or around, with a walk's timingLining up with a doorway, shelf or ball, as in robot soccer

Balance methods for bipeds

The hard part for a biped is balance. The support area under two feet is small, so small errors tip the robot. The same walk or run can be produced by very different control methods.

The training methods in the rest of this guide work for bipeds as well. Bipeds usually need more training, since there are more ways to fall.

Hexapod and wheel-leg gaits

Six-legged robots such as the SpiderPi have an easier job. In the tripod gait, the front and back legs on one side move with the middle leg on the other side, so three legs are always down. The ripple gait moves two legs at a time and the wave gait moves one, each slower and steadier than the last. All three are statically stable, which is why hobby servos are enough for a hexapod.

Wheel-legged robots such as the Go2-W and Ascento roll on flat floors and only step when they meet a curb or stairs. Their trained policies command wheel speed and leg joints together, so the "gait" is mostly a choice of when to lift a wheel.

Gait control methods

MethodHow it worksStrengthsWeaknessesExamples
KeyframesA list of leg poses played in a loopSimple, runs on a small microcontrollerNo reaction to bumps or slopesPetoi Bittle and Nybble skill arrays
Gait generator with IKA schedule says when each foot lifts. Inverse kinematics turns foot paths into joint angles.Easy to change speed, step height and directionLittle balance feedback, flat ground onlyStanford Pupper and Mini Pupper controller
Central pattern generatorLinked oscillators, modeled on nerve circuits in the spine, produce the rhythmSmooth gait changesHard to tune for rough groundEPFL's salamander robot (2007), which switched between walking and swimming
Model-based controlA simplified physics model plans foot forces a fraction of a second ahead (MPC), often with whole-body control underneathPrecise, predictable, many gaits with one controllerNeeds an accurate model and fast computingMIT Cheetah 3, Mini Cheetah, Spot
Reinforcement learningA neural network learns by trial and error in simulationVery robust, handles rough ground and fallsNeeds a good simulator model and a lot of computingANYmal, Unitree Go2, Pupper v3, Cassie
Imitation of animalsRL rewards the robot for matching motion-capture data of a real dogNatural-looking gaits and tricksNeeds motion data and retargeting to the robot's bodyGoogle and Berkeley's Laikago work (2020)

These methods are often combined. Marc Raibert's one-legged hoppers at MIT in the 1980s treated running as a bouncing spring. That work is the root of most dynamic gait control and of Boston Dynamics. In 2018, MIT's convex MPC ran eight gaits on the Cheetah 3 with one set of settings, including trot, pronk, bound, pace and gallop, up to 3 m/s. Spot uses MPC. In 2024 Boston Dynamics added a learned policy that sets the targets for a single MPC, which replaced running many MPC plans at once and picking the best. In 2025 the RAI Institute trained a running policy for Spot that passed 5.2 m/s, more than three times its standard top speed.

Gait training with reinforcement learning

Most new legged robots learn to walk with reinforcement learning (RL). Thousands of copies of the robot practice in a physics simulator at the same time. A neural network, called the policy, reads the robot's sensors and outputs joint targets. A reward score tells it how well each attempt went, and the training algorithm, usually PPO, slowly improves it.

The simulator is the base of all this. The MuJoCo Guide covers MuJoCo itself, robot models, GPU versions such as MJX and how simulators compare. The sim-to-real glossary entry covers moving a trained policy onto hardware.

Reward hacking in simulation

The clips below come from a test run for this guide. A 7 kg robot dog model was trained in MuJoCo with PPO on an Apple M3 laptop, for 20 minutes and about 5.5 million steps per run. The model has realistic motor limits, a 3 to 5 ms command delay, sensor noise and battery sag. Its weight, floor grip and motor strength changed in every practice run. Only the reward changed between the three runs. The squares in the corner light up for each foot on the floor.

Three-legged hop. Rewards for speed, foot air time, foot clearance, no slipping and low energy. The policy holds its left hind foot up and hops on the other three. A leg kept out of the way earns the air-time reward and saves energy.
Stuck. A penalty added for any foot held up longer than 0.4 s. Training stalled after six minutes. The policy stands still on three legs with the right hind foot raised, and it only moved during training through random exploration.
Trot. A trot clock added, the sine and cosine of the gait phase as an input, with a reward for diagonal feet that match it. All four legs now share the work at about 3 steps per second per leg.

The clock policy walked in all 45 test runs on five versions of the model. These included one 10% heavier with weaker motors, one with a slippery floor and one with a lighter battery. At 0.9 m/s it drew 125 W. An earlier 8-minute policy trained without the gait rewards drew 329 W at the same speed and pattered at about 9 steps per second per leg. The clock policy still fell short at the top of its range, reaching 1.2 m/s on a 1.5 m/s command. Longer training, usually on a GPU, is the normal way to close that gap.

From simulation to the robot

The trained network is exported, usually to ONNX, and runs on the robot's own computer at the same rate as in training. The position controller on each motor must use the same gains as the simulator, or the gait changes. Many teams first run the policy in a second simulator, such as MuJoCo after Isaac Lab, to catch policies that only work in one physics engine. Unitree's own training code does this before every hardware test.

First runs on hardware are done with care. The robot hangs from a harness or gantry, torque limits are set low, and a person holds a controller with a stop button. Starting from a crouch and a slow trot, then raising the limits, is the normal order.

Milestones in learned gaits

YearRobotResult
2019ANYmal (ETH Zurich)A neural network trained on real motor data made the simulator realistic enough for RL. The robot ran at 1.5 m/s, 25% faster than its previous record, and learned to get up after falls.
2020ANYmalA blind policy, using only joint and body sensors, walked through mud, snow, rubble and water, with no tuning on the real robot
2020LaikagoGaits and turns copied from motion-capture data of a real dog
2021Unitree A1RMA adapted to sand, grass, stairs and slippery floors in a fraction of a second
2021ANYmal and A1"Learning to walk in minutes" ran 4,096 robots at once on one GPU. Flat walking trained in under 4 minutes and rough ground in about 20.
2022MIT Mini CheetahRan at 3.9 m/s with a learned policy
2022Unitree Go1"Walk These Ways" put trot, pace, bound and pronk into one policy, with the gait chosen by a few timing numbers
2022ANYmal CCombined a height map with its joint and body sensors to hike a 2.2 km mountain trail, reaching the summit faster than the time on the trail signs
2022CassieRan 100 m in 24.73 s, the record for a two-legged robot
2023Low-cost robot dogsParkour policies with a depth camera climbed and leapt onto boxes up to twice the robot's height
2024ANYmalSeparate walking, jumping, climbing and crouching skills chained together to cross obstacle courses at up to 2 m/s
2025Spot, Go1, G1, Booster T1RAI Institute's Spot passed 5.2 m/s. MuJoCo Playground's Go1, G1 and T1 policies ran on real robots straight from simulation.

Training platforms and computers

Fast RL training runs thousands of simulated robots at once on a graphics card. Most published robot dog training uses one of the frameworks below.

FrameworkSimulatorHardwareNotes
Isaac LabNVIDIA Isaac SimNVIDIA RTX GPUUsed by many makers and research labs. Successor to the older Isaac Gym.
legged_gymIsaac GymNVIDIA GPUETH Zurich's 2021 code. Still the base of many projects, including Unitree's unitree_rl_gym.
MuJoCo PlaygroundMuJoCo MJXNVIDIA GPU or TPUReady-made tasks for the Go1, G1, Booster T1, Berkeley Humanoid and more
mjlabMuJoCo WarpNVIDIA GPUIsaac Lab style on MuJoCo. Used by Unitree's newer G1 and H1-2 code.
pupperv3-mjxMuJoCo MJXGoogle Colab GPUStanford's training code for the Pupper v3

No local graphics card is needed to start. Stanford's CS123 course trains the Pupper v3 walking policy in Google Colab, which runs in a web browser on Google's GPUs. In the fall 2026 course, a run with 4,096 simulated robots takes about 18 minutes on Colab's RTX Pro 6000 runtime. Colab Pro costs $9.99 a month. The free tier sometimes offers a GPU, but sessions end after at most 12 hours, and Google does not promise which GPU is available. Rented cloud GPUs are another option. An RTX 4090 cost about $0.15 to $0.90 an hour on Vast.ai and RunPod in October 2026 (estimate).

Apple Silicon Macs can train small policies on the CPU with plain MuJoCo. JAX-based tools such as MJX and Playground fall back to the CPU on a Mac, and Isaac Lab does not run there at all. In a test for this guide, an Apple M3 laptop with 8 CPU cores simulated the Pupper v3 at about 146,000 physics steps per second across all cores. With a policy acting every 5 physics steps and the time spent updating the network, that works out to roughly 5,000 to 15,000 training steps per second (estimate). An A100 GPU runs MuJoCo Playground's Go1 task at about 417,000 steps per second. The robots differ, but the laptop is roughly 30 to 80 times slower. Laptops without a fan also slow down during long runs as they heat up.

Training specific gaits

A policy trained only to follow a speed command usually ends up trotting, since a trot is stable and efficient for a robot dog. Other gaits need extra rewards or a fixed foot schedule. The table gives rough training sizes for small robot dogs. Real numbers vary a lot with the robot, rewards and settings.

GoalHow it is usually trainedTraining steps (estimate)One modern GPU (estimate)8-core laptop CPU (estimate)
Flat-ground trotSpeed tracking plus foot air time. A gait-timing reward makes the trot cleaner.100–300 million4–20 minutes2–17 hours
Pace, bound or pronkA reward for matching a foot-contact schedule, as in Walk These Ways200–500 million15–45 minutes6–28 hours
Gallop and high speedA speed curriculum that slowly raises the commanded speed500 million–1 billion+1–3 hours9 hours–2+ days
Rough ground and stairsA terrain curriculum. Often a teacher policy that sees the terrain, copied by a student that does not.200 million–1 billion20 minutes–2 hoursNot practical
Jumps and flipsRewards for height or body rotation, or copying a planned motion. Landing safely is the hard part.200 million–1 billion+30 minutes–3 hoursNot practical for learned policies
Getting up after a fallStarting each run in a random fallen pose100–500 million10–60 minutes2–28 hours

The GPU times match published results. legged_gym trained flat walking in under 4 minutes and rough ground in about 20 on an RTX A6000. MuJoCo Playground's Go1 walking policy trains in about 7 minutes on an RTX 4090. Its full recipe uses 100 million steps on flat ground, then 150 million more with wider commands and rough ground. Stanford's CS123 course uses at least 300 million steps for its final Pupper v3 policy, and a strong policy from scratch used about a billion. Most projects need many training runs to tune rewards, so a 20-minute run often turns into days of work.

Open-loop moves are a cheaper option. A fixed sequence of leg poses can be tuned on an ordinary laptop in minutes by the same kind of search program used for the bound and pronk above, as in the MuJoCo Guide's flip and jump examples. These moves do not react to the robot's sensors, so they break easily on a real floor. A trained policy is the usual way to make the same move reliable.

Purpose of gait training

Steps, stairs and obstacles

To climb a step, a robot needs to lift each foot high enough, place it on the tread, and shift its weight at the right moment. Gait training handles this in two ways.

Leg length sets a basic limit. Spot is rated for steps up to 30 cm, and the Unitree Go2 for about 15 to 16 cm. Learned parkour policies go well past these everyday ratings. One 2023 policy jumped onto boxes twice the robot's height. Ratings are lower than these record results, since a commercial robot needs to climb stairs reliably all day.

Pushes and falls

A robot dog in a home or on a street gets bumped, kicked and tripped. Two skills cover this. Push recovery keeps the robot on its feet, and fall recovery gets it back up when that fails.

Commercial robots ship fall recovery as a single command. The Spot SDK has a self-right command, and Unitree's SDK for the Go2 has a recovery stand call.

Push test in simulation

A push test like this one is a standard step in checking a new robot dog design, covered with the other tests in Quadruped Design Validation. The trot policy from the reward-hacking example was pushed from the side for 0.1 s, from the left and the right, standing and walking. It never saw a push in training. It always stayed up after a push worth 2 m/s, which is 142 N for 0.1 s on the 7 kg model. Walking at 1 m/s it also survived the largest push tested, 2.5 m/s. It caught itself by stepping sideways about 30 cm, tilting only 11°. The same model holding its standing pose without the policy fell over at 2 m/s.

With the policy. A 2 m/s side push. The dog steps sideways, turns and stays up.
Without the policy. The same push on the same model holding its standing pose. It tips over.

Hardware limits

A trained gait is only as good as the motors that carry it out. Dynamic gaits need motors that are strong, fast and quick to respond, and that report torque or current accurately.

Motor typeExamplesFit for learned dynamic gaits
Hobby servosPetoi Bittle (P1S and P1L servos)Poor. Low torque, slow response and gear backlash. Keyframe gaits work well, but learned gaits have mostly stayed in simulation.
Smart servosXGO-Mini2 (4.5 kg·cm serial bus servos)Limited. Position feedback helps walking, but torque and speed are too low for jumps, bounds or flips.
Quasi-direct-drive brushless motorsMini Cheetah, Pupper v3 (SteadyWin GIM4305-10, unconfirmed), Unitree Go2Good. Strong, fast and able to absorb landings. This motor type made learned flips and jumps practical.

Software access matters as much as the motors. A learned policy needs to send commands to each joint many times per second. Many consumer robot dogs only accept walking commands such as "go forward". Unitree rates only the Go2 EDU as fully open for custom low-level control, and Walk These Ways needed the Edu version of the Go1. Kits built for research, such as the Pupper v3, give full joint control from the start.

Limitations of learned gaits