Function OpenSoT::operator+(const OpenSoT::tasks::Aggregated::Ptr, const OpenSoT::tasks::Aggregated::TaskPtr)

Function Documentation

OpenSoT::tasks::Aggregated::Ptr OpenSoT::operator+(const OpenSoT::tasks::Aggregated::Ptr aggregated, const OpenSoT::tasks::Aggregated::TaskPtr task)

operator + takes an aggregated and a task, generates a new Aggregated task containing the new task and all the tasks from the old aggregated.

It also copies the lambda, the weight matrix and the constraints of the old aggregated. In fact, the new aggregated is a copy of the old aggregated, with a new task, and an adapted weight matrix (its size is increased to take into account the new task)

Parameters
  • aggregated – a pointer to an Aggregated task

  • task – a task pointer pointer

Returns

a pointer to a new Aggregated task