sobec::ResidualModelFlyHighTpl< _Scalar > Class Template Reference

Cost penalizing high horizontal velocity near zero altitude. More...

#include <sobec/crocomplements/residual-fly-high.hpp>

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

Public Types

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

Public Member Functions

 ResidualModelFlyHighTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex frame_id, const Scalar slope, const std::size_t nu)
 Initialize the residual model. More...
 
 ResidualModelFlyHighTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex frame_id, const Scalar slope)
 Initialize the residual model. More...
 
virtual ~ResidualModelFlyHighTpl ()
 
virtual void calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the 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 pinocchio::FrameIndex & get_frame_id () const
 Return the frame index. More...
 
void set_frame_id (const pinocchio::FrameIndex &fid)
 Modify the frame index. More...
 
const Scalar getSlope () const
 
void setSlope (const Scalar s)
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Detailed Description

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

Cost penalizing high horizontal velocity near zero altitude.

The cost is r(q,v) = v_foot[:2] / exp(slope*z_foot) with v_foot = J_foot(q) vq the local-world-aligned linear velocity of the considered frame velocity and z_foot(q) the altitude oMfoot[frameId].translation[2] of the considered frame wrt world.

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

Member Typedef Documentation

◆ Base

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

◆ Data

template<typename _Scalar >
typedef ResidualDataFlyHighTpl<Scalar> sobec::ResidualModelFlyHighTpl< _Scalar >::Data

◆ DataCollectorAbstract

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

◆ MathBase

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

◆ Matrix3s

template<typename _Scalar >
typedef MathBase::Matrix3s sobec::ResidualModelFlyHighTpl< _Scalar >::Matrix3s

◆ MatrixXs

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

◆ ResidualDataAbstract

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

◆ StateMultibody

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

◆ Vector3s

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

◆ VectorXs

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

Constructor & Destructor Documentation

◆ ResidualModelFlyHighTpl() [1/2]

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

Initialize the residual model.

Parameters
[in]stateState of the multibody system
[in]frame_idID of the frame that should be considered for altitude and velocity
[in]slopeSlope value, ie altitude multiplier.
[in]nuDimension of the control vector

◆ ResidualModelFlyHighTpl() [2/2]

template<typename Scalar >
sobec::ResidualModelFlyHighTpl< Scalar >::ResidualModelFlyHighTpl ( boost::shared_ptr< StateMultibody state,
const pinocchio::FrameIndex  frame_id,
const Scalar  slope 
)

Initialize the residual model.

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

Parameters
[in]stateState of the multibody system
[in]frame_idID of the frame that should be considered for altitude and velocity
[in]slopeSlope value, ie altitude multiplier.

◆ ~ResidualModelFlyHighTpl()

template<typename Scalar >
sobec::ResidualModelFlyHighTpl< Scalar >::~ResidualModelFlyHighTpl
virtual

Member Function Documentation

◆ calc()

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

Compute the 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::ResidualModelFlyHighTpl< 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::ResidualModelFlyHighTpl< Scalar >::createData ( DataCollectorAbstract *const  data)
virtual

◆ get_frame_id()

template<typename Scalar >
const pinocchio::FrameIndex & sobec::ResidualModelFlyHighTpl< Scalar >::get_frame_id

Return the frame index.

◆ getSlope()

template<typename _Scalar >
const Scalar sobec::ResidualModelFlyHighTpl< _Scalar >::getSlope ( ) const
inline

◆ set_frame_id()

template<typename Scalar >
void sobec::ResidualModelFlyHighTpl< Scalar >::set_frame_id ( const pinocchio::FrameIndex &  fid)

Modify the frame index.

◆ setSlope()

template<typename _Scalar >
void sobec::ResidualModelFlyHighTpl< _Scalar >::setSlope ( const Scalar  s)
inline

Member Data Documentation

◆ Scalar

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

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