sot-doc  0.0.1
Documentation entry point for the Stack-Of-Tasks
Controllers formulation

Necessary constraints

Dynamic modeling of a free-floating multi-body system

The dynamic model of a free-floating multi-body system can be written this way:

\[ M(q) \ddot{q} + N(q,\dot{q}) \dot{q}+G(q)=Su \]

with \(q\) the robot state variable, \( M(q) \) the inertia matrix of the multi-body system, \( N (q,\dot{q}) \) the matrix of the non-linear dynamical effect (Centrifugal and Coriolis forces) of the system motion, \( G(q) \) the gravity, \(u\) the control vector, and \( S \) the matrix mapping the control vector on the system (also called the selection matrix).

The current software library we are using to computate such quantities and theirs derivatives is Pinocchio 1. Pinocchio include dynamical quantities such as angular momentum and its derivatives.

Contact models

When considering a rigid contact model several constraints needs to be considered:

  • No penetration in the ground
  • No sliding

Both constraints generate inequalities at the contact points with respect to the state vector:

\[ \Phi_{n,c} (q) \geq 0 \]

\[ \Phi_{t,c} (q) \geq 0 \]

with \( \Phi_{n,c}(q) \) the normal force at contact point \( c \) expressed in the local reference frame of the contact point, and \( \Phi_{t,c}(q) \) the tangential force at contact point \( c\) also expressed in the local reference frame of the contact point.

To avoid penetration velocity and acceleration of the points must be constrained too. Using differentiation we obtain:

\[ C_n (q) \dot{q} = 0 \]

\[ C_n(q) \ddot{q}+s_n(q,\dot{q})=0 \]

The same derivation can be realized to avoid sliding:

\[ C_t(q)\dot{q}=0 \]

\[ C_t(q)\ddot{q}+s_n(q,\dot{q})=0 \]

Self-collisiion is usually avoiding by formulating an inequality constraint on the distance between two robot bodies. To do that the closest two points between two shapes are tracked. The distance between two bodies is obtained through a flavor of the FCL library.

Functions used to generate a robot behavior

Formulating tasks

Definition

Task \( (e) \) are using features \((s)\). Features might be end-effector posision (hands, feet), the robot center-of-mass, or the center-of-gravity of an object projected in the image. We assume that a function relates the current state of the robot typically the configuration, speed, acceleration to a feature. For instance, we may want to consider the Center-Of-Mass of a robot specified by a model \( robot\_model \) and a configuration vector \( q\)

\[ f_{CoM}:(robot\_model,q) \rightarrow c\]

We further assume that this function is at least differentiable once. A task is then defined by the regulation between the feature depending on the current state \( s(q) \) of the robot and a desired feature \(s^*\):

\[ e=s(q)−s^*\]

Imposing the task dynamic

You can impose for instance that the task dynamic is an exponential decay:

\[ \dot{e}=−λe \]

But we also have:

\[ \dot{e}=\dot{s}(q)−\dot{s}^∗\]

If the desired feature does not move we have

\[ \dot{s}^∗=0 \]

in addition we can remark that

\[\dot{s}(q)=\frac{\delta s}{\delta q}\dot{q}=J(q)\dot{q} \]

Thus

\[ \dot{e}=J(q)\dot{q}−\dot{s}^∗ \]

At a given time \( t=k \Delta T \) a measurement of the feature \( \hat{s}(t) \) can give us:

\[ \hat{e}(t)=\hat{s}(t)−s^∗(t) \]

By posing

\[ \hat{e}(t)=e(t) \]

we have:

\[ \dot{e}(t)=−\lambda e(t)=−\lambda \hat{e}(t)= −\lambda ( \hat{s}(t)−s^*(t)) \]

We will continue by dropping \( (t) \) for sake of clarity:

\[ − \lambda ( \hat{s}− s^∗) = J(q)\dot{q} \]

Therefore if \( J(q) \) is invertible we can find \( \dot{q} \) using the following relationship:

\[ \dot{q}=− \lambda J(q)^{−1}(\hat{s}−s^∗) \]

In general \( J(q) \) is not square and then we have to use the Moore-Penrose pseudo inverse:

\[ \dot{q}= −\lambda J(q)^+(\hat{s}−s^∗) \]

But it can be also understood as the solution of the following optimization problem:

\[ \begin{matrix} argmin_{ \dot{q}} || \dot{q} || & \\ s.t. & − \lambda (\hat{s} - s^∗) =J(q)\dot{q} \\ \end{matrix} \]

  • The library implementing the task formulation in velocity domain is sot-core (Hierarchy).
  • The library implementing the task formulation in acceleration is sot-dyninv (Hierarchy with inequalities).
  • The library implementing the task formulation in torque is sot-torque-control (Weighted sum).

Formulating instantaneous control as optimization problem

The task function is allowing a very versatile formulation including:

  • Hierarchy of tasks: Each task at a level \( i\) cannot interfer with the control at level \(i-1\). This concept has been introduced by Nakamura [10] extended by Siciliano in [16] .
  • Weighted problems: Each task are at the same level i.e. they are all included in the same cost function, and they are weighted against each other.