Algorithm Search⌘K

Techniqueadvanced

Whole-body control

Also called WBC, whole-body operational space control.

Computes joint torques of a floating-base robot that serve several tasks and contact constraints at once, often by a quadratic program.

Whole-body control is a way to command every joint of a robot with many joints, such as a humanoid, a quadruped or a mobile manipulator, so that it does several things at once. It keeps its balance, holds its feet or hands on contacts without slipping, reaches with a hand, and keeps a good posture. Each goal is written as a task: a desired acceleration of some point or quantity, such as the center of mass, a foot or a hand. At each control cycle, a solver finds the joint accelerations, the contact forces and the joint torques that meet the equations of motion and the contact constraints and that serve the tasks as well as possible, either by weights or in a strict order of priority. Sentis and Khatib built it for humanoid robots on the operational space formulation; today it is usually a quadratic program, solved a thousand times per second. The same template works for a fixed arm, where it is the operational space control of the arm with a posture task in the null space.

In plain words

A humanoid robot that opens a door must do many things at the same moment. It must not fall. Its feet must not slide. Its hand must follow the handle. Its other arm and its head should stay in a natural pose. Every joint affects all of these at once, so you cannot give one joint to each job.

Whole-body control writes each job as a wish for how some part of the body should speed up. Then it asks a solver: which joint efforts give the motion closest to all the wishes, without breaking the laws of physics, without slipping, and without asking the motors for too much? If not all wishes can come true, the important ones win, for example "do not fall" before "look nice".

When it applies

  • The robot has more joints than any one task needs, so tasks can share the joints.
  • The robot has torque control, or at least a fast joint loop that can follow accelerations, and a model of its masses and inertias.
  • Contacts with the ground or with objects are known: where they are and which ones are active. The contact schedule comes from a higher level, such as a footstep planner or convex MPC.
  • The state, including the pose and velocity of the floating base, is estimated at the control rate.

For a fixed arm, the base is not floating, and there may be no contacts; the template still applies, with fewer constraints.

The template

Model. A floating-base robot has the generalized velocity ν=(νb,q˙)∈R6+n\nu = (\nu_b, \dot q) \in \mathbb{R}^{6 + n}, with the twist νb\nu_b of the base and the nn joint rates. Its floating-base dynamics with kk contacts are

M(q)ν˙+h(q,ν)=STτ+JcTλ,S=(0n×6In),M(q)\dot\nu + h(q, \nu) = S^T\tau + J_c^T\lambda, \qquad S = \begin{pmatrix} 0_{n \times 6} & I_n \end{pmatrix},

where MM is the mass matrix, hh holds the Coriolis, centrifugal and gravity terms, τ\tau the joint torques, JcJ_c the stacked contact Jacobians and λ\lambda the contact forces.

Steps at each control cycle.

  1. Read the state (q,ν)(q, \nu) and compute MM, hh, JcJ_c, J˙cν\dot J_c\nu and the task Jacobians JiJ_i and J˙iν\dot J_i\nu, with the recursive algorithms of rigid body dynamics.
  2. For each task ii with coordinates xix_i, set the wanted acceleration x¨i∗=x¨i,d+Kd,i(x˙i,d−x˙i)+Kp,i(xi,d−xi)\ddot x_i^\ast = \ddot x_{i,d} + K_{d,i}(\dot x_{i,d} - \dot x_i) + K_{p,i}(x_{i,d} - x_i).
  3. Solve for (ν˙,λ,τ)(\dot\nu, \lambda, \tau):
min⁡∑iwi ∣Jiν˙+J˙iν−x¨i∗∣2+ε (∣λ∣2+∣τ∣2)\min \sum_i w_i\,\bigl|J_i\dot\nu + \dot J_i\nu - \ddot x_i^\ast\bigr|^2 + \varepsilon\,\bigl(|\lambda|^2 + |\tau|^2\bigr)

subject to the dynamics, the contact condition Jcν˙+J˙cν=0J_c\dot\nu + \dot J_c\nu = 0 (feet do not move), each contact force in a linearized friction cone with a positive normal part, and the torque, joint limit and other inequality limits. 4. Send τ\tau to the joints, and repeat at the next cycle.

The unactuated rows. The first six rows of the dynamics have no torque:

Mbν˙+hb=Jc,bTλ.M_b\dot\nu + h_b = J_{c,b}^T\lambda.

They say that the contact forces alone must produce the change of the total momentum of the robot, which is the Newton-Euler equation of the whole body about its center of mass, the centroidal dynamics. Many solvers keep only these rows as constraints, with variables (ν˙,λ)(\dot\nu, \lambda), and compute τ\tau afterwards from the other nn rows, which is cheaper.

Weights or priorities. With weights wiw_i, the tasks trade off against one another, and a small task can still disturb a large one a little. With strict priorities, each task is optimized only among the solutions that keep all higher ones at their best value: this is hierarchical quadratic programming. Without inequalities, the strict version has a closed form with null space projections: Sentis and Khatib used the dynamically consistent null space of the operational space formulation, in which a lower task cannot produce any acceleration of a higher task.

Classic examples

Accelerating the center of mass on two feet. A planar robot of mass m=50m = 50 kg has its center of mass at height 0.90.9 m above the point between its feet, which are at x=−0.1x = -0.1 and x=0.1x = 0.1 m. The task asks for a forward acceleration of the center of mass of 0.50.5 m/s² with no change of the angular momentum. The unactuated rows give three equations for the two contact forces (fx,1,fz,1)(f_{x,1}, f_{z,1}) and (fx,2,fz,2)(f_{x,2}, f_{z,2}):

  • forward: fx,1+fx,2=50⋅0.5=25f_{x,1} + f_{x,2} = 50 \cdot 0.5 = 25 N;
  • up: fz,1+fz,2=50⋅9.81=490.5f_{z,1} + f_{z,2} = 50 \cdot 9.81 = 490.5 N;
  • moment about the center of mass: −0.1fz,1+0.1fz,2+0.9(fx,1+fx,2)=0-0.1 f_{z,1} + 0.1 f_{z,2} + 0.9(f_{x,1} + f_{x,2}) = 0, so fz,1−fz,2=225f_{z,1} - f_{z,2} = 225 N.

So fz,1=357.75f_{z,1} = 357.75 N on the rear foot and fz,2=132.75f_{z,2} = 132.75 N on the front foot. The center of pressure is at (−0.1⋅357.75+0.1⋅132.75)/490.5=−0.0459(-0.1 \cdot 357.75 + 0.1 \cdot 132.75)/490.5 = -0.0459 m, which is the zero-moment point −0.9⋅0.5/9.81-0.9 \cdot 0.5/9.81. The split of the 25 N between the feet is free, an internal force; the regularization term picks 12.512.5 N each, inside a friction cone with μ=0.5\mu = 0.5 (12.5≤0.5⋅132.7512.5 \le 0.5 \cdot 132.75). If the task asks for 22 m/s² instead, the center of pressure would have to be at −0.18-0.18 m, behind the rear foot, so no positive normal forces exist. With the task as a weighted cost, the solver gives the largest acceleration that the feet allow, 0.1⋅9.81/0.9=1.090.1 \cdot 9.81/0.9 = 1.09 m/s².

Humanoid reaching. Tasks in priority order: the contact constraints, the center of mass over the support polygon, the hand position, and a posture task that keeps the joints near a rest pose. When the hand target is too far, the hand task fails gracefully while the balance holds.

Quadruped trotting. Convex MPC plans the ground forces of the stance feet over a horizon on a simple model; whole-body control tracks those forces and the swing foot paths with the full model at a higher rate.

A fixed arm. With no floating base and no contacts, S=IS = I, and the template with an end effector task and a posture task is operational space control, with the posture in the null space of the end effector task.

Variations

  • Velocity-level and kinematic versions. Solve for joint velocities with task-priority inverse kinematics and send them to stiff position-controlled joints. This is simpler and often enough for slow tasks.
  • Projected dynamics. Remove the contact forces by projecting the dynamics onto the null space of JcJ_c, so the solver needs only ν˙\dot\nu and τ\tau.
  • Momentum-based control. Make the rate of change of centroidal momentum the main task, and distribute the contact forces in the contact wrench cone.
  • With prediction. Model predictive control on the full or centroidal model over a short horizon, with whole-body control as the fast tracking layer.

Pitfalls

  • Wrong contact state. If a foot is declared in contact but is in the air, the constraint Jcν˙+J˙cν=0J_c\dot\nu + \dot J_c\nu = 0 is false and the solution is wrong. Use contact detection and switch constraints smoothly.
  • Infeasible hard tasks. A task written as an equality constraint can make the QP infeasible, as in the example with 22 m/s². Keep tasks as costs or as priority levels, and keep only the physics as hard constraints.
  • Gains in conflict. With weights, a stiff low-importance task can pull a high-importance task off its target. Scale the weights by the task units, or use strict priorities.
  • Model errors. The torques rely on MM and hh; errors in masses show up as tracking errors. Add integral action on the slow tasks, or estimate the parameters.
  • Time budget. The QP must finish in about 1 ms on the robot computer. Warm start from the last solution, and keep the number of variables small with the unactuated-rows form.

Exercises

  1. In the example with two feet, find the largest forward acceleration of the center of mass when the friction coefficient is μ=0.05\mu = 0.05 and the forces are split equally between the feet.
  2. Show that for a fixed arm with an end effector task of full rank and no inequality limits, the weighted problem with a tiny posture weight tends to the solution with the posture in the null space of the end effector task.
  3. Write the unactuated rows for a robot that stands on one point foot, and show that the horizontal acceleration of its center of mass is fixed by the position of the foot and the height of the center of mass if the angular momentum must not change.
  4. Explain why the internal force between two feet does not change the motion of the robot, and give one reason to choose it on purpose rather than by the smallest norm.

References

  1. Luis Sentis and Oussama Khatib, Synthesis of whole-body behaviors through hierarchical control of behavioral primitives, International Journal of Humanoid Robotics 2(4), pp. 505-518, the whole paper (task, posture and contact constraints for a humanoid robot, with lower priority tasks in the dynamically consistent null space of higher ones)
  2. Adrien Escande, Nicolas Mansard and Pierre-Brice Wieber, Hierarchical quadratic programming, fast online humanoid-robot motion generation, The International Journal of Robotics Research 33(7), pp. 1006-1028 (strict task priorities with inequality tasks, solved fast enough for the control loop of a humanoid robot)
  3. Oussama Kanoun, Florent Lamiraux and Pierre-Brice Wieber, Kinematic control of redundant manipulators, generalizing the task-priority framework to inequality task, IEEE Transactions on Robotics 27(4), pp. 785-792 (a cascade of QPs, one per priority level, with inequality tasks)
  4. Kevin M. Lynch and Frank C. Park, Modern Robotics, Mechanics, Planning, and Control, Cambridge University Press, 2017, Chapter 8 (the dynamics of open chains, M(q), the Coriolis and gravity terms) and Chapter 11 (task space motion control)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • five exercises