58 using Ptr = std::shared_ptr<GenericConstraint>;
74 virtual void print()
const;
127 virtual void onCompute(
double current_time,
double dt);
virtual ~GenericConstraint()
Destructor. Also removes from problem if still active/inserted.
Definition: GenericConstraint.cc:14
virtual const Eigen::MatrixXd & getConstraintMatrix() const
Returns the constraint matrix from the constraint function (alias)
Definition: GenericConstraint.cc:50
math::ConstraintFunction & constraintFunction()
Get a reference the underlying constraint function containing the 2 bound vectors and the constraint ...
Definition: GenericConstraint.cc:85
virtual void onCompute(double current_time, double dt)
Definition: GenericConstraint.cc:95
std::shared_ptr< ConfigurableOrcaObject > Ptr
Definition: ConfigurableOrcaObject.h:17
Definition: ConstraintFunction.h:48
virtual void onResize()=0
virtual const Eigen::VectorXd & getLowerBound() const
Returns the lower bound from the constraint function (alias)
Definition: GenericConstraint.cc:40
Eigen::VectorXd & lowerBound()
Definition: GenericConstraint.cc:80
GenericConstraint(const std::string &name, optim::ControlVariable control_var)
Construct the double bounded function, and set its default state : activated. The lowerBound is set t...
Definition: GenericConstraint.cc:8
void setUpperBound(const Eigen::VectorXd &up)
Replace the upper bound with a new one.
Definition: GenericConstraint.cc:65
int cols() const
Get the number of column (it should be the size of the control variable chosen) of the constraint mat...
Definition: GenericConstraint.cc:35
virtual void onUpdateConstraintFunction(double current_time, double dt)=0
const math::ConstraintFunction & getConstraintFunction() const
Get the underlying constraint function containing the 2 bound vectors and the constraint matrix...
Definition: GenericConstraint.cc:90
math::Size getSize() const
Get the size of the constraint matrix (rows,cols)
Definition: GenericConstraint.cc:25
Builds a double bounded function : l < C.x < u With x the control variable, l = lowerBound, u = upperBound, and C the constraint matrix.
Definition: GenericConstraint.h:55
Eigen::MatrixXd & constraintMatrix()
Returns a reference to the constraint matrix from the constraint function (alias) ...
Definition: GenericConstraint.cc:70
Definition: CartesianAccelerationPID.h:44
ControlVariable
Definition: ControlVariable.h:44
Eigen::VectorXd & upperBound()
Definition: GenericConstraint.cc:75
void setConstraintMatrix(const Eigen::MatrixXd &newC)
Replace the constraint matrix with a new one.
Definition: GenericConstraint.cc:55
virtual const Eigen::VectorXd & getUpperBound() const
Returns the upperbound from the constraint function (alias)
Definition: GenericConstraint.cc:45
The common base class for tasks and constraints.
Definition: TaskBase.h:59
void setLowerBound(const Eigen::VectorXd &low)
Replace the lower bound with a new one.
Definition: GenericConstraint.cc:60
virtual void print() const
Definition: GenericConstraint.cc:19
int rows() const
Get the number of rows of the constraint matrix.
Definition: GenericConstraint.cc:30