When a humanoid robot walks across uneven terrain or a dual-arm system picks up a fragile object, it faces a daunting mathematical challenge. The robot must satisfy "hard" physical laws—such as not slipping on the floor or exceeding motor torque limits—while simultaneously pursuing "soft" goals, like reaching for a handle or keeping its torso upright.
Instead of manually programming every joint movement, modern robotics treats this as an optimization problem. The dominant approach, synthesized across decades of research, uses Quadratic Programming (QP) to resolve these competing demands in real-time.
The Robot as an Optimization Problem
At its core, whole-body control (WBC) is about translation. A high-level controller might say, "Move the hand forward," but the low-level hardware needs to know exactly how much torque to apply to dozens of motors.
Karim Bouyarmane and Abderrahmane Kheddar pioneered frameworks where this translation is handled by a QP solver. The solver looks at a "cost function"—a mathematical description of the robot's goals—and finds the specific joint torques that minimize that cost while staying within a "feasible region" defined by physical constraints.
This approach is powerful because it allows robots to be "multi-objective." As Francesco Nori demonstrated with the Atlas robot, a controller can prioritize balance and momentum conservation during a precarious lunge, momentarily sacrificing the accuracy of a foot placement to prevent a fall. By assigning different weights to different tasks, the robot behaves dynamically, reacting to the world rather than following a rigid script.
Hard Constraints vs. Soft Goals
The "magic" of constrained optimization lies in how it handles the uncompromising nature of physics. In early work, D. E. Okhotsimsky and A. K. Platongy used linear programming to ensure six-legged robots maximized their "friction margin"—essentially calculating how to distribute weight so no leg would slip.
Modern QP frameworks expand on this by incorporating several types of constraints:
- Unilateral Contacts: A foot can push against the ground, but it cannot pull.
- Friction Cones: To prevent slipping, the horizontal force at a contact point must be proportional to the vertical force. Niels Dehio and colleagues showed how this allows dual-arm robots to optimize "squeeze force" dynamically, applying just enough pressure to hold an object without crushing it.
- Joint and Torque Limits: Motors have physical ceilings. Alexander Alexiev showed that by embedding these limits directly into the QP, a high-DOF hand can perform complex grasps in cluttered spaces without ever straining its own hardware.
Efficiency through Projection
Solving a massive optimization problem hundreds of times per second is computationally expensive. To make these systems work in real-time, researchers look for ways to simplify the math without losing the physics.
Diego Pardo and Jonas Buchli introduced a "projection-based" approach. Instead of treating every possible contact force as a variable to be solved, they project the robot's dynamics into the "null space" of its constraints. This effectively "hides" the contact forces from the optimizer, reducing the number of variables and allowing for much faster trajectory generation.
Similarly, Alejandro Castro and his team developed the Semi-Analytic Primal (SAP) solver. By reframing frictional contact as an unconstrained convex problem, they achieved interactive-rate simulations that are an order of magnitude faster than traditional constrained solvers, proving that the way we frame the optimization is just as important as the hardware running it.
Stability and Human Interaction
Beyond just moving, these optimizers provide safety guarantees. Haizhou Zhao integrated Control Lyapunov Functions directly into the QP framework for wheeled bipedal robots. This ensures that the solver doesn't just find a solution, but a stable one that is mathematically guaranteed to keep the robot upright.
This stability is critical when robots interact with humans. In rehabilitation settings, Lorenzo Vianello used a QP framework to link a therapist and a patient through two exoskeletons. The optimizer balanced the therapist's guidance with the patient's need for support, ensuring the robot provided help only when necessary while strictly enforcing safety boundaries.
Whether it is Salman Faraji using MPC to plan footsteps or Levi Burner using extremum seeking to "wiggle" a key into a lock, the underlying intuition remains the same: complex behavior emerges when we stop trying to script motion and start optimizing for objectives within the boundaries of the physical world.