> For the complete documentation index, see [llms.txt](https://doc.ancorasir.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ancorasir.com/2026spring/simulation-and-interaction/class-08-whole-body-control-for-humanoids.md).

# Class 08: Whole-Body Control for Humanoids

### Purpose

Whole-body control (WBC) coordinates a humanoid's full set of joints and contacts to achieve multiple, sometimes competing, objectives at once. Typical objectives include balance, locomotion, manipulation, posture, and regulation of contact force. Rather than planning each joint separately, WBC solves a single constrained problem that respects the robot's dynamics and physical limits.

### Included implementation

This module includes a bundled copy of OpenLoong Dynamic Control. Its upstream directory structure is preserved because the build, model, documentation, and third-party paths are interdependent.

<table><thead><tr><th width="200.34765625">Resource</th><th>Purpose</th></tr></thead><tbody><tr><td>OpenLoong overview</td><td>Build requirements, supported demonstrations, and project context.</td></tr><tr><td>OpenLoong tutorial</td><td>Step-by-step simulation and controller workflow.</td></tr><tr><td><code>demo/</code></td><td>Executable examples.</td></tr><tr><td><code>models/</code></td><td>Robot and environment models used by the controller.</td></tr></tbody></table>

### Core Ideas

* **Task hierarchy:** Multiple tasks (e.g., keep the torso upright, track foot placement, move the hand) are prioritized so higher-level tasks are preserved when lower-level tasks conflict.
* **Constraint handling:** Joint limits, torque limits, friction cones, and contact stability constraints are enforced during control.
* **Redundancy resolution:** Humanoids have more degrees of freedom than needed for a single task. WBC exploits this to satisfy secondary objectives without breaking primary ones.
* **Whole-body dynamics:** Control uses the full-body model so that decisions about one limb consider impacts on the rest of the body.

### Common Formulations

* **Operational-space control (OSC):** Specifies tasks in Cartesian space and maps them to joint torques using the robot's dynamics.
* **Quadratic programming (QP):** Poses control as an optimization with constraints and weighted objectives.
* **Hierarchical QP (HQP):** Uses stacked QPs to enforce strict task priorities.
* **Model predictive control (MPC):** Optimizes over a future horizon to anticipate contact changes and balance.

### Typical Tasks in a Humanoid WBC Stack

* Maintain center of mass (CoM) within the support polygon.
* Track swing foot trajectories for stepping.
* Regulate contact forces at the feet and hands.
* Stabilize torso orientation during motion.
* Coordinate arm motion for manipulation while walking.

### Practical Considerations

* **State estimation:** WBC quality depends on accurate estimates of the base pose, velocity, and contact state.
* **Contact transitions:** Smoothly adding/removing contacts is critical for stability.
* **Computation:** Real-time solvers must run at high rates (often 100 Hz to 1 kHz).
* **Tuning:** Task weights and priorities significantly affect behavior and robustness.

### Example Control Loop (High Level)

1. Read state estimates (pose, velocity, contacts).
2. Assemble tasks and constraints.
3. Solve the optimization (QP/HQP/MPC).
4. Send joint torques/commands to the low-level controller.
5. Repeat at the control rate.

### Further Reading

* Sentis, L. *Whole-Body Control of a Humanoid Robot* (2010)
* Khatib, O. (1987) Operational Space Formulation
* Saad, M. et al. (2019) Whole-Body Control Frameworks for Humanoids

### Summary

This module introduces the key concepts and methods of whole-body control, enabling you to integrate perception, planning, and actuation into a single coordinated controller.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.ancorasir.com/2026spring/simulation-and-interaction/class-08-whole-body-control-for-humanoids.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
