aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator::CentroidalAccelerationResidualTpl< _Scalar > Struct Template Reference

This residual returns the linear acceleration of a centroidal model with state \(x = (c, h, L) \), computed from the external forces and contact poses. More...

#include <aligator/modelling/centroidal/centroidal-acceleration.hpp>

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

Public Types

using Scalar = _Scalar
 
using Base = StageFunctionTpl<Scalar>
 
using BaseData = typename Base::Data
 
using Data = CentroidalAccelerationDataTpl<Scalar>
 
using ContactMap = ContactMapTpl<Scalar>
 
- Public Types inherited from aligator::StageFunctionTpl< _Scalar >
using Scalar
 
using Data
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 CentroidalAccelerationResidualTpl (const int ndx, const int nu, const double mass, const Vector3s &gravity, const ContactMap &contact_map, const int force_size)
 
void evaluate (const ConstVectorRef &, const ConstVectorRef &u, BaseData &data) const
 
void computeJacobians (const ConstVectorRef &, const ConstVectorRef &, BaseData &data) const
 
shared_ptr< BaseDatacreateData () const
 Instantiate a Data object.
 
- Public Member Functions inherited from aligator::StageFunctionTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (_Scalar)
 
 StageFunctionTpl (const int ndx, const int nu, const int nr)
 
virtual void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const=0
 Evaluate the function.
 
virtual void computeJacobians (const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const=0
 Compute Jacobians of this function.
 
virtual void computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &lbda, Data &data) const
 Compute the vector-hessian products of this function.
 
virtual ~StageFunctionTpl ()=default
 

Public Attributes

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

Protected Attributes

size_t nk_
 
double mass_
 
Vector3s gravity_
 
int force_size_
 

Detailed Description

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

This residual returns the linear acceleration of a centroidal model with state \(x = (c, h, L) \), computed from the external forces and contact poses.

The cost is described by \(r(x,u) = g + \frac{1}{m} * \sum_{k \in K} u_k\) with \(K\) set of active contacts, \(g\) gravity, \(m\) model mass, and \(u_k\) 3D unilateral force for contact k. All contacts are considered as unilateral.

Definition at line 22 of file centroidal-acceleration.hpp.

Member Typedef Documentation

◆ Scalar

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

Definition at line 25 of file centroidal-acceleration.hpp.

◆ Base

template<typename _Scalar >
using aligator::CentroidalAccelerationResidualTpl< _Scalar >::Base = StageFunctionTpl<Scalar>

Definition at line 27 of file centroidal-acceleration.hpp.

◆ BaseData

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

Definition at line 28 of file centroidal-acceleration.hpp.

◆ Data

template<typename _Scalar >
using aligator::CentroidalAccelerationResidualTpl< _Scalar >::Data = CentroidalAccelerationDataTpl<Scalar>

Definition at line 29 of file centroidal-acceleration.hpp.

◆ ContactMap

template<typename _Scalar >
using aligator::CentroidalAccelerationResidualTpl< _Scalar >::ContactMap = ContactMapTpl<Scalar>

Definition at line 30 of file centroidal-acceleration.hpp.

Constructor & Destructor Documentation

◆ CentroidalAccelerationResidualTpl()

template<typename _Scalar >
aligator::CentroidalAccelerationResidualTpl< _Scalar >::CentroidalAccelerationResidualTpl ( const int ndx,
const int nu,
const double mass,
const Vector3s & gravity,
const ContactMap & contact_map,
const int force_size )
inline

Definition at line 32 of file centroidal-acceleration.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

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

◆ evaluate()

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

◆ computeJacobians()

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

◆ createData()

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

Instantiate a Data object.

Reimplemented from aligator::StageFunctionTpl< _Scalar >.

Definition at line 53 of file centroidal-acceleration.hpp.

Member Data Documentation

◆ contact_map_

template<typename _Scalar >
ContactMap aligator::CentroidalAccelerationResidualTpl< _Scalar >::contact_map_

Definition at line 57 of file centroidal-acceleration.hpp.

◆ nk_

template<typename _Scalar >
size_t aligator::CentroidalAccelerationResidualTpl< _Scalar >::nk_
protected

Definition at line 60 of file centroidal-acceleration.hpp.

◆ mass_

template<typename _Scalar >
double aligator::CentroidalAccelerationResidualTpl< _Scalar >::mass_
protected

Definition at line 61 of file centroidal-acceleration.hpp.

◆ gravity_

template<typename _Scalar >
Vector3s aligator::CentroidalAccelerationResidualTpl< _Scalar >::gravity_
protected

Definition at line 62 of file centroidal-acceleration.hpp.

◆ force_size_

template<typename _Scalar >
int aligator::CentroidalAccelerationResidualTpl< _Scalar >::force_size_
protected

Definition at line 63 of file centroidal-acceleration.hpp.


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