Class AutoStack

Class Documentation

class AutoStack

The AutoStack class eases the managing of a stack of task, by automatically calling the update() function on all tasks of the stack.

Many operators are defined for the AutoStack, so that it’s possible to concisely write stacks. It allows to use the MOT (Math of Tasks) to define stacks, e.g.: AutoStack = (T1 + T2) / (T3 << ConstraintT3 + T4) << Bounds

Public Types

typedef std::shared_ptr<OpenSoT::AutoStack> Ptr

Public Functions

AutoStack(const int x_size)
AutoStack(OpenSoT::tasks::Aggregated::TaskPtr task)
AutoStack(OpenSoT::tasks::Aggregated::TaskPtr task, std::list<OpenSoT::constraints::Aggregated::ConstraintPtr> bounds)
AutoStack(OpenSoT::solvers::iHQP::Stack stack)
AutoStack(OpenSoT::solvers::iHQP::Stack stack, std::list<OpenSoT::constraints::Aggregated::ConstraintPtr> bounds)
void update()
void log(XBot::MatLogger2::Ptr logger)
bool checkConsistency()
OpenSoT::solvers::iHQP::Stack &getStack()
std::list<OpenSoT::constraints::Aggregated::ConstraintPtr> &getBoundsList()
inline void setRegularisationTask(OpenSoT::tasks::Aggregated::TaskPtr regularisation_task)

setRegularisationTask permits to add a task which is considered as a regularisation into all the priority levels and will NOT be considered in the priority optimality constraints

Parameters

regularisation_task

inline OpenSoT::tasks::Aggregated::TaskPtr getRegularisationTask()
void setBoundsAggregationPolicy(const unsigned int aggregationPolicy = OpenSoT::constraints::Aggregated::EQUALITIES_TO_INEQUALITIES | OpenSoT::constraints::Aggregated::UNILATERAL_TO_BILATERAL)

setBoundsAggregationPolicy changes the aggregation policy of the bounds as returned by the getBounds() function.

Notice calling this will create a new bounds object (an instance of OpenSoT::constraints::Aggregated), so that the update() function of this AutoStack will then update only the new instance. If you have another instance of those Bounds lying around, you should then manually update that before using it.

Parameters

aggregationPolicy – the new aggregation policy for this AutoStack’s bounds

OpenSoT::constraints::Aggregated::ConstraintPtr getBounds()
OpenSoT::solvers::iHQP::TaskPtr getTask(const std::string &task_id)