aligator  0.15.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Loading...
Searching...
No Matches
aligator::gar::LqrKnotTpl< Scalar > Struct Template Reference

Struct describing a stage of a constrained LQ problem. More...

#include <aligator/gar/lqr-problem.hpp>

Collaboration diagram for aligator::gar::LqrKnotTpl< Scalar >:
[legend]

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.
 
LqrKnotTploperator= (const LqrKnotTpl &other)
 Copy assignment. Current allocator will be reused if required.
 
LqrKnotTploperator= (LqrKnotTpl &&)
 Move assignment. Other allocator will be stolen.
 
 ~LqrKnotTpl ()=default
 
void assign (const LqrKnotTpl< Scalar > &other)
 Assign matrices (and dimensions) from another LqrKnotTpl.
 
LqrKnotTpladdParameterization (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)
 

Detailed Description

template<typename Scalar>
struct aligator::gar::LqrKnotTpl< Scalar >

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.

Member Typedef Documentation

◆ allocator_type

template<typename Scalar>
using aligator::gar::LqrKnotTpl< Scalar >::allocator_type = polymorphic_allocator

Definition at line 38 of file lqr-problem.hpp.

Constructor & Destructor Documentation

◆ LqrKnotTpl() [1/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( )
default

◆ LqrKnotTpl() [2/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( const allocator_type & alloc)
explicit

◆ LqrKnotTpl() [3/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( uint nx,
uint nu,
uint nc,
uint nx2,
uint nth,
allocator_type alloc = {} )

◆ LqrKnotTpl() [4/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( uint nx,
uint nu,
uint nc,
uint nx2,
allocator_type alloc = {} )
inline

Delegating constructor, assumes nth = 0.

Definition at line 66 of file lqr-problem.hpp.

◆ LqrKnotTpl() [5/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( uint nx,
uint nu,
uint nc,
allocator_type alloc = {} )
inline

Delegating constructor, assumes nx2 = nx, and nth = 0.

Definition at line 70 of file lqr-problem.hpp.

◆ LqrKnotTpl() [6/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( const LqrKnotTpl< Scalar > & other,
allocator_type alloc = {} )

Copy constructor. Allocator must be given.

◆ LqrKnotTpl() [7/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( LqrKnotTpl< Scalar > && other)
noexcept

Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true.

◆ LqrKnotTpl() [8/8]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( LqrKnotTpl< Scalar > && other,
const allocator_type & alloc )

Extended move constructor.

◆ ~LqrKnotTpl()

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::~LqrKnotTpl ( )
default

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ operator=() [1/2]

template<typename Scalar>
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= ( const LqrKnotTpl< Scalar > & other)

Copy assignment. Current allocator will be reused if required.

◆ operator=() [2/2]

template<typename Scalar>
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= ( LqrKnotTpl< Scalar > && )

Move assignment. Other allocator will be stolen.

◆ assign()

template<typename Scalar>
void aligator::gar::LqrKnotTpl< Scalar >::assign ( const LqrKnotTpl< Scalar > & other)

Assign matrices (and dimensions) from another LqrKnotTpl.

◆ addParameterization()

template<typename Scalar>
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::addParameterization ( uint nth)

◆ isApprox()

template<typename Scalar>
bool aligator::gar::LqrKnotTpl< Scalar >::isApprox ( const LqrKnotTpl< Scalar > & other,
Scalar prec = std::numeric_limits< Scalar >::epsilon() ) const

◆ get_allocator()

template<typename Scalar>
allocator_type aligator::gar::LqrKnotTpl< Scalar >::get_allocator ( ) const
inline

Definition at line 100 of file lqr-problem.hpp.

Friends And Related Symbol Documentation

◆ operator==

template<typename Scalar>
bool operator== ( const LqrKnotTpl< Scalar > & lhs,
const LqrKnotTpl< Scalar > & rhs )
friend

Definition at line 96 of file lqr-problem.hpp.

Member Data Documentation

◆ Alignment

template<typename Scalar>
int aligator::gar::LqrKnotTpl< Scalar >::Alignment = Eigen::AlignedMax
staticconstexpr

Definition at line 37 of file lqr-problem.hpp.

◆ nx

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nx

Definition at line 40 of file lqr-problem.hpp.

◆ nu

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nu

Definition at line 41 of file lqr-problem.hpp.

◆ nc

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nc

Definition at line 42 of file lqr-problem.hpp.

◆ nx2

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nx2

Definition at line 43 of file lqr-problem.hpp.

◆ nth

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nth

Definition at line 44 of file lqr-problem.hpp.

◆ Q

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Q

Definition at line 46 of file lqr-problem.hpp.

◆ S

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::S

Definition at line 46 of file lqr-problem.hpp.

◆ R

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::R

Definition at line 46 of file lqr-problem.hpp.

◆ q

template<typename Scalar>
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::q

Definition at line 47 of file lqr-problem.hpp.

◆ r

template<typename Scalar>
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::r

Definition at line 47 of file lqr-problem.hpp.

◆ A

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::A

Definition at line 48 of file lqr-problem.hpp.

◆ B

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::B

Definition at line 48 of file lqr-problem.hpp.

◆ f

template<typename Scalar>
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::f

Definition at line 49 of file lqr-problem.hpp.

◆ C

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::C

Definition at line 50 of file lqr-problem.hpp.

◆ D

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::D

Definition at line 50 of file lqr-problem.hpp.

◆ d

template<typename Scalar>
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::d

Definition at line 51 of file lqr-problem.hpp.

◆ Gth

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gth

Definition at line 53 of file lqr-problem.hpp.

◆ Gx

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gx

Definition at line 54 of file lqr-problem.hpp.

◆ Gu

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gu

Definition at line 55 of file lqr-problem.hpp.

◆ Gv

template<typename Scalar>
ArenaMatrix<MatrixXs> aligator::gar::LqrKnotTpl< Scalar >::Gv

Definition at line 56 of file lqr-problem.hpp.

◆ gamma

template<typename Scalar>
ArenaMatrix<VectorXs> aligator::gar::LqrKnotTpl< Scalar >::gamma

Definition at line 57 of file lqr-problem.hpp.


The documentation for this struct was generated from the following files: