A robot can have more degrees-of-freedom (DOF) than the DOF needed to accomplish a certain task. In that case, one may want a controller that (1) guarantees that robot utilizes its DOF to achieve the primary task, (2) without conflicting the primary task, employs the remaining DOF to perform some other tasks as much as possible.
Take a humanoid robot for example, which may have more than 20 DOF. It could have one of its hands holding an object. Without changing the object's position and orientation in space, the robot could use its remaining DOF to change its body posture, or avoid collision with another coming object. The so-called Whole Body Controller was proposed specifically to accomplish such goals.
This post summarizes and physically interprets some results presented in 2005@Sentis and 2007@Sentis , which laid the very foundation of the analytical Whole Body Control.
In addition to nomenclature used in Fundamentals of Dynamics and Control of Flexible Joint Robots and Operational Space Framework, Hybrid Motion-Force Control:
Note that $\mathcal{X}$ is a wildcard symbol. It could represent $J$, $F$, $\Gamma$, $\Lambda$, $\mu$, $\rho$, etc.
As discussed in Operational Space Framework, Hybrid Motion-Force Control, the dynamics of a fixed-base robot is given by $$ M\ddot{q} + c + g = \Gamma $$ To achieve a single task, such as an operational space Cartesian motion control task, a controller in the form of $$ \Gamma = J^T F $$ would do. With redundant DOF, in additional to achieving a Cartesian control task, one typically want the robot to maintain a certain posture as much as possible, without affecting the primary Cartesian control task. In this case, a controller can be designed to have the form of $$ \Gamma = \Gamma_{1} + N^T_{1} \Gamma_{2} $$ where
As for the nullspace projector $N_1$, if one employs $$ N_1 = I - \bar{J}_{1} J_{1} $$ by selecting $\bar{J}_{1}$ to be the dynamically consistent generalized inverse of the Jacobian of the Cartesian task, it is guaranteed that the posture task torque/acceleration will not affect the Cartesian task, as shown in the reference. And such a nullspace project is said to be dynamically consistent with the primary task.
Physically, it is analogous to solving a system with less equations than unknowns. There are infinitely many solutions to choose from. Among them, one can choose the ones that meet certain criteria.
The key insight from the previous section is that, if the nullspace projector is dynamically consistent with higher priority tasks, the task torque will try to achieve its goal (as long as there are still enough DOF to do so) without affecting those higher priority tasks.
A natural way to generalize such an idea is to project a lower priority task torque by the nullspace projector that is dynamically consistent with its immediately higher priority tasks, recursively. Such a controller can be written as $$ \Gamma_{wbc} = \Gamma_1 + N^T_1 \Bigl( \Gamma_2 + N_2^T \Bigl( \Gamma_3 + \cdots \Bigl) \Bigl) \label{eq:multi-task-control} $$ One can see very clearly from \eqref{eq:multi-task-control} that
It is shown in 2007@Sentis that the recursive equation in \eqref{eq:multi-task-control} has a very elegant closed-form formula in the form of $$ \Gamma_{wbc} = \Gamma_{1|pre(1)} + \Gamma_{2|pre(2)} + \Gamma_{3|pre(3)} + \cdots + \Gamma_{N|pre(N)} = \sum_{k=1}^{N}\Gamma_{k|pre(k)} \label{eq:total-torque} $$ where $$ \Gamma_{k|pre(k)} \triangleq J^T_{k|pre(k)} F_{k|pre(k)} $$ and $$ F_{k|pre(k)} = \Lambda_{k|pre(k)}F_k + \mu_{k|pre(k)} + p_{k|pre(k)} $$ and \begin{align} \Lambda_{k|pre(k)} &= (J_{k|pre(k)} M^{-1} J^T_{k|pre(k)})^{-1} \label{eq:task-inertia} \\ u_{k|pre(k)} &= \bar{J}_{k|pre(k)} c - \Lambda_{k|pre(k)} \dot{J}_{k|pre(k)} \dot{q} \\ p_{k|pre(k)} &= \bar{J}_{k|pre(k)} g \end{align} where $$ \begin{align} J^T_{k|pre(k)} &\triangleq J_k N_{pre(k)} \\ \bar{J}_{k|pre(k)} &= M^{-1} J_{k|pre(k)}\Lambda_{k|pre(k)} \end{align} $$ and $$ N_{pre(1)} \triangleq I \label{eq:initial-nullspace} $$ $$ N_{pre(k)} = I - \sum_{i=1}^{k-1} \bar{J}_{i|pre(i)} J_{i|pre(i)} $$ which can also be written as $$ N_{pre(k)} = N_{pre(k-1)} - \bar{J}_{k-1|pre(k-1)} J_{k-1|pre(k-1)} \label{eq:recursive-nullspace} $$ with detailed derivation given in Sec. 3 in 2007@Sentis .
Physically, equations \eqref{eq:total-torque} to \eqref{eq:recursive-nullspace} can be interpreted as:
In practice, the analytical whole body control law can be simplified by subtracting the Coriolis and gravity forces from the joint space first, that is $$ M\ddot{q} + c + g = \Gamma_{wbc} + c + g $$ With the Coriolis and gravity force already compensated for in the joint space, the whole body control law $$ \Gamma_{wbc} = \sum_{k=1}^{N}\Gamma_{k|pre(k)} $$ simplifies to $$ \Gamma_{k|pre(k)} = J^T_{k|pre(k)} \Lambda_{k|pre(k)} F_k - \Lambda_{k|pre(k)} \dot{J}_{k|pre(k)} \dot{q} $$ and because the recursive computation of dynamically consistent task Jacobian derivative is computationally much heavier than other terms, people often replace it with the task Jacobian derivative $\dot{J}_k$ in $\Lambda_{k|pre(k)} \dot{J}_{k|pre(k)} \dot{q}$, or completely ignore that term all together. Whereas the rest of the terms remain the same, that is \begin{align} J^T_{k|pre(k)} &\triangleq J_k N_{pre(k)} \\ \bar{J}_{k|pre(k)} &= M^{-1} J_{k|pre(k)}\Lambda_{k|pre(k)} \end{align} and $$ N_{pre(1)} \triangleq I $$ $$ N_{pre(k)} = N_{pre(k-1)} - \bar{J}_{k-1|pre(k-1)} J_{k-1|pre(k-1)} $$
Through the analytical whole body control is elegant and computationally efficient, there are limitations to this approach, such as:
For simplicity, this post only presents the analytical whole body control with the fixed-base robot model as an example. The method also can be generalized to the floating-base case, which was how this method was originally proposed for, such as shown in 2006@Park .
Furthermore, they are other methods that solves the whole body control problem that can be more general than the analytical whole body control approach. Such as the hierarchical optimization based whole body control method proposed in 2017@EthRsl and 2016@Bellicoso .
These will be discussed in separate posts.