Class Aggregated
Defined in File Aggregated.h
Inheritance Relationships
Base Type
public OpenSoT::Constraint< Eigen::MatrixXd, Eigen::VectorXd >
(Template Class Constraint)
Class Documentation
-
class Aggregated : public OpenSoT::Constraint<Eigen::MatrixXd, Eigen::VectorXd>
The Aggregated class builds a new Constraing by piling up simpler constraints so that:
For equality constraints: Aeq = [Aeq1; Aeq2], beq=[beq1;beq2]
For inequality constraints: Aineq = [Aineq1; Aeq2], bLowerBound=[bLowerBound1;bLowerBound2] bUpperBound=[bUpperBound1;bUpperBound2]
For bounds: lowerBound = max(bLowerBound1, bLowerBound2), upperBound = min(bUpperBound1,bUpperBound2)
Public Types
-
enum AggregationPolicy
Values:
-
enumerator EQUALITIES_TO_INEQUALITIES
transform equalities Ax = b to inequalities b <= Ax <= b
-
enumerator UNILATERAL_TO_BILATERAL
if enabled, unilateral bounds will be converted to unilateral: x <= u becomes -inf <= x <= u, l <= x becomes l <= x <= inf if not enabled, bilateral bounds will be converted to unilateral: l <= x <= u becomes x <= u && -x <= -l
-
enumerator EQUALITIES_TO_INEQUALITIES
-
typedef std::shared_ptr<Aggregated> Ptr
-
typedef MatrixPiler VectorPiler
Public Functions
-
Aggregated(const std::list<ConstraintPtr> constraints, const unsigned int x_size, const unsigned int aggregationPolicy = EQUALITIES_TO_INEQUALITIES | UNILATERAL_TO_BILATERAL)
-
- Parameters
bounds – a std::list of Bounds
x_size – the size of the x vector. Notice this constructor will NOT call update() on the base tasks
-
Aggregated(ConstraintPtr bound1, ConstraintPtr bound2, const unsigned int &x_size, const unsigned int aggregationPolicy = EQUALITIES_TO_INEQUALITIES | UNILATERAL_TO_BILATERAL)
-
- Parameters
bound1 – pointer to the first bound
bound2 – pointer to the second bound
x_size – the size of the x vector. Notice this constructor will NOT call update() on the base tasks
-
virtual void update()
Updates the A, b, Aeq, beq, Aineq, b*Bound matrices.
-
virtual void log(XBot::MatLogger2::Ptr logger) override
log logs common Constraint internal variables
- Parameters
logger – a shared pointer to a MathLogger
-
inline std::list<ConstraintPtr> &getConstraintsList()
-
void generateAll()
Protected Functions
-
inline void initSupportVectorsAndMatrices(const int bound_size)
-
void checkSizes()
-
inline void pile(Eigen::MatrixXd &A, const Eigen::MatrixXd &B)
-
inline void pile(Eigen::VectorXd &a, const Eigen::VectorXd &b)
-
virtual void _log(XBot::MatLogger2::Ptr logger)
_log can be used to log internal Constraint variables
- Parameters
logger – a shared pointer to a MatLogger
Protected Attributes
-
std::vector<Eigen::VectorXd> _boundUpperBounds
-
std::vector<Eigen::VectorXd> _boundLowerBounds
-
std::vector<Eigen::VectorXd> _boundbeqs
-
std::vector<Eigen::VectorXd> _boundbUpperBounds
-
std::vector<Eigen::VectorXd> _boundbLowerBounds
-
std::vector<Eigen::MatrixXd> _boundAeqs
-
std::vector<Eigen::MatrixXd> _boundAineqs
-
VectorPiler _tmpupperBound
-
VectorPiler _tmplowerBound
-
MatrixPiler _tmpAeq
-
VectorPiler _tmpbeq
-
MatrixPiler _tmpAineq
-
VectorPiler _tmpbUpperBound
-
VectorPiler _tmpbLowerBound
-
std::list<ConstraintPtr> _bounds
-
unsigned int _number_of_bounds
-
unsigned int _aggregationPolicy
Protected Static Functions
-
static const std::string concatenateConstraintsIds(const std::list<ConstraintPtr> constraints)