CoM velocity residual. More...
#include <sobec/crocomplements/residual-com-velocity.hpp>
Public Types | |
typedef MathBaseTpl< Scalar > | MathBase |
typedef ResidualModelAbstractTpl< Scalar > | Base |
typedef ResidualDataCoMVelocityTpl< 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 |
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< ResidualDataAbstract > | createData (DataCollectorAbstract *const data) |
const Vector3s & | get_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 |
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.
ResidualModelAbstractTpl
, calc()
, calcDiff()
, createData()
typedef ResidualModelAbstractTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::Base |
typedef ResidualDataCoMVelocityTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::Data |
typedef DataCollectorAbstractTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::DataCollectorAbstract |
typedef MathBaseTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::MathBase |
typedef MathBase::MatrixXs sobec::ResidualModelCoMVelocityTpl< _Scalar >::MatrixXs |
typedef ResidualDataAbstractTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::ResidualDataAbstract |
typedef StateMultibodyTpl<Scalar> sobec::ResidualModelCoMVelocityTpl< _Scalar >::StateMultibody |
typedef MathBase::Vector3s sobec::ResidualModelCoMVelocityTpl< _Scalar >::Vector3s |
typedef MathBase::VectorXs sobec::ResidualModelCoMVelocityTpl< _Scalar >::VectorXs |
sobec::ResidualModelCoMVelocityTpl< Scalar >::ResidualModelCoMVelocityTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const Vector3s & | vref, | ||
const std::size_t | nu | ||
) |
Initialize the CoM velocity residual model.
[in] | state | State of the multibody system |
[in] | vref | Reference CoM velocity |
[in] | nu | Dimension of the control vector |
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()
.
[in] | state | State of the multibody system |
[in] | vref | Reference CoM velocity |
|
virtual |
|
virtual |
Compute 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 |
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 MathBaseTpl< Scalar >::Vector3s & sobec::ResidualModelCoMVelocityTpl< Scalar >::get_reference |
Return the CoM velocity reference.
void sobec::ResidualModelCoMVelocityTpl< Scalar >::set_reference | ( | const Vector3s & | vref | ) |
Modify the CoM velocity reference.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar sobec::ResidualModelCoMVelocityTpl< _Scalar >::Scalar |