Cost penalizing the position of one effector with respect to the other. More...
#include <sobec/crocomplements/residual-2D-surface.hpp>
Public Types | |
typedef MathBaseTpl< Scalar > | MathBase |
typedef ResidualModelAbstractTpl< Scalar > | Base |
typedef ResidualData2DSurfaceTpl< Scalar > | Data |
typedef StateMultibodyTpl< Scalar > | StateMultibody |
typedef ResidualDataAbstractTpl< Scalar > | ResidualDataAbstract |
typedef DataCollectorAbstractTpl< Scalar > | DataCollectorAbstract |
typedef MathBase::Vector3s | Vector3s |
typedef MathBase::Vector2s | Vector2s |
typedef MathBase::VectorXs | VectorXs |
typedef MathBase::MatrixXs | MatrixXs |
typedef MathBase::Matrix3s | Matrix3s |
Public Member Functions | |
ResidualModel2DSurfaceTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex frame_id, const Vector2s support_translation, const Scalar separation, const Scalar orientation, const Scalar alpha, const std::size_t nu) | |
Initialize the residual model. More... | |
ResidualModel2DSurfaceTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex frame_id, const Vector2s support_translation, const Scalar separation, const Scalar orientation, const Scalar alpha) | |
Initialize the residual model. More... | |
virtual | ~ResidualModel2DSurfaceTpl () |
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... | |
void | set_Ab (const Vector2s support_translation, const Scalar orientation) |
Modify the matrix A and vector b. More... | |
const MatrixXs & | get_A () const |
const Vector2s & | get_b () const |
void | set_A (const MatrixXs &A) |
void | set_b (const Vector2s &b) |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Cost penalizing the position of one effector with respect to the other.
The cost is r(q,v) = A * (pos_2 - pos_1) - c with pos_1, pos_2 (x,y) translations of feet, and A, C matrix and vector transcribing the restricted 2D surface through inequalities
ResidualModelAbstractTpl
, calc()
, calcDiff()
, createData()
typedef ResidualModelAbstractTpl<Scalar> sobec::ResidualModel2DSurfaceTpl< _Scalar >::Base |
typedef ResidualData2DSurfaceTpl<Scalar> sobec::ResidualModel2DSurfaceTpl< _Scalar >::Data |
typedef DataCollectorAbstractTpl<Scalar> sobec::ResidualModel2DSurfaceTpl< _Scalar >::DataCollectorAbstract |
typedef MathBaseTpl<Scalar> sobec::ResidualModel2DSurfaceTpl< _Scalar >::MathBase |
typedef MathBase::Matrix3s sobec::ResidualModel2DSurfaceTpl< _Scalar >::Matrix3s |
typedef MathBase::MatrixXs sobec::ResidualModel2DSurfaceTpl< _Scalar >::MatrixXs |
typedef ResidualDataAbstractTpl<Scalar> sobec::ResidualModel2DSurfaceTpl< _Scalar >::ResidualDataAbstract |
typedef StateMultibodyTpl<Scalar> sobec::ResidualModel2DSurfaceTpl< _Scalar >::StateMultibody |
typedef MathBase::Vector2s sobec::ResidualModel2DSurfaceTpl< _Scalar >::Vector2s |
typedef MathBase::Vector3s sobec::ResidualModel2DSurfaceTpl< _Scalar >::Vector3s |
typedef MathBase::VectorXs sobec::ResidualModel2DSurfaceTpl< _Scalar >::VectorXs |
sobec::ResidualModel2DSurfaceTpl< Scalar >::ResidualModel2DSurfaceTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const pinocchio::FrameIndex | frame_id, | ||
const Vector2s | support_translation, | ||
const Scalar | separation, | ||
const Scalar | orientation, | ||
const Scalar | alpha, | ||
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::ResidualModel2DSurfaceTpl< Scalar >::ResidualModel2DSurfaceTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const pinocchio::FrameIndex | frame_id, | ||
const Vector2s | support_translation, | ||
const Scalar | separation, | ||
const Scalar | orientation, | ||
const Scalar | alpha | ||
) |
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 |
|
inline |
|
inline |
const pinocchio::FrameIndex & sobec::ResidualModel2DSurfaceTpl< Scalar >::get_frame_id |
Return the frame index.
|
inline |
void sobec::ResidualModel2DSurfaceTpl< Scalar >::set_Ab | ( | const Vector2s | support_translation, |
const Scalar | orientation | ||
) |
Modify the matrix A and vector b.
|
inline |
void sobec::ResidualModel2DSurfaceTpl< Scalar >::set_frame_id | ( | const pinocchio::FrameIndex & | fid | ) |
Modify the frame index.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar sobec::ResidualModel2DSurfaceTpl< _Scalar >::Scalar |