|
aligator
0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
|
Euclidean quadratic cost. More...
#include <aligator/modelling/costs/quad-costs.hpp>
Public Types | |
| using | Scalar = _Scalar |
| using | Base = CostAbstractTpl<Scalar> |
| using | CostData = CostDataAbstractTpl<Scalar> |
| using | Data = QuadraticCostDataTpl<Scalar> |
| using | VectorSpace = ::aligator::VectorSpaceTpl<Scalar, Eigen::Dynamic> |
| using | Manifold = ManifoldAbstractTpl<Scalar> |
Public Types inherited from aligator::CostAbstractTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | CostData = CostDataAbstractTpl<Scalar> |
| using | Manifold = ManifoldAbstractTpl<Scalar> |
Public Member Functions | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u, const ConstVectorRef &interp_x, const ConstVectorRef &interp_u) | |
| QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u, const ConstMatrixRef &w_cross, const ConstVectorRef &interp_x, const ConstVectorRef &interp_u) | |
| QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u) | |
| QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u, const ConstMatrixRef &w_cross) | |
| void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const |
| Evaluate the cost function. | |
| void | computeGradients (const ConstVectorRef &, const ConstVectorRef &, CostData &data) const |
| Compute the cost gradients \((\ell_x, \ell_u)\). | |
| void | computeHessians (const ConstVectorRef &, const ConstVectorRef &, CostData &) const |
| Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\). | |
| shared_ptr< CostData > | createData () const |
| ConstMatrixRef | getCrossWeights () const |
| void | setCrossWeight (const ConstMatrixRef &w) |
| bool | hasCrossTerm () const |
| Whether a cross term exists. | |
Public Member Functions inherited from aligator::CostAbstractTpl< _Scalar > | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| int | nx () const |
| int | ndx () const |
| template<class U> | |
| CostAbstractTpl (U &&space, const int nu) | |
| virtual | ~CostAbstractTpl ()=default |
Static Public Member Functions | |
| static auto | get_vector_space (Eigen::Index nx) |
Public Attributes | |
| MatrixXs | Wxx_ |
| Weight \( Q \). | |
| MatrixXs | Wuu_ |
| Weight \( R \). | |
| VectorXs | interp_x |
| Affine term in \( x\). | |
| VectorXs | interp_u |
| Affine term in \( u\). | |
Public Attributes inherited from aligator::CostAbstractTpl< _Scalar > | |
| xyz::polymorphic< Manifold > | space |
| State dimension. | |
| int | nu |
| Control dimension. | |
Protected Attributes | |
| MatrixXs | Wxu_ |
| Weight N for term \( x^\top N u \). | |
| bool | has_cross_term_ |
| Whether a cross term exists. | |
Euclidean quadratic cost.
Definition at line 13 of file quad-costs.hpp.
| using aligator::QuadraticCostTpl< _Scalar >::Scalar = _Scalar |
Definition at line 15 of file quad-costs.hpp.
| using aligator::QuadraticCostTpl< _Scalar >::Base = CostAbstractTpl<Scalar> |
Definition at line 17 of file quad-costs.hpp.
| using aligator::QuadraticCostTpl< _Scalar >::CostData = CostDataAbstractTpl<Scalar> |
Definition at line 18 of file quad-costs.hpp.
| using aligator::QuadraticCostTpl< _Scalar >::Data = QuadraticCostDataTpl<Scalar> |
Definition at line 20 of file quad-costs.hpp.
| using aligator::QuadraticCostTpl< _Scalar >::VectorSpace = ::aligator::VectorSpaceTpl<Scalar, Eigen::Dynamic> |
Definition at line 21 of file quad-costs.hpp.
| using aligator::QuadraticCostTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar> |
Definition at line 22 of file quad-costs.hpp.
|
inline |
Definition at line 43 of file quad-costs.hpp.
|
inline |
Definition at line 57 of file quad-costs.hpp.
|
inline |
Definition at line 71 of file quad-costs.hpp.
|
inline |
Definition at line 75 of file quad-costs.hpp.
| aligator::QuadraticCostTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
inlinestatic |
Definition at line 39 of file quad-costs.hpp.
|
inlinevirtual |
Evaluate the cost function.
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
Definition at line 80 of file quad-costs.hpp.
|
inlinevirtual |
Compute the cost gradients \((\ell_x, \ell_u)\).
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
Definition at line 96 of file quad-costs.hpp.
|
inlinevirtual |
Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
Definition at line 103 of file quad-costs.hpp.
|
inlinevirtual |
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
Definition at line 106 of file quad-costs.hpp.
|
inline |
Definition at line 115 of file quad-costs.hpp.
|
inline |
Definition at line 116 of file quad-costs.hpp.
|
inline |
Whether a cross term exists.
Definition at line 123 of file quad-costs.hpp.
| MatrixXs aligator::QuadraticCostTpl< _Scalar >::Wxx_ |
Weight \( Q \).
Definition at line 25 of file quad-costs.hpp.
| MatrixXs aligator::QuadraticCostTpl< _Scalar >::Wuu_ |
Weight \( R \).
Definition at line 27 of file quad-costs.hpp.
|
protected |
Weight N for term \( x^\top N u \).
Definition at line 31 of file quad-costs.hpp.
| VectorXs aligator::QuadraticCostTpl< _Scalar >::interp_x |
Affine term in \( x\).
Definition at line 35 of file quad-costs.hpp.
| VectorXs aligator::QuadraticCostTpl< _Scalar >::interp_u |
Affine term in \( u\).
Definition at line 37 of file quad-costs.hpp.
|
protected |
Whether a cross term exists.
Definition at line 127 of file quad-costs.hpp.