Building Whole-Body Control for Humanoid Robots
Humanoid robots have many joints that must coordinate simultaneously. Moving one joint can affect balance, contact forces, and the configuration of the entire body.
Whole-body control (WBC) addresses this problem by coordinating multiple objectives under the robot's kinematic and dynamic constraints.
The Humanoid Control Problem
A humanoid may need to control:
Head
Arms
Torso
Hips
Knees
Ankles
Hands
while simultaneously maintaining:
- Balance
- Foot contacts
- Joint limits
- Collision avoidance
- End-effector goals
1. Think in Tasks
Instead of commanding every joint independently, define tasks:
Task 1: Keep center of mass stable
Task 2: Maintain left foot contact
Task 3: Maintain right foot contact
Task 4: Move right hand
Task 5: Keep torso orientation
The whole-body controller finds joint commands that satisfy these objectives as well as possible.
2. Kinematic Model
Let:
q = joint positions
q̇ = joint velocities
An end-effector velocity can be approximated as:
ẋ = J(q) q̇
where J(q) is the Jacobian.
A controller can use this relationship to convert Cartesian task goals into joint-space motion.
3. Hierarchical Control
Some tasks are more important than others.
For example:
Priority 1
Balance / Safety
Priority 2
Foot Contacts
Priority 3
Manipulation
Priority 4
Posture
A lower-priority task should not violate a higher-priority constraint.
4. Optimization-Based Whole-Body Control
A simplified optimization objective can be written as:
minimize:
||J q̇ - ẋ_des||²
+
λ ||q̇||²
subject to:
joint limits
velocity limits
contact constraints
collision constraints
Real humanoid controllers may use more sophisticated task, force, and dynamics formulations.
5. Center of Mass Control
Balance is fundamental.
The controller monitors:
Center of Mass
↓
Support Polygon
↓
Balance Error
↓
Corrective Motion
If the robot shifts its upper body, it may need to move its feet or adjust its joints to maintain stability.
6. Contact Constraints
When a foot is planted:
Foot position ≈ constant
The controller must ensure that commanded motion does not unintentionally move the contact point.
This creates constraints that couple multiple joints.
7. Integrate with ROS 2
A humanoid architecture might be:
Perception
↓
State Estimation
↓
Task Planner
↓
Whole-Body Controller
↓
Joint Commands
↓
ros2_control
↓
Actuators
ros2_control provides standardized command and state interfaces that can form the low-level integration boundary. ros2_control
8. Separate Planning from Control
A task planner might say:
"Reach for the object."
The whole-body controller handles:
Hand trajectory
Torso posture
Balance
Joint limits
Contact constraints
This separation keeps high-level reasoning independent from low-level control.
9. Add Joint Limits
Every command should respect:
q_min ≤ q ≤ q_max
and often:
|q̇| ≤ q̇_max
|τ| ≤ τ_max
These limits should be enforced close to the actuator boundary.
10. Handle Conflicting Goals
Suppose:
Task A: Keep feet fixed
Task B: Reach far forward
If both cannot be satisfied, the controller should prioritize stability.
This is why hierarchical priorities or constrained optimization are important for humanoids.
11. Test in Simulation
Use:
Kinematic Tests
↓
Dynamic Simulation
↓
Hardware-in-the-Loop
↓
Low-Energy Hardware Tests
↓
Full Robot
Start with conservative motion and verify joint limits and emergency-stop behavior.
Conclusion
Whole-body control turns a humanoid from a collection of independently controlled joints into a coordinated system.
The central idea is to express balance, contacts, manipulation, posture, and other requirements as tasks and constraints, then solve for joint-level commands while respecting physical limits.
Useful Links
Website: www.v-modal.com
SDK Flutter: https://github.com/v-modal/vmodal_sdk_flutter
SDK Android: https://github.com/v-modal/vmodal_sdk_android
Discord: https://discord.gg/K72z28KUx
Top comments (0)