sobec::ResidualModelCenterOfFrictionTpl< _Scalar > Class Template Reference

Center of friction residual. More...

#include <sobec/crocomplements/residual-center-of-friction.hpp>

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

Public Types

typedef MathBaseTpl< ScalarMathBase
 
typedef ResidualModelAbstractTpl< ScalarBase
 
typedef ResidualDataCenterOfFrictionTpl< ScalarData
 
typedef ResidualDataAbstractTpl< ScalarResidualDataAbstract
 
typedef StateMultibodyTpl< ScalarStateMultibody
 
typedef DataCollectorAbstractTpl< ScalarDataCollectorAbstract
 
typedef MathBase::VectorXs VectorXs
 
typedef MathBase::Vector3s Vector3s
 
typedef MathBase::MatrixXs MatrixXs
 
typedef pinocchio::ForceTpl< ScalarForce
 

Public Member Functions

 ResidualModelCenterOfFrictionTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex contact_id, const std::size_t nu)
 Initialize the residual model. More...
 
virtual ~ResidualModelCenterOfFrictionTpl ()
 
virtual void calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the center of friction. 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 residual. More...
 
virtual boost::shared_ptr< ResidualDataAbstractcreateData (DataCollectorAbstract *const data)
 
pinocchio::FrameIndex get_contact_id () const
 Return the reference contact id. More...
 
void set_contact_id (const pinocchio::FrameIndex id)
 Set the reference contact id. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Detailed Description

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

Center of friction residual.

residual = [ tau_y/f_z, -tau_x/fx ]

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::ResidualModelCenterOfFrictionTpl< _Scalar >::Base

◆ Data

template<typename _Scalar >
typedef ResidualDataCenterOfFrictionTpl<Scalar> sobec::ResidualModelCenterOfFrictionTpl< _Scalar >::Data

◆ DataCollectorAbstract

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

◆ Force

template<typename _Scalar >
typedef pinocchio::ForceTpl<Scalar> sobec::ResidualModelCenterOfFrictionTpl< _Scalar >::Force

◆ MathBase

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

◆ MatrixXs

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

◆ ResidualDataAbstract

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

◆ StateMultibody

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

◆ Vector3s

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

◆ VectorXs

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

Constructor & Destructor Documentation

◆ ResidualModelCenterOfFrictionTpl()

template<typename Scalar >
sobec::ResidualModelCenterOfFrictionTpl< Scalar >::ResidualModelCenterOfFrictionTpl ( boost::shared_ptr< StateMultibody state,
const pinocchio::FrameIndex  contact_id,
const std::size_t  nu 
)

Initialize the residual model.

Parameters
[in]stateState of the multibody system
[in]nuDimension of the control vector
[in]geom_modelPinocchio geometry model containing the collision pair
[in]pair_idIndex of the collision pair in the geometry model
[in]joint_idIndex of the nearest joint on which the collision link is attached

◆ ~ResidualModelCenterOfFrictionTpl()

Member Function Documentation

◆ calc()

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

Compute the center of friction.

Parameters
[in]dataresidual 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::ResidualModelCenterOfFrictionTpl< 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 residual.

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

◆ get_contact_id()

template<typename _Scalar >
pinocchio::FrameIndex sobec::ResidualModelCenterOfFrictionTpl< _Scalar >::get_contact_id ( ) const
inline

Return the reference contact id.

◆ set_contact_id()

template<typename _Scalar >
void sobec::ResidualModelCenterOfFrictionTpl< _Scalar >::set_contact_id ( const pinocchio::FrameIndex  id)
inline

Set the reference contact id.

Member Data Documentation

◆ Scalar

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

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