sobec::ResidualModelCoMVelocityTpl< _Scalar > Class Template Reference

CoM velocity residual. More...

#include <sobec/crocomplements/residual-com-velocity.hpp>

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

Public Types

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

Public Member Functions

 ResidualModelCoMVelocityTpl (boost::shared_ptr< StateMultibody > state, const Vector3s &vref, const std::size_t nu)
 Initialize the CoM velocity residual model. More...
 
 ResidualModelCoMVelocityTpl (boost::shared_ptr< StateMultibody > state, const Vector3s &vref)
 Initialize the CoM velocity residual model. More...
 
virtual ~ResidualModelCoMVelocityTpl ()
 
virtual void calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the CoM velocity 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 CoM velocity residual. More...
 
virtual boost::shared_ptr< ResidualDataAbstractcreateData (DataCollectorAbstract *const data)
 
const Vector3sget_reference () const
 Return the CoM velocity reference. More...
 
void set_reference (const Vector3s &vref)
 Modify the CoM velocity reference. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Detailed Description

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

CoM velocity residual.

This cost function defines a residual vector as \(\mathbf{r}=\mathbf{v_{c}}-\mathbf{v_{c}}^*\), where \(\mathbf{v_{c}},\mathbf{v_{c}}^*\in~\mathbb{R}^3\) are the current and reference CoM velocity, respetively. 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::ResidualModelCoMVelocityTpl< _Scalar >::Base

◆ Data

template<typename _Scalar >
typedef ResidualDataCoMVelocityTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::Data

◆ DataCollectorAbstract

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

◆ MathBase

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

◆ MatrixXs

template<typename _Scalar >
typedef MathBase::MatrixXs sobec::ResidualModelCoMVelocityTpl< _Scalar >::MatrixXs

◆ ResidualDataAbstract

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

◆ StateMultibody

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

◆ Vector3s

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

◆ VectorXs

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

Constructor & Destructor Documentation

◆ ResidualModelCoMVelocityTpl() [1/2]

template<typename Scalar >
sobec::ResidualModelCoMVelocityTpl< Scalar >::ResidualModelCoMVelocityTpl ( boost::shared_ptr< StateMultibody state,
const Vector3s vref,
const std::size_t  nu 
)

Initialize the CoM velocity residual model.

Parameters
[in]stateState of the multibody system
[in]vrefReference CoM velocity
[in]nuDimension of the control vector

◆ ResidualModelCoMVelocityTpl() [2/2]

template<typename Scalar >
sobec::ResidualModelCoMVelocityTpl< Scalar >::ResidualModelCoMVelocityTpl ( boost::shared_ptr< StateMultibody state,
const Vector3s vref 
)

Initialize the CoM velocity residual model.

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

Parameters
[in]stateState of the multibody system
[in]vrefReference CoM velocity

◆ ~ResidualModelCoMVelocityTpl()

Member Function Documentation

◆ calc()

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

Compute the CoM velocity residual.

Parameters
[in]dataCoM velocity 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::ResidualModelCoMVelocityTpl< 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 CoM velocity residual.

Parameters
[in]dataCoM velocity 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::ResidualModelCoMVelocityTpl< Scalar >::createData ( DataCollectorAbstract *const  data)
virtual

◆ get_reference()

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

Return the CoM velocity reference.

◆ set_reference()

template<typename Scalar >
void sobec::ResidualModelCoMVelocityTpl< Scalar >::set_reference ( const Vector3s vref)

Modify the CoM velocity reference.

Member Data Documentation

◆ Scalar

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

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