aligator
0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
|
Second-order Runge-Kutta integrator. More...
#include <aligator/modelling/dynamics/integrator-rk2.hpp>
Public Member Functions | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
IntegratorRK2Tpl (const shared_ptr< ODEType > &cont_dynamics, const Scalar timestep) | |
void | forward (const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const |
Evaluate the forward discrete dynamics. | |
void | dForward (const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const |
Compute the Jacobians of the forward dynamics. | |
shared_ptr< StageFunctionDataTpl< Scalar > > | createData () const |
Instantiate a Data object. | |
![]() | |
ExplicitIntegratorAbstractTpl (const shared_ptr< ODEType > &cont_dynamics) | |
virtual | ~ExplicitIntegratorAbstractTpl ()=default |
void | computeJacobians (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const |
void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const |
![]() | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
bool | is_explicit () const |
Check if this dynamics model is implicit or explicit. | |
ExplicitDynamicsModelTpl (ManifoldPtr next_state, const int nu) | |
Constructor requires providing the next state's manifold. | |
virtual | ~ExplicitDynamicsModelTpl ()=default |
void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const |
void | computeJacobians (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const |
![]() | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
const Manifold & | space () const |
State space for the input. | |
const Manifold & | space_next () const |
State space for the output of this dynamics model. | |
int | nx1 () const |
int | nx2 () const |
DynamicsModelTpl (ManifoldPtr space, const int nu) | |
Constructor for dynamics. | |
DynamicsModelTpl (ManifoldPtr space, const int nu, ManifoldPtr space2) | |
Constructor for dynamics. This constructor assumes same dimension for the current and next state. | |
![]() | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
StageFunctionTpl (const int ndx1, const int nu, const int ndx2, const int nr) | |
StageFunctionTpl (const int ndx, const int nu, const int nr) | |
Constructor where ndx2 = ndx1. | |
virtual void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, Data &data) const =0 |
Evaluate the function. | |
virtual void | computeJacobians (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, Data &data) const =0 |
Compute Jacobians of this function. | |
virtual void | computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, const ConstVectorRef &lbda, Data &data) const |
Compute the vector-hessian products of this function. | |
virtual | ~StageFunctionTpl ()=default |
Public Attributes | |
Scalar | timestep_ |
![]() | |
shared_ptr< ODEType > | ode_ |
![]() | |
ManifoldPtr | space_ |
State space for the input. | |
ManifoldPtr | space_next_ |
State space for the output of this dynamics model. | |
![]() | |
const int | ndx1 |
Current state dimension. | |
const int | nu |
Control dimension. | |
const int | ndx2 |
Next state dimension. | |
const int | nr |
Function codimension. | |
Protected Attributes | |
Scalar | dt_2_ = 0.5 * timestep_ |
Second-order Runge-Kutta integrator.
\begin{eqnarray*} x_{k+1} = x_k \oplus h f(x^{(1)}, u_k),\\ x^{(1)} = x_k \oplus \frac h2 f(x_k, u_k) \end{eqnarray*}
Definition at line 19 of file integrator-rk2.hpp.
using aligator::dynamics::IntegratorRK2Tpl< _Scalar >::Scalar = _Scalar |
Definition at line 20 of file integrator-rk2.hpp.
using aligator::dynamics::IntegratorRK2Tpl< _Scalar >::Base = ExplicitIntegratorAbstractTpl<Scalar> |
Definition at line 22 of file integrator-rk2.hpp.
using aligator::dynamics::IntegratorRK2Tpl< _Scalar >::BaseData = ExplicitDynamicsDataTpl<Scalar> |
Definition at line 23 of file integrator-rk2.hpp.
using aligator::dynamics::IntegratorRK2Tpl< _Scalar >::Data = IntegratorRK2DataTpl<Scalar> |
Definition at line 24 of file integrator-rk2.hpp.
using aligator::dynamics::IntegratorRK2Tpl< _Scalar >::ODEType = typename Base::ODEType |
Definition at line 25 of file integrator-rk2.hpp.
aligator::dynamics::IntegratorRK2Tpl< _Scalar >::IntegratorRK2Tpl | ( | const shared_ptr< ODEType > & | cont_dynamics, |
const Scalar | timestep ) |
aligator::dynamics::IntegratorRK2Tpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
virtual |
Evaluate the forward discrete dynamics.
Implements aligator::ExplicitDynamicsModelTpl< _Scalar >.
|
virtual |
Compute the Jacobians of the forward dynamics.
Implements aligator::ExplicitDynamicsModelTpl< _Scalar >.
|
inlinevirtual |
Instantiate a Data object.
Reimplemented from aligator::dynamics::ExplicitIntegratorAbstractTpl< _Scalar >.
Definition at line 37 of file integrator-rk2.hpp.
Scalar aligator::dynamics::IntegratorRK2Tpl< _Scalar >::timestep_ |
Definition at line 28 of file integrator-rk2.hpp.
|
protected |
Definition at line 42 of file integrator-rk2.hpp.