DirectTrajectoryOptimization
v0.3
|
Base Class to define vector of constraints and its derivatives. More...
#include <GenericConstraintsBase.hpp>
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | GenericConstraintsBase (int num_eq, int num_var) |
Generic Constraint Constructor. More... | |
virtual Eigen::VectorXd | Evalfx (const Eigen::VectorXd &input)=0 |
To be overloaded by the derived class. More... | |
virtual void | fx (const Eigen::VectorXd &in, Eigen::VectorXd &out) override |
Overload this method in the derived class to obtain numerical approximation of the gradient. | |
virtual Eigen::MatrixXd | EvalFxJacobian (const Eigen::VectorXd &input) |
To be overloaded by the derived class in case NumDiff is not required. More... | |
Eigen::VectorXd | GetConstraintsLowerBound () |
Method to get the lower bound of the constraint. More... | |
Eigen::VectorXd | GetConstraintsUpperBound () |
Method to get the upper bound of the constraint. More... | |
void | SetConstraintsLowerBound (const Eigen::VectorXd &g_lb_candidate) |
Method to set the lower bound of the constraint. More... | |
void | setConstraintsUpperBound (const Eigen::VectorXd &g_ub_candidate) |
Method to set the upper bound of the constraint. More... | |
void | initialize_num_diff () |
Overload this method to define the local pointers. More... | |
Additional Inherited Members | |
Public Attributes inherited from DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase | |
std::shared_ptr< FunctionOperator > | numdifoperator |
std::shared_ptr < Eigen::NumericalDiff < FunctionOperator > > | numDiff |
Base Class to define vector of constraints and its derivatives.
|
inline |
Generic Constraint Constructor.
[in] | num_eq | The size of the vector of constraints |
[in] | num_var | The number of variables |
|
pure virtual |
To be overloaded by the derived class.
Constraint function to be evaluated
Implemented in DirectTrajectoryOptimization::ShootingConstraint< DIMENSIONS >.
Referenced by fx().
|
virtual |
To be overloaded by the derived class in case NumDiff is not required.
References DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase::numDiff.
|
inline |
Method to get the lower bound of the constraint.
|
inline |
Method to get the upper bound of the constraint.
|
virtual |
Overload this method to define the local pointers.
numdifoperator and numDiff need to be defined in this method
Implements DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase.
References DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase::numDiff, and DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase::numdifoperator.
void DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::SetConstraintsLowerBound | ( | const Eigen::VectorXd & | g_lb_candidate | ) |
Method to set the lower bound of the constraint.
[in] | g_lb_candidate | Eigen vector of dynamic size |
void DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::setConstraintsUpperBound | ( | const Eigen::VectorXd & | g_ub_candidate | ) |
Method to set the upper bound of the constraint.
[in] | g_ub_candidate | Eigen vector of dynamic size |