Legged and humanoid robots
How walking robots stay upright and move. Gaits and contact schedules, ZMP and the capture point, centroidal dynamics and MPC, learned locomotion policies, and how to tell a demo from a product.
Overview
Legged robots trade the simplicity of wheels for access to stairs, rubble, kerbs and gaps. Humanoids add the promise of working in spaces built for people. Both are hard to control for one reason: the body is not bolted to anything. The base is underactuated, and the only way to push it is through contact forces at the feet. Those forces can only push, never pull, and they must stay inside the friction cone or the foot slips. This hub is for engineers working on locomotion controllers or evaluating legged robots for a site.
Key ideas
Gaits and contact schedules
A gait is the schedule of which feet touch the ground and when. A slow quadruped walk keeps three feet down most of the time, so the projection of the centre of mass (CoM) can stay inside the support polygon. That is static stability: the robot would not fall if it froze. A trot moves diagonal pairs of legs together. The support polygon shrinks to a line, and balance depends on motion, which is dynamic stability. Bounding and galloping add flight phases with no feet on the ground. Bipeds have at most two feet down and a small support area, so practical walking is dynamic. Most controllers fix the contact schedule ahead of time and plan forces and footholds around it.
ZMP and the capture point
The zero-moment point (ZMP) is the point on the ground where the contact forces produce no tipping moment about horizontal axes. For a flat foot it must stay inside the support polygon, or the foot starts to roll on its edge. Vukobratović and Borovac review 35 years of its use. Kajita et al. (2003) model the robot as a linear inverted pendulum, with the CoM at constant height z_c above the ground. The CoM then accelerates away from the ZMP at a rate set by ω = sqrt(g/z_c). They plan the CoM motion with preview control over future ZMP references. Pratt et al. (2006) asked where the robot must step to come to rest. For the same model the answer is the capture point, the CoM position plus its velocity divided by ω. Stepping there is the basis of push recovery.
Centroidal dynamics and model predictive control
The full dynamics of a legged robot have dozens of states. Orin, Goswami and Lee (2013) showed that the total linear and angular momentum about the CoM, the centroidal momentum, changes only through gravity and contact forces. That gives a small model that still captures what matters for balance. Di Carlo et al. (2018) went further for the MIT Cheetah 3 and treated the body as one rigid body. They planned ground reaction forces over a short horizon as a convex model predictive control problem, then mapped those forces to joint torques. Planning on a reduced model and tracking with a whole-body controller is a common structure for model-based locomotion.
Learned locomotion policies
Reinforcement learning in simulation now trains many walking controllers. Hwangbo et al. (2019) trained a quadruped policy entirely in simulation and ran it on the physical robot, which followed velocity commands and recovered from falls. Lee et al. (2020) trained a controller that uses only proprioceptive signals and took it outdoors through mud, snow, rubble and vegetation. Rudin et al. (2021) ran thousands of robots in parallel on one workstation GPU and, according to the authors, trained flat-terrain walking in under four minutes and rough-terrain walking in twenty. The policy maps joint states, base motion and commands to joint targets at a fixed rate. It is fast and handles terrain well, but harder to inspect or bound than an MPC.
Where to start
The dynamics hub and control hub cover the background. Simulate an arm in MuJoCo teaches MuJoCo, which several of the locomotion tools below build on. PID control explains the joint-level loops that every legged controller still sits on. The robot learning hub and simulation hub cover training and transfer. See Spot and Go2 in the robot table.
Tools and platforms
| Tool | What for | Licence |
|---|---|---|
| Pinocchio | Fast rigid-body and centroidal dynamics with derivatives | BSD-2-Clause |
| Crocoddyl | Optimal control for contact sequences | BSD-3-Clause |
| OCS2 | Switched-system MPC used for legged robots | BSD-3-Clause |
| Isaac Lab | GPU-parallel robot learning framework, where the legged_gym environments now live | BSD-3-Clause and Apache-2.0 |
| MuJoCo Playground | Robot environments and large-batch RL training on MuJoCo | Apache-2.0 |
| unitree_sdk2 | Low-level and high-level control of Unitree robots | BSD-3-Clause |
Common mistakes
- Taking a video as evidence of a product. Look for a datasheet, a price, a support contract and named customers.
- Tuning gains on a model with ideal motors. Joint friction, torque limits and latency decide whether a controller works.
- Ignoring the friction cone. A plan that needs more sideways force than μ times the normal force will slip.
- Training a policy without randomising mass, friction and motor strength, then blaming the hardware.
- Reading a single success rate. Ask over what terrain, how many trials and whether a human was ready to catch the robot.
Going deeper
- Vukobratović and Borovac, Zero-Moment Point: Thirty Five Years of Its Life, 2004.
- Kajita et al., Biped walking pattern generation by using preview control of zero-moment point, ICRA 2003.
- Pratt, Carff, Drakunov and Goswami, Capture Point: A Step toward Humanoid Push Recovery, 2006.
- Orin, Goswami and Lee, Centroidal dynamics of a humanoid robot, 2013.
- Di Carlo et al., Dynamic Locomotion in the MIT Cheetah 3 Through Convex Model-Predictive Control, IROS 2018.
- Hwangbo et al., Learning agile and dynamic motor skills for legged robots, 2019, Lee et al., Learning quadrupedal locomotion over challenging terrain, 2020, and Rudin et al., Learning to Walk in Minutes Using Massively Parallel Deep Reinforcement Learning, 2021.
- Tedrake, Underactuated Robotics, MIT course notes, free online.