aligator
0.15.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
|
Struct describing a stage of a constrained LQ problem. More...
#include <aligator/gar/lqr-problem.hpp>
Public Types | |
using | allocator_type = polymorphic_allocator |
Public Member Functions | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
LqrKnotTpl ()=default | |
LqrKnotTpl (const allocator_type &alloc) | |
LqrKnotTpl (uint nx, uint nu, uint nc, uint nx2, uint nth, allocator_type alloc={}) | |
LqrKnotTpl (uint nx, uint nu, uint nc, uint nx2, allocator_type alloc={}) | |
Delegating constructor, assumes nth = 0. | |
LqrKnotTpl (uint nx, uint nu, uint nc, allocator_type alloc={}) | |
Delegating constructor, assumes nx2 = nx, and nth = 0. | |
LqrKnotTpl (const LqrKnotTpl &other, allocator_type alloc={}) | |
Copy constructor. Allocator must be given. | |
LqrKnotTpl (LqrKnotTpl &&other) noexcept | |
Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true. | |
LqrKnotTpl (LqrKnotTpl &&other, const allocator_type &alloc) | |
Extended move constructor. | |
LqrKnotTpl & | operator= (const LqrKnotTpl &other) |
Copy assignment. Current allocator will be reused if required. | |
LqrKnotTpl & | operator= (LqrKnotTpl &&) |
Move assignment. Other allocator will be stolen. | |
~LqrKnotTpl ()=default | |
void | assign (const LqrKnotTpl< Scalar > &other) |
Assign matrices (and dimensions) from another LqrKnotTpl. | |
LqrKnotTpl & | addParameterization (uint nth) |
bool | isApprox (const LqrKnotTpl &other, Scalar prec=std::numeric_limits< Scalar >::epsilon()) const |
allocator_type | get_allocator () const |
Public Attributes | |
uint | nx |
uint | nu |
uint | nc |
uint | nx2 |
uint | nth |
ArenaMatrix< MatrixXs > | Q |
ArenaMatrix< MatrixXs > | S |
ArenaMatrix< MatrixXs > | R |
ArenaMatrix< VectorXs > | q |
ArenaMatrix< VectorXs > | r |
ArenaMatrix< MatrixXs > | A |
ArenaMatrix< MatrixXs > | B |
ArenaMatrix< VectorXs > | f |
ArenaMatrix< MatrixXs > | C |
ArenaMatrix< MatrixXs > | D |
ArenaMatrix< VectorXs > | d |
ArenaMatrix< MatrixXs > | Gth |
ArenaMatrix< MatrixXs > | Gx |
ArenaMatrix< MatrixXs > | Gu |
ArenaMatrix< MatrixXs > | Gv |
ArenaMatrix< VectorXs > | gamma |
Static Public Attributes | |
static constexpr int | Alignment = Eigen::AlignedMax |
Friends | |
bool | operator== (const LqrKnotTpl &lhs, const LqrKnotTpl &rhs) |
Struct describing a stage of a constrained LQ problem.
A LQ knot corresponding to cost
\[ \frac{1}{2} \begin{bmatrix}x \\ u\end{bmatrix}^\top \begin{bmatrix}Q & S \\ S^\top & R\end{bmatrix} \begin{bmatrix}x \\ u\end{bmatrix} + q^\top x + r^\top u \]
and constraints
\[ \begin{aligned} x' &= Ax + Bu + f, \\ 0 &= Cx + Du + d. \end{aligned} \]
When the parameter dimension nth is nonzero, this object also contains a parameterisation of the Lagrangian of a knot in the problem. This can be a linear term in the stage constraint, extra terms affine in \(\theta\), and so on.
Definition at line 35 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::allocator_type = polymorphic_allocator |
Definition at line 38 of file lqr-problem.hpp.
|
default |
|
explicit |
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl | ( | uint | nx, |
uint | nu, | ||
uint | nc, | ||
uint | nx2, | ||
uint | nth, | ||
allocator_type | alloc = {} ) |
|
inline |
Delegating constructor, assumes nth = 0.
Definition at line 66 of file lqr-problem.hpp.
|
inline |
Delegating constructor, assumes nx2 = nx, and nth = 0.
Definition at line 70 of file lqr-problem.hpp.
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl | ( | const LqrKnotTpl< Scalar > & | other, |
allocator_type | alloc = {} ) |
Copy constructor. Allocator must be given.
|
noexcept |
Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true.
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl | ( | LqrKnotTpl< Scalar > && | other, |
const allocator_type & | alloc ) |
Extended move constructor.
|
default |
aligator::gar::LqrKnotTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= | ( | const LqrKnotTpl< Scalar > & | other | ) |
Copy assignment. Current allocator will be reused if required.
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= | ( | LqrKnotTpl< Scalar > && | ) |
Move assignment. Other allocator will be stolen.
void aligator::gar::LqrKnotTpl< Scalar >::assign | ( | const LqrKnotTpl< Scalar > & | other | ) |
Assign matrices (and dimensions) from another LqrKnotTpl.
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::addParameterization | ( | uint | nth | ) |
bool aligator::gar::LqrKnotTpl< Scalar >::isApprox | ( | const LqrKnotTpl< Scalar > & | other, |
Scalar | prec = std::numeric_limits< Scalar >::epsilon() ) const |
|
inline |
Definition at line 100 of file lqr-problem.hpp.
|
friend |
Definition at line 96 of file lqr-problem.hpp.
|
staticconstexpr |
Definition at line 37 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nx |
Definition at line 40 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nu |
Definition at line 41 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nc |
Definition at line 42 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nx2 |
Definition at line 43 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nth |
Definition at line 44 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Q |
Definition at line 46 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::S |
Definition at line 46 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::R |
Definition at line 46 of file lqr-problem.hpp.
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::q |
Definition at line 47 of file lqr-problem.hpp.
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::r |
Definition at line 47 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::A |
Definition at line 48 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::B |
Definition at line 48 of file lqr-problem.hpp.
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::f |
Definition at line 49 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::C |
Definition at line 50 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::D |
Definition at line 50 of file lqr-problem.hpp.
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::d |
Definition at line 51 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gth |
Definition at line 53 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gx |
Definition at line 54 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gu |
Definition at line 55 of file lqr-problem.hpp.
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gv |
Definition at line 56 of file lqr-problem.hpp.
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::gamma |
Definition at line 57 of file lqr-problem.hpp.