aligator  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
integrator-midpoint.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace aligator {
7namespace dynamics {
8template <typename Scalar> struct IntegratorMidpointDataTpl;
9
27template <typename _Scalar>
29 using Scalar = _Scalar;
33 using Manifold = ManifoldAbstractTpl<Scalar>;
36
38
40 const xyz::polymorphic<ContinuousDynamics> &cont_dynamics,
41 const Scalar timestep);
42
43 void evaluate(const ConstVectorRef &x, const ConstVectorRef &u,
44 const ConstVectorRef &y, BaseData &data) const;
45
46 void computeJacobians(const ConstVectorRef &x, const ConstVectorRef &u,
47 const ConstVectorRef &y, BaseData &data) const;
48
49 shared_ptr<BaseData> createData() const;
50};
51
52template <typename _Scalar>
54 using Scalar = _Scalar;
57
60 MatrixXs J_v_0;
61 MatrixXs J_v_1;
62 MatrixXs Jtm0;
63 MatrixXs Jtm1;
64
66 const IntegratorMidpointTpl<Scalar> &integrator)
67 : Base(integrator), x1_(integrator.space().neutral()), dx1_(this->ndx1),
68 J_v_0(this->ndx1, this->ndx1), J_v_1(this->ndx1, this->ndx1),
69 Jtm0(this->ndx1, this->ndx1), Jtm1(this->ndx1, this->ndx1) {
70 x1_.setZero();
71 dx1_.setZero();
72 J_v_0.setZero();
73 J_v_1.setZero();
74 Jtm0.setZero();
75 Jtm1.setZero();
76 }
77};
78
79#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
80extern template struct IntegratorMidpointTpl<context::Scalar>;
81extern template struct IntegratorMidpointDataTpl<context::Scalar>;
82#endif
83
84} // namespace dynamics
85} // namespace aligator
Base definitions for numerical integrators.
Main package namespace.
Continuous dynamics described by differential-algebraic equations (DAEs) .
Definition fwd.hpp:12
Base class for (implicit) numerical integrators.
Data class for numerical integrators (IntegratorAbstractTpl).
typename math_types< Scalar >::VectorXs VectorXs
IntegratorMidpointDataTpl(const IntegratorMidpointTpl< Scalar > &integrator)
void computeJacobians(const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const
IntegratorMidpointTpl(const xyz::polymorphic< ContinuousDynamics > &cont_dynamics, const Scalar timestep)
shared_ptr< BaseData > createData() const
void evaluate(const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const