Function OpenSoT::operator+(const OpenSoT::tasks::Aggregated::Ptr, const OpenSoT::tasks::Aggregated::Ptr)
Defined in File AutoStack.h
Function Documentation
-
OpenSoT::tasks::Aggregated::Ptr OpenSoT::operator+(const OpenSoT::tasks::Aggregated::Ptr aggregated1, const OpenSoT::tasks::Aggregated::Ptr aggregated2)
operator + takes two Aggregated tasks, and creates a new Aggregated task.
The way the new Aggregated is created, depends on the two Aggregated tasks that we want to merge. If aggregated1 and aggregated2 hav different lambdas, the new Aggregated will have aggregated1 and aggregated2 as tasks. If, on the other side, the two Aggregateds have different Lambdas, a new Aggregated will be created containing ALL the tasks in aggregated1 plus ALL the tasks in aggregated2. In any case, the weight matrix of the new Aggregated will be a block-diagonal matrix where the diagonal blocks are the weight matrices of aggregated1 and aggregated2. The constraints of the Aggregated are the union of the constraints of aggregated1 and aggregated2. (NOTICE that the equality test for the constraints is on pointers, so you can have duplicated constraints if you made multiple instances of the same constraints)
- Parameters
aggregated1 – the first Aggregated task
aggregated2 – the second Aggregated task
- Returns
a new Aggregated task containing the tasks in aggregated1 and aggregated2, or containing aggregated1 and aggregated2 as tasks if they have different lambdas in the moment when the + operator is called.