  Stack-of-Tasks (SoT) control allows a robot to simultaneously fulfill a
number of prioritized goals formulated in terms of (in)equality constraints in
error space. Since this approach solves a sequence of Quadratic Programs (QP)
at each time-step, without taking into account any temporal state evolution, it
is suitable for dealing with local disturbances. However, its limitation lies
in the handling of situations that require non-quadratic objectives to achieve
a specific goal, as well as situations where countering the control disturbance
would require a locally suboptimal action. Recent works address this
shortcoming by exploiting Finite State Machines (FSMs) to compose the tasks in
such a way that the robot does not get stuck in local minima. Nevertheless, the
intrinsic trade-off between reactivity and modularity that characterizes FSMs
makes them impractical for defining reactive behaviors in dynamic environments.
In this letter, we combine the SoT control strategy with Behavior Trees (BTs),
a task switching structure that addresses some of the limitations of the FSMs
in terms of reactivity, modularity and re-usability. Experimental results on a
Franka Emika Panda 7-DOF manipulator show the robustness of our framework, that
allows the robot to benefit from the reactivity of both SoT and BTs.
