Cost penalizing high horizontal velocity near zero altitude. More...
#include <sobec/crocomplements/residual-fly-angle.hpp>
Public Types | |
typedef MathBaseTpl< Scalar > | MathBase |
typedef ResidualModelAbstractTpl< Scalar > | Base |
typedef ResidualDataFlyAngleTpl< Scalar > | Data |
typedef StateMultibodyTpl< Scalar > | StateMultibody |
typedef ResidualDataAbstractTpl< Scalar > | ResidualDataAbstract |
typedef DataCollectorAbstractTpl< Scalar > | DataCollectorAbstract |
typedef MathBase::Vector3s | Vector3s |
typedef MathBase::VectorXs | VectorXs |
typedef MathBase::MatrixXs | MatrixXs |
typedef MathBase::Matrix3s | Matrix3s |
Public Member Functions | |
ResidualModelFlyAngleTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex frame_id, const Scalar slope, const Scalar height, const Scalar dist, const Scalar width, const std::size_t nu) | |
Initialize the residual model. More... | |
ResidualModelFlyAngleTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex frame_id, const Scalar slope, const Scalar height, const Scalar dist, const Scalar width) | |
Initialize the residual model. More... | |
virtual | ~ResidualModelFlyAngleTpl () |
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< ResidualDataAbstract > | createData (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 |
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.
ResidualModelAbstractTpl
, calc()
, calcDiff()
, createData()
typedef ResidualModelAbstractTpl<Scalar> sobec::ResidualModelFlyAngleTpl< _Scalar >::Base |
typedef ResidualDataFlyAngleTpl<Scalar> sobec::ResidualModelFlyAngleTpl< _Scalar >::Data |
typedef DataCollectorAbstractTpl<Scalar> sobec::ResidualModelFlyAngleTpl< _Scalar >::DataCollectorAbstract |
typedef MathBaseTpl<Scalar> sobec::ResidualModelFlyAngleTpl< _Scalar >::MathBase |
typedef MathBase::Matrix3s sobec::ResidualModelFlyAngleTpl< _Scalar >::Matrix3s |
typedef MathBase::MatrixXs sobec::ResidualModelFlyAngleTpl< _Scalar >::MatrixXs |
typedef ResidualDataAbstractTpl<Scalar> sobec::ResidualModelFlyAngleTpl< _Scalar >::ResidualDataAbstract |
typedef StateMultibodyTpl<Scalar> sobec::ResidualModelFlyAngleTpl< _Scalar >::StateMultibody |
typedef MathBase::Vector3s sobec::ResidualModelFlyAngleTpl< _Scalar >::Vector3s |
typedef MathBase::VectorXs sobec::ResidualModelFlyAngleTpl< _Scalar >::VectorXs |
sobec::ResidualModelFlyAngleTpl< Scalar >::ResidualModelFlyAngleTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const pinocchio::FrameIndex | frame_id, | ||
const Scalar | slope, | ||
const Scalar | height, | ||
const Scalar | dist, | ||
const Scalar | width, | ||
const std::size_t | nu | ||
) |
Initialize the residual model.
[in] | state | State of the multibody system |
[in] | frame_id | ID of the frame that should be considered for altitude and velocity |
[in] | slope | Slope value, ie altitude multiplier. |
[in] | nu | Dimension of the control vector |
sobec::ResidualModelFlyAngleTpl< Scalar >::ResidualModelFlyAngleTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const pinocchio::FrameIndex | frame_id, | ||
const Scalar | slope, | ||
const Scalar | height, | ||
const Scalar | dist, | ||
const Scalar | width | ||
) |
Initialize the residual model.
The default nu
value is obtained from StateAbstractTpl::get_nv()
.
[in] | state | State of the multibody system |
[in] | frame_id | ID of the frame that should be considered for altitude and velocity |
[in] | slope | Slope value, ie altitude multiplier. |
|
virtual |
|
virtual |
Compute the residual.
[in] | data | CoM velocity residual data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
|
virtual |
Compute the derivatives of the CoM velocity residual.
[in] | data | CoM velocity residual data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
|
virtual |
const pinocchio::FrameIndex & sobec::ResidualModelFlyAngleTpl< Scalar >::get_frame_id |
Return the frame index.
|
inline |
void sobec::ResidualModelFlyAngleTpl< Scalar >::set_frame_id | ( | const pinocchio::FrameIndex & | fid | ) |
Modify the frame index.
|
inline |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar sobec::ResidualModelFlyAngleTpl< _Scalar >::Scalar |