Section 7.6: Operational-space and whole-body control (preview for humanoids)

A Careful Control Loop
Big Picture

Operational-space and whole-body control (preview for humanoids) is one lens on Control for AI Practitioners. We study it because an embodied agent needs decisions that survive contact with noisy sensors, delayed effects, and changing environments.

This section develops the technical contract for Operational-space and whole-body control (preview for humanoids) into a usable mental model. First we define the object of study, then we connect it to the agent loop, then we test it with a compact implementation.

The key question in Operational-space and whole-body control (preview for humanoids) is practical: what must the agent know, what can it observe, what action is available, and what evidence shows that the action worked under the stated conditions?

Action Is The Test

A representation earns its place when it changes the measurable action interface. In Operational-space and whole-body control (preview for humanoids), the reader should keep asking which decision becomes easier, safer, or more reliable.

Theory

For Operational-space and whole-body control (preview for humanoids), the practical design rule is to make the interface inspectable before optimization begins: inputs, outputs, units, latency, bounds, and failure labels should all be visible in the saved artifact.

Operational-space control asks for motion in task coordinates, such as hand pose, foot force, or center of mass, rather than raw joint coordinates. The Jacobian $J(q)$ maps joint velocity to task velocity, $\dot x=J(q)\dot q$, so the controller can reason about what the robot's body does in the world. Whole-body control adds priority: balance and contact constraints usually outrank a hand motion, and remaining degrees of freedom can be used for posture, joint-limit avoidance, or energy management.

Priority Is A Safety Contract

A humanoid cannot treat every task as equally important. Foot contact, center of mass, collision margin, and torque limits define the safe feasible set. Arm reaching and expressive motion should live inside the remaining null space, otherwise the robot can satisfy a visible task while losing the body that makes the task possible.

Mechanism

The mechanism in Operational-space and whole-body control (preview for humanoids) is the contract between representation and action. Name what enters the module, what leaves it, which assumptions make that transformation valid, and which log would reveal a bad handoff.

Worked Example

Whole-body control resolves task priorities with null-space projection. Given a primary task velocity \(\dot x_d\) and its Jacobian \(J\), the joint command is \(\dot q = J^\dagger \dot x_d + (I - J^\dagger J)\,u_\text{null}\). The first term meets the primary task; the projector \((I - J^\dagger J)\) restricts the secondary objective \(u_\text{null}\) to the directions that leave the primary task untouched. Code Fragment 7.6.1 runs this on a planar 3-link arm: the primary task is end-effector motion, the secondary is posture (pulling joints toward a rest pose). It then shows the priority guarantee saturating: once enough independent tasks are stacked, the null space collapses and there is no freedom left for posture.

import numpy as np

L = np.array([1.0, 0.8, 0.6])           # planar 3-link arm

def fk_jac(q):
    # 2xN Jacobian of end-effector position w.r.t. joint angles.
    J, ang = np.zeros((2, 3)), np.cumsum(q)
    for i in range(3):
        Jx = Jy = 0.0
        for k in range(i, 3):
            Jx += -L[k] * np.sin(ang[k]); Jy += L[k] * np.cos(ang[k])
        J[0, i], J[1, i] = Jx, Jy
    return J

q = np.array([0.3, 0.5, -0.4])
J = fk_jac(q)
Jp = np.linalg.pinv(J)

xdot_d = np.array([0.2, 0.0])           # primary: move +x, hold y
u_null = 1.0 * (np.zeros(3) - q)        # secondary: pull joints toward rest pose
Nproj = np.eye(3) - Jp @ J              # null-space projector of the primary task
qdot = Jp @ xdot_d + Nproj @ u_null

print("primary task error ||J*qdot - xdot_d|| =",
      round(float(np.linalg.norm(J @ qdot - xdot_d)), 6))
print("secondary realized in null space, ||N u_null|| =",
      round(float(np.linalg.norm(Nproj @ u_null)), 4))

# Stack a third independent task (end-effector orientation): null space saturates.
J3 = np.vstack([J, np.ones((1, 3))])    # x, y, and orientation = sum of joint angles
N3 = np.eye(3) - np.linalg.pinv(J3) @ J3
print("null-space trace with 3 independent tasks =", round(float(np.trace(N3)), 3),
      "(0 => no DOF left for posture)")
primary task error ||J*qdot - xdot_d|| = 0.0 secondary realized in null space, ||N u_null|| = 0.3414 null-space trace with 3 independent tasks = -0.0
Code Fragment 7.6.1: the primary end-effector task is met exactly while posture is improved only through leftover degrees of freedom. Adding a third independent task (orientation) drives the null-space trace to zero, so the secondary posture objective can no longer act. On a humanoid this is the safety story: balance and contact tasks claim priority first, and expressive arm motion lives in whatever null space remains, never the other way around.
Library Shortcut

The fragment should expose task frame, Jacobian, contact constraints, priority, and torque or acceleration command. Whole-body stacks matter only after these control semantics are explicit.

Practical Recipe

  1. Write the observation, action, and success metric before choosing a model.
  2. Build a baseline that is simple enough to debug by inspection.
  3. Add the library implementation only after the baseline behavior is understood.
  4. Record failures as structured cases: perception error, state error, planning error, control error, or evaluation error.
  5. Run at least one perturbation test before trusting the result.
Common Failure Mode

The common mistake in Operational-space and whole-body control (preview for humanoids) is to celebrate the component score before checking the closed-loop handoff. The failure usually appears at the boundary: stale state, wrong frame, delayed action, saturated actuator, or metric that ignores the real task cost.

Practical Example

A robotics team using Operational-space and whole-body control (preview for humanoids) should log not only final success, but intermediate observations, chosen actions, controller status, and recovery events. The logs reveal whether the method is solving the task or merely passing the easiest episodes.

Memory Hook

Treat operational-space and whole-body control (preview for humanoids) like a control-room label. If the label does not tell a future debugger what moved, what sensed, or what failed, it is decoration rather than engineering knowledge.

Research Frontier

For Operational-space and whole-body control (preview for humanoids), treat frontier claims as hypotheses until they expose enough detail to reproduce the result: data boundary, embodiment, controller interface, evaluation panel, and failure cases.

Self Check

Can you name the observation, state estimate, action, success metric, and most likely failure mode for Operational-space and whole-body control (preview for humanoids)? If not, the system boundary is still too vague.

Production Pattern

Operational-space and whole-body control (preview for humanoids) sits inside the Part II robotics contract: geometry defines where things are, kinematics defines what motion is possible, dynamics defines what motion costs, control defines how errors are corrected, and sensing defines what the agent can know on time.

Operational-space control must name task priorities, contact assumptions, and null-space behavior. This makes the section useful to students, builders, and researchers at the same time: the idea has an intuitive role, a formal interface, a runnable check, and a failure mode that can be reproduced.

Mechanism To Watch

For Operational-space and whole-body control (preview for humanoids), control closes the loop between estimated state and action. Keep reference, measured state, error signal, control law, actuator limits, and safety fallback separate in the evidence record.

Library Choices And Verification Checks
Tool or LibraryWhat It HandlesVerification Check
python-controlanalyzes linear systems, transfer functions, state-space models, and feedback loopsVerify units, sample time, poles, stability margin, and reference scaling.
CasADiformulates optimization-based controllers with constraints and horizonsVerify constraints, warm start, solver status, and deadline behavior.
Drakemodels dynamical systems, multibody plants, optimization, and controllersVerify scalar type, plant finalization, frame convention, and solver status.
do-mpcformulates optimization-based controllers with constraints and horizonsVerify constraints, warm start, solver status, and deadline behavior.
ROS 2 controlsupports practical work on Operational-space and whole-body control (preview for humanoids)Verify the library output against the hand-built baseline on one small case.

Use this recipe when turning Operational-space and whole-body control (preview for humanoids) into code, a simulator experiment, or a robot diagnostic. The point is not to use every library. The point is to keep the hand-built baseline and the maintained-tool path comparable.

  1. Write the control objective, measured state, actuator command, update rate, and saturation policy.
  2. Run a step-response test before adding learning, with overshoot, settling time, and steady-state error logged.
  3. Compare the hand controller with python-control, CasADi, Drake, do-mpc, or ROS 2 control on the same plant model.
  4. Record latency, missed deadlines, saturation events, constraint violations, and recovery actions.
  5. Only compare controllers and policies when they share sensors, action limits, disturbance tests, and safety checks.
Evidence Gate

For Operational-space and whole-body control (preview for humanoids), compare methods only through one saved artifact that preserves the inputs, outputs, units, timestamps, latency budget, configuration, seed, metric definition, and failure labels relevant to this section. The comparison is meaningful only when the same script evaluates the same panel.

Exercise Extension

Extend the section exercise by adding one perturbation specific to Operational-space and whole-body control (preview for humanoids) and one latency or uncertainty check. Save the result in the EvidenceRecord schema, then explain which library output you trust and why.

A learned policy can hide a whole-body priority conflict until contact changes. Check frame conventions, Jacobian ordering, contact mode, torque limits, null-space projection, and fallback behavior before scaling training. For this section, first reproduce one small task-space command by hand, then rerun it through Drake, Pinocchio, MuJoCo, or the robot controller stack. If the two disagree, inspect frame transforms, contact assumptions, and which lower-priority task was sacrificed.

Technical Core

Operational-space and whole-body control (preview for humanoids) needs a topic-native core: variables, equations or system contracts, an algorithmic procedure, an expected output, and a failure diagnosis. Figure 7.6.T summarizes the chain this section must preserve when moving from a teaching example to a real embodied system.

Technical core for Operational-space and whole-body control (preview for humanoids) A block diagram connecting assumptions, model, algorithm, evidence, and failure analysis for Operational-space and whole-body control (preview for humanoids). Assumptions frames, units, limits Model feedback control Algorithm update or plan Evidence trace, metric Failure diagnosis Graduate-depth contract: define variables, run the method, interpret output, and explain when it fails. This diagram marks the minimum technical chain the section must make explicit.
Figure 7.6.T: The technical core for Operational-space and whole-body control (preview for humanoids) connects assumptions, model, algorithm, evidence, and failure analysis.
Formal Object

Task velocity obeys $\dot x=J(q)\dot q$. A common whole-body controller solves for joint accelerations, torques, or velocities that reduce task error while satisfying contact, torque, and joint constraints. Lower-priority objectives are projected into the null space of higher-priority tasks so posture improvement does not break balance or contact.

Controller evaluation loop
  1. Define the reference, measured state, error signal, actuator command, update rate, and saturation policy.
  2. Run a step or disturbance response before adding learning.
  3. Log overshoot, settling time, steady-state error, latency, saturation, and recovery behavior.
  4. Compare PID, LQR, or MPC only under the same plant, sensors, limits, disturbance panel, and metric code.
Technical Contract For Operational-space and whole-body control (preview for humanoids)
Contract FieldWhat To SpecifyWhy It Matters
State and observationVariables, units, timestamps, frames, and uncertainty.Prevents a model score from being mistaken for robot capability.
Action interfaceCommand type, limits, update rate, and safety fallback.Makes the learned or planned output executable.
Evidence artifactTrace, metric, configuration, seed, and failure label.Allows baseline and library path to be compared in one pass.
Tool pathpython-control, CasADi, do-mpc, Drake, ROS 2 control, MuJoCoShows the practical library route after the mechanism is understood.

For Operational-space and whole-body control (preview for humanoids), expected output is a trace where the relevant error decreases, overshoot stays within the design bound, and actuator commands remain within limits under the stated timing budget.

Failure Mode To Test

Operational-space and whole-body control (preview for humanoids) should be stress-tested under delay, integral windup, actuator saturation, unmodeled friction, and reference-frame mismatch before the nominal trace is trusted.

Section References

Core references for Operational-space and whole-body control (preview for humanoids): Modern Robotics; Murray, Li, and Sastry; Siciliano et al.; LaValle; and official documentation for Drake, MuJoCo, Pinocchio, CasADi, python-control, GTSAM, ROS 2, and OpenCV as applicable.

Use these references to check notation, frame conventions, units, solver assumptions, and maintained-library behavior.

Key Takeaway

Operational-space and whole-body control (preview for humanoids) is useful when it makes the perception-action loop more reliable, not when it merely adds a more impressive model name.

Exercise 7.6.1

Design a method-matched experiment for Operational-space and whole-body control (preview for humanoids). Specify the environment, observations, actions, metric, one perturbation, and the library output you would compare against the hand-built baseline.