The 4-joint arm's end-effector position is a 2D task, so its 2×4 Jacobian J has a two-dimensional null space: infinitely many joint velocities move the joints without moving the hand at all. The minimum-norm solution J⁺·e reaches the target with the smallest possible joint motion but is blind to anything else — in Naive mode the elbow drifts through the obstacle zone whenever that happens to be the smallest-motion path.
Whole-body mode adds a second term projected through the null-space projector N = I − J⁺J: a push that steers the elbow away from the obstacle, but only using motion that N confirms is invisible to the hand. The two terms are simply added — Δq = J⁺·e + N·Δq₀ — and because J·(N·Δq₀) = 0 by construction, the primary reach task is mathematically guaranteed to stay exact no matter how hard the secondary task pushes.
Δq = J⁺·e_task (primary: reach target)
+ (I − J⁺J)·Δq₀ (secondary: avoid obstacle,
only in the task's null space)
- Mode — Naive uses only the first line; Whole-body adds the second, projected term.
- Secondary-task gain — how strongly the null-space term pushes the elbow away once it enters the danger radius.
- Obstacle safe radius — how far from the obstacle centre the elbow is considered "safe".
- Null-space use — the magnitude of the projected secondary correction actually being applied this frame; near zero when the reach task alone already keeps the elbow clear.
Real humanoids stack many more such tasks — balance over the support polygon, joint-limit avoidance, self-collision — each solved only within whatever freedom the higher-priority tasks leave unused.