|
aligator 0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
|
A stage in the control problem. More...
#include <aligator/core/stage-model.hpp>
Public Types | |
| using | Scalar = _Scalar |
| using | Manifold = ManifoldAbstractTpl<Scalar> |
| using | PolyManifold = polymorphic<Manifold> |
| using | Dynamics = ExplicitDynamicsModelTpl<Scalar> |
| using | PolyDynamics = polymorphic<Dynamics> |
| using | PolyFunction = polymorphic<StageFunctionTpl<Scalar>> |
| using | PolyConstraintSet = polymorphic<ConstraintSetTpl<Scalar>> |
| using | Cost = CostAbstractTpl<Scalar> |
| using | PolyCost = polymorphic<Cost> |
| using | Data = StageDataTpl<Scalar> |
Public Member Functions | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| template<typename U> | |
| U * | getCost () |
| Get a pointer to an expected concrete type for the cost function. | |
| template<typename U> | |
| const U * | getCost () const |
| template<typename U> | |
| U * | getDynamics () |
| Get a pointer to an expected concrete type for the dynamics class. | |
| template<typename U> | |
| const U * | getDynamics () const |
| StageModelTpl (const PolyCost &cost, const PolyDynamics &dynamics) | |
| virtual | ~StageModelTpl ()=default |
| const Manifold & | xspace () const |
| const Manifold & | uspace () const |
| const Manifold & | xspace_next () const |
| const Cost & | cost () const |
| virtual bool | hasDynModel () const |
| int | nx1 () const |
| int | ndx1 () const |
| int | nu () const |
| int | nx2 () const |
| int | ndx2 () const |
| int | nc () const |
| Total number of constraints. | |
| std::size_t | numConstraints () const |
| Number of constraint objects. | |
| int | numDual () const |
| Number of dual variables, i.e. Lagrange multipliers. | |
| void | addConstraint (const PolyFunction &func, const PolyConstraintSet &cstr_set) |
| Add a constraint to the stage. | |
| virtual void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const |
| Evaluate all the functions (cost, dynamics, constraints) at this node. | |
| virtual void | computeFirstOrderDerivatives (const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const |
| Compute the first-order derivatives of the StageModelTpl. | |
| virtual void | computeSecondOrderDerivatives (const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const |
| Compute the second-order derivatives of the StageModelTpl. | |
| virtual shared_ptr< Data > | createData () const |
| Create a StageData object. | |
Public Attributes | |
| PolyManifold | xspace_ |
| State space for the current state \(x_k\). | |
| PolyManifold | xspace_next_ |
| State space for the next state \(x_{k+1}\). | |
| PolyManifold | uspace_ |
| Control vector space – by default, a simple Euclidean space. | |
| ConstraintStackTpl< Scalar > | constraints_ |
| Constraint manager. | |
| PolyCost | cost_ |
| Stage cost function. | |
| PolyDynamics | dynamics_ |
| Dynamics model. | |
A stage in the control problem.
Each stage containts cost functions, dynamical and constraint models. These objects are hold through smart pointers to leverage dynamic polymorphism.
Definition at line 23 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::Scalar = _Scalar |
Definition at line 25 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar> |
Definition at line 28 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::PolyManifold = polymorphic<Manifold> |
Definition at line 29 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::Dynamics = ExplicitDynamicsModelTpl<Scalar> |
Definition at line 30 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::PolyDynamics = polymorphic<Dynamics> |
Definition at line 31 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::PolyFunction = polymorphic<StageFunctionTpl<Scalar>> |
Definition at line 32 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::PolyConstraintSet = polymorphic<ConstraintSetTpl<Scalar>> |
Definition at line 33 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::Cost = CostAbstractTpl<Scalar> |
Definition at line 34 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::PolyCost = polymorphic<Cost> |
Definition at line 35 of file stage-model.hpp.
| using aligator::StageModelTpl< _Scalar >::Data = StageDataTpl<Scalar> |
Definition at line 36 of file stage-model.hpp.
| aligator::StageModelTpl< _Scalar >::StageModelTpl | ( | const PolyCost & | cost, |
| const PolyDynamics & | dynamics ) |
Constructor assumes the control space is a Euclidean space of dimension nu.
|
virtualdefault |
| aligator::StageModelTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
inline |
Get a pointer to an expected concrete type for the cost function.
Definition at line 52 of file stage-model.hpp.
|
inline |
Definition at line 58 of file stage-model.hpp.
|
inline |
Get a pointer to an expected concrete type for the dynamics class.
Definition at line 64 of file stage-model.hpp.
|
inline |
Definition at line 70 of file stage-model.hpp.
|
inline |
Definition at line 80 of file stage-model.hpp.
|
inline |
Definition at line 81 of file stage-model.hpp.
|
inline |
Definition at line 82 of file stage-model.hpp.
|
inline |
Definition at line 84 of file stage-model.hpp.
|
inlinevirtual |
Whether the stage's dynamics model can be accessed. This boolean allows flexibility in solvers when dealing with different frontends e.g. Crocoddyl's API.
Reimplemented in aligator::compat::croc::ActionModelWrapperTpl< Scalar >.
Definition at line 88 of file stage-model.hpp.
|
inline |
Definition at line 90 of file stage-model.hpp.
|
inline |
Definition at line 91 of file stage-model.hpp.
|
inline |
Definition at line 92 of file stage-model.hpp.
|
inline |
Definition at line 93 of file stage-model.hpp.
|
inline |
Definition at line 94 of file stage-model.hpp.
|
inline |
Total number of constraints.
Definition at line 96 of file stage-model.hpp.
|
inline |
Number of constraint objects.
Definition at line 99 of file stage-model.hpp.
|
inline |
Number of dual variables, i.e. Lagrange multipliers.
Definition at line 102 of file stage-model.hpp.
| void aligator::StageModelTpl< _Scalar >::addConstraint | ( | const PolyFunction & | func, |
| const PolyConstraintSet & | cstr_set ) |
Add a constraint to the stage.
|
virtual |
Evaluate all the functions (cost, dynamics, constraints) at this node.
Reimplemented in aligator::compat::croc::ActionModelWrapperTpl< Scalar >.
|
virtual |
Compute the first-order derivatives of the StageModelTpl.
Reimplemented in aligator::compat::croc::ActionModelWrapperTpl< Scalar >.
|
virtual |
Compute the second-order derivatives of the StageModelTpl.
Reimplemented in aligator::compat::croc::ActionModelWrapperTpl< Scalar >.
|
virtual |
Create a StageData object.
Reimplemented in aligator::compat::croc::ActionModelWrapperTpl< Scalar >.
| PolyManifold aligator::StageModelTpl< _Scalar >::xspace_ |
State space for the current state \(x_k\).
Definition at line 39 of file stage-model.hpp.
| PolyManifold aligator::StageModelTpl< _Scalar >::xspace_next_ |
State space for the next state \(x_{k+1}\).
Definition at line 41 of file stage-model.hpp.
| PolyManifold aligator::StageModelTpl< _Scalar >::uspace_ |
Control vector space – by default, a simple Euclidean space.
Definition at line 43 of file stage-model.hpp.
| ConstraintStackTpl<Scalar> aligator::StageModelTpl< _Scalar >::constraints_ |
Constraint manager.
Definition at line 45 of file stage-model.hpp.
| PolyCost aligator::StageModelTpl< _Scalar >::cost_ |
Stage cost function.
Definition at line 47 of file stage-model.hpp.
| PolyDynamics aligator::StageModelTpl< _Scalar >::dynamics_ |
Dynamics model.
Definition at line 49 of file stage-model.hpp.