# ORCA Control¶

ORCA is a c++ whole-body reactive controller meant to compute the desired actuation torque of a robot given some tasks to perform and some constraints.

The problem is written as a quadratic problem :

\begin{align}\begin{aligned}\min_{x} \frac{1}{2}x^tHx + x^tg\\\text{subject to}\\lb \leq x \leq ub\\lb_A \leq Ax \leq ub_A\end{aligned}\end{align}
• x the optimisation vector
• H the hessian matrix ($$size(x) \times size(x)$$)
• g the gradient vector ($$size(x) \times 1$$)
• A the constraint matrix ($$size(x) \times size(x)$$)
• lb and ub the lower and upper bounds of x ($$size(x) \times 1$$)
• lbA and ubA the lower and upper bounds of A ($$size(x) \times 1$$)

Tasks are written as weighted euclidian distance function :

$w_{task} \lVert \mathbf{E}x + \mathbf{f} \rVert_{W_{norm}}^2$
• x the optimisation vector, or part of the optimisation vector
• E the linear matrix of the affine function ($$size(x) \times size(x)$$)
• f the origin vector ($$size(x) \times 1$$)
• w task the weight of the tasks in the overall quadratic cost (scalar $$[0:1]$$)
• W norm the weight of the euclidean norm ($$size(x) \times size(x)$$)

Given n_t tasks, the overall cost function is such that:

$\frac{1}{2}x^tHx + x^tg = \frac{1}{2} \sum_{i=1}^{n_t} w_{task,i} \lVert \mathbf{E}_ix + \mathbf{f}_i \rVert_{W_{norm,i}}^2$

Constraints are written as double bounded linear function :

$lb_C \leq Cx \leq ub_C$
• C the constraint matrix ($$size(x) \times size(x)$$)
• lbC and ubC the lower and upper bounds of A ($$size(x) \times 1$$)

The remainder of the documentation describes “classical” tasks and cosntraints which one may want to define

Optim

Constraints