sobec::ResidualModelDCMPositionTpl< _Scalar > Class Template Reference

DCM position residual. More...

#include <sobec/crocomplements/residual-dcm-position.hpp>

Inheritance diagram for sobec::ResidualModelDCMPositionTpl< _Scalar >:
Collaboration diagram for sobec::ResidualModelDCMPositionTpl< _Scalar >:

Public Types

typedef MathBaseTpl< ScalarMathBase
 
typedef ResidualModelAbstractTpl< ScalarBase
 
typedef ResidualDataDCMPositionTpl< ScalarData
 
typedef StateMultibodyTpl< ScalarStateMultibody
 
typedef ResidualDataAbstractTpl< ScalarResidualDataAbstract
 
typedef DataCollectorAbstractTpl< ScalarDataCollectorAbstract
 
typedef MathBase::Vector3s Vector3s
 
typedef MathBase::VectorXs VectorXs
 

Public Member Functions

 ResidualModelDCMPositionTpl (boost::shared_ptr< StateMultibody > state, const Vector3s &cref, const double alpha, const std::size_t nu)
 Initialize the DCM position residual model. More...
 
 ResidualModelDCMPositionTpl (boost::shared_ptr< StateMultibody > state, const Vector3s &cref, const double alpha)
 Initialize the DCM position residual model. More...
 
virtual ~ResidualModelDCMPositionTpl ()
 
virtual void calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the DCM position residual. More...
 
virtual void calcDiff (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the derivatives of the DCM position residual. More...
 
virtual boost::shared_ptr< ResidualDataAbstractcreateData (DataCollectorAbstract *const data)
 
const Vector3sget_reference () const
 Return the DCM position reference. More...
 
void set_reference (const Vector3s &cref)
 Modify the DCM position reference. More...
 
virtual void print (std::ostream &os) const
 Print relevant information of the dcm-position residual. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Detailed Description

template<typename _Scalar>
class sobec::ResidualModelDCMPositionTpl< _Scalar >

DCM position residual.

This residual function defines the CoM tracking as \(\mathbf{r}=\mathbf{c}-\mathbf{c}^*\), where \(\mathbf{c},\mathbf{c}^*\in~\mathbb{R}^3\) are the current and reference DCM position, respectively. Note that the dimension of the residual vector is obtained from 3. Furthermore, the Jacobians of the residual function are computed analytically.

As described in ResidualModelAbstractTpl(), the residual value and its Jacobians are calculated by calc and calcDiff, respectively.

See also
ResidualModelAbstractTpl, calc(), calcDiff(), createData()

Member Typedef Documentation

◆ Base

template<typename _Scalar >
typedef ResidualModelAbstractTpl<Scalar> sobec::ResidualModelDCMPositionTpl< _Scalar >::Base

◆ Data

template<typename _Scalar >
typedef ResidualDataDCMPositionTpl<Scalar> sobec::ResidualModelDCMPositionTpl< _Scalar >::Data

◆ DataCollectorAbstract

template<typename _Scalar >
typedef DataCollectorAbstractTpl<Scalar> sobec::ResidualModelDCMPositionTpl< _Scalar >::DataCollectorAbstract

◆ MathBase

template<typename _Scalar >
typedef MathBaseTpl<Scalar> sobec::ResidualModelDCMPositionTpl< _Scalar >::MathBase

◆ ResidualDataAbstract

template<typename _Scalar >
typedef ResidualDataAbstractTpl<Scalar> sobec::ResidualModelDCMPositionTpl< _Scalar >::ResidualDataAbstract

◆ StateMultibody

template<typename _Scalar >
typedef StateMultibodyTpl<Scalar> sobec::ResidualModelDCMPositionTpl< _Scalar >::StateMultibody

◆ Vector3s

template<typename _Scalar >
typedef MathBase::Vector3s sobec::ResidualModelDCMPositionTpl< _Scalar >::Vector3s

◆ VectorXs

template<typename _Scalar >
typedef MathBase::VectorXs sobec::ResidualModelDCMPositionTpl< _Scalar >::VectorXs

Constructor & Destructor Documentation

◆ ResidualModelDCMPositionTpl() [1/2]

template<typename Scalar >
sobec::ResidualModelDCMPositionTpl< Scalar >::ResidualModelDCMPositionTpl ( boost::shared_ptr< StateMultibody state,
const Vector3s cref,
const double  alpha,
const std::size_t  nu 
)

Initialize the DCM position residual model.

Parameters
[in]stateState of the multibody system
[in]crefReference CoM position
[in]nuDimension of the control vector

◆ ResidualModelDCMPositionTpl() [2/2]

template<typename Scalar >
sobec::ResidualModelDCMPositionTpl< Scalar >::ResidualModelDCMPositionTpl ( boost::shared_ptr< StateMultibody state,
const Vector3s cref,
const double  alpha 
)

Initialize the DCM position residual model.

The default nu value is obtained from StateAbstractTpl::get_nv().

Parameters
[in]stateState of the multibody system
[in]crefReference CoM position

◆ ~ResidualModelDCMPositionTpl()

Member Function Documentation

◆ calc()

template<typename Scalar >
void sobec::ResidualModelDCMPositionTpl< Scalar >::calc ( const boost::shared_ptr< ResidualDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x,
const Eigen::Ref< const VectorXs > &  u 
)
virtual

Compute the DCM position residual.

Parameters
[in]dataDCM position residual data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

◆ calcDiff()

template<typename Scalar >
void sobec::ResidualModelDCMPositionTpl< Scalar >::calcDiff ( const boost::shared_ptr< ResidualDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x,
const Eigen::Ref< const VectorXs > &  u 
)
virtual

Compute the derivatives of the DCM position residual.

Parameters
[in]dataDCM position residual data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

◆ createData()

template<typename Scalar >
boost::shared_ptr< ResidualDataAbstractTpl< Scalar > > sobec::ResidualModelDCMPositionTpl< Scalar >::createData ( DataCollectorAbstract *const  data)
virtual

◆ get_reference()

template<typename Scalar >
const MathBaseTpl< Scalar >::Vector3s & sobec::ResidualModelDCMPositionTpl< Scalar >::get_reference

Return the DCM position reference.

◆ print()

template<typename Scalar >
void sobec::ResidualModelDCMPositionTpl< Scalar >::print ( std::ostream &  os) const
virtual

Print relevant information of the dcm-position residual.

Parameters
[out]osOutput stream object

◆ set_reference()

template<typename Scalar >
void sobec::ResidualModelDCMPositionTpl< Scalar >::set_reference ( const Vector3s cref)

Modify the DCM position reference.

Member Data Documentation

◆ Scalar

template<typename _Scalar >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar sobec::ResidualModelDCMPositionTpl< _Scalar >::Scalar

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