← back

Why Legs Are Hard

If you started your robotics journey with standard mobile robots—like a TurtleBot or a differential drive AGV—transitioning to humanoid control presents a steep learning curve.

For decades, wheeled robots have navigated complex environments using relatively straightforward geometric logic. You command a linear and angular velocity, and the robot executes it. The control problem is often reduced to kinematics. Yet, if you try to apply these same strategies to a quadruped or a humanoid like the Unitree G1, the system fails immediately.

Why is it that a wheeled robot can simply "drive," but a legged robot requires complex, optimization-based controllers (like MPC or RL) just to remain upright?

From a control theory perspective, the answer lies in three fundamental mathematical differences: static vs. dynamic stability, hybrid dynamics, and under-actuation.


1. Static vs. Dynamic Stability (The Floating Base)

The primary difference lies in the stability criteria of the base frame.

If you use a naive PID controller to lift a leg, you alter the system's mass distribution. Unlike a wheeled base which is grounded, a humanoid's base is floating. Lifting a heavy leg generates a reaction torque on the torso (τ = I·α). Without a controller that accounts for these inertial coupling effects, the torso pitches uncontrollably, and the robot falls.

Advanced controllers are essential here to solve the Whole-Body Control problem. They account for the full rigid-body dynamics, ensuring that limb movements don't destabilize the floating base.

2. Hybrid Dynamics and Unilateral Constraints

This is likely the most challenging aspect of legged locomotion mathematically.

Furthermore, the interaction with the environment is governed by Unilateral Constraints. You can only control the robot by exerting force on the ground, but strictly within the limits of physics:

  1. No Pulling: The normal force must be positive (fz > 0).
  2. No Slipping: The tangential force must stay within the friction cone (√(fx2 + fy2) ≤ μ·fz).

A simple PID controller does not respect these inequalities. If a PD loop computes a torque that requires "pulling" the ground to correct an error, a physical robot will simply lift its foot, losing control authority. We need solvers or policies that explicitly operate within these constraints.

3. Fully Actuated vs. Under-Actuated Systems

This refers to the relationship between the control inputs (motors) and the system's degrees of freedom.

You cannot simply command the torso to "translate forward." You must actuate the hip and knee joints to generate a Ground Reaction Force that propagates through the kinematic chain to accelerate the CoM.

Simple velocity commands don't work here. The controller must solve an Inverse Dynamics problem or learn a policy that understands the indirect relationship between joint torques and base acceleration. It requires planning forces, not just positions.

Summary: Kinematics vs. Dynamics

To summarize, the fundamental shift is:

If you rely solely on kinematic trajectory tracking for a humanoid, you ignore the forces required to maintain the floating base's stability. This is why modern legged robots rely on MPC or RL—they provide the "brain" capable of handling the physics of floating, falling, and friction.


A Note on Convergence

It is worth noting that as wheeled robotics moves into high-performance domains—such as rally racing or off-road traversability on loose terrain—the assumptions of static stability and no-slip begin to fail. In these "at-the-limit" scenarios, wheeled control also transitions toward the same advanced control techniques used in legged robots to handle nonlinear dynamics.