aligator  0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Loading...
Searching...
No Matches
aligator::LinearMomentumResidualTpl< _Scalar > Struct Template Reference

This residual returns the linear momentum for a centroidal model with state \(x = (c, h, L) \). More...

#include <aligator/modelling/centroidal/linear-momentum.hpp>

Inheritance diagram for aligator::LinearMomentumResidualTpl< _Scalar >:
[legend]
Collaboration diagram for aligator::LinearMomentumResidualTpl< _Scalar >:
[legend]

Public Types

using Scalar = _Scalar
using BaseData = typename Base::Data
using Data = LinearMomentumDataTpl<Scalar>
Public Types inherited from aligator::UnaryFunctionTpl< _Scalar >
using Scalar = _Scalar
using Base = StageFunctionTpl<Scalar>
using Data = StageFunctionDataTpl<Scalar>
Public Types inherited from aligator::StageFunctionTpl< _Scalar >
using Scalar = _Scalar
using Data = StageFunctionDataTpl<Scalar>

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 ALIGATOR_UNARY_FUNCTION_INTERFACE (Scalar)
 LinearMomentumResidualTpl (const int ndx, const int nu, const Vector3s &h_ref)
const Vector3s & getReference () const
void setReference (const Eigen::Ref< const Vector3s > &h_new)
void evaluate (const ConstVectorRef &x, BaseData &data) const
void computeJacobians (const ConstVectorRef &, BaseData &data) const
shared_ptr< BaseDatacreateData () const
 Instantiate a Data object.
Public Member Functions inherited from aligator::UnaryFunctionTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
virtual void evaluate (const ConstVectorRef &x, Data &data) const =0
virtual void computeJacobians (const ConstVectorRef &x, Data &data) const =0
virtual void computeVectorHessianProducts (const ConstVectorRef &, const ConstVectorRef &, Data &) const
void evaluate (const ConstVectorRef &x, const ConstVectorRef &, Data &data) const override
 Evaluate the function.
void computeJacobians (const ConstVectorRef &x, const ConstVectorRef &, Data &data) const override
 Compute Jacobians of this function.
void computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &, const ConstVectorRef &lbda, Data &data) const override
 Compute the vector-hessian products of this function.
Public Member Functions inherited from aligator::StageFunctionTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 StageFunctionTpl (const int ndx, const int nu, const int nr)
virtual ~StageFunctionTpl ()=default

Protected Attributes

Vector3s h_ref_

Additional Inherited Members

Public Attributes inherited from aligator::StageFunctionTpl< _Scalar >
const int ndx1
 Current state dimension.
const int nu
 Control dimension.
const int nr
 Function codimension.

Detailed Description

template<typename _Scalar>
struct aligator::LinearMomentumResidualTpl< _Scalar >

This residual returns the linear momentum for a centroidal model with state \(x = (c, h, L) \).

The residual returns the middle three components of the state: \(r(x) = h - h_r \) with \( h \) linear momentym and \( h_r \) desired reference for linear momentum.

Definition at line 19 of file linear-momentum.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar>
using aligator::LinearMomentumResidualTpl< _Scalar >::Scalar = _Scalar

Definition at line 21 of file linear-momentum.hpp.

◆ BaseData

template<typename _Scalar>
using aligator::LinearMomentumResidualTpl< _Scalar >::BaseData = typename Base::Data

Definition at line 24 of file linear-momentum.hpp.

◆ Data

template<typename _Scalar>
using aligator::LinearMomentumResidualTpl< _Scalar >::Data = LinearMomentumDataTpl<Scalar>

Definition at line 25 of file linear-momentum.hpp.

Constructor & Destructor Documentation

◆ LinearMomentumResidualTpl()

template<typename _Scalar>
aligator::LinearMomentumResidualTpl< _Scalar >::LinearMomentumResidualTpl(const intndx,
const intnu,
const Vector3s &h_ref )
inline

Definition at line 27 of file linear-momentum.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar>
aligator::LinearMomentumResidualTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)

◆ ALIGATOR_UNARY_FUNCTION_INTERFACE()

template<typename _Scalar>
aligator::LinearMomentumResidualTpl< _Scalar >::ALIGATOR_UNARY_FUNCTION_INTERFACE(Scalar)

◆ getReference()

template<typename _Scalar>
const Vector3s & aligator::LinearMomentumResidualTpl< _Scalar >::getReference()const
inline

Definition at line 31 of file linear-momentum.hpp.

◆ setReference()

template<typename _Scalar>
void aligator::LinearMomentumResidualTpl< _Scalar >::setReference(const Eigen::Ref< const Vector3s > &h_new)
inline

Definition at line 32 of file linear-momentum.hpp.

◆ evaluate()

template<typename _Scalar>
void aligator::LinearMomentumResidualTpl< _Scalar >::evaluate(const ConstVectorRef &x,
BaseData &data ) const

◆ computeJacobians()

template<typename _Scalar>
void aligator::LinearMomentumResidualTpl< _Scalar >::computeJacobians(const ConstVectorRef &,
BaseData &data ) const

◆ createData()

template<typename _Scalar>
shared_ptr< BaseData > aligator::LinearMomentumResidualTpl< _Scalar >::createData()const
inlinevirtual

Instantiate a Data object.

Reimplemented from aligator::StageFunctionTpl< _Scalar >.

Definition at line 38 of file linear-momentum.hpp.

Member Data Documentation

◆ h_ref_

template<typename _Scalar>
Vector3s aligator::LinearMomentumResidualTpl< _Scalar >::h_ref_
protected

Definition at line 43 of file linear-momentum.hpp.


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