Centroidal-momentum task model. More...
#include <centroidal-momentum.hpp>
Public Types | |
| typedef TaskModelAbstractTpl< Scalar > | Base |
| typedef TaskDataCentroidalMomentumTpl< Scalar > | Data |
| typedef DataCollectorAbstractTpl< Scalar > | DataCollectorAbstract |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef StateMultibodyTpl< Scalar > | StateMultibody |
| typedef TaskDataAbstractTpl< Scalar > | TaskDataAbstract |
| typedef MathBase::Vector6s | Vector6s |
| typedef MathBase::VectorXs | VectorXs |
| Public Types inherited from TaskModelAbstractTpl< _Scalar > | |
| typedef DataCollectorAbstractTpl< Scalar > | DataCollectorAbstract |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef StateAbstractTpl< Scalar > | StateAbstract |
| typedef TaskDataAbstractTpl< Scalar > | TaskDataAbstract |
| typedef MathBase::VectorXs | VectorXs |
Public Member Functions | |
| TaskModelCentroidalMomentumTpl (std::shared_ptr< StateMultibody > state, const Vector6s &href) | |
| Initialize with a constant momentum reference. | |
| TaskModelCentroidalMomentumTpl (std::shared_ptr< StateMultibody > state, const Vector6s &href, const std::size_t nu) | |
| Initialize with a constant momentum reference. | |
| TaskModelCentroidalMomentumTpl (std::shared_ptr< StateMultibody > state, const Vector6s &href, const Vector6s &hdot_ref) | |
| Initialize with momentum and momentum-rate references. | |
| TaskModelCentroidalMomentumTpl (std::shared_ptr< StateMultibody > state, const Vector6s &href, const Vector6s &hdot_ref, const std::size_t nu) | |
| Initialize with momentum and momentum-rate references. | |
| virtual void | calc (const std::shared_ptr< TaskDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) override |
| Compute the task quantity, rate, and acceleration. | |
| virtual void | calcDiff (const std::shared_ptr< TaskDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) override |
| Compute task Jacobians using values stored by calc(). | |
| template<typename NewScalar> | |
| TaskModelCentroidalMomentumTpl< NewScalar > | cast () const |
| virtual std::shared_ptr< TaskDataAbstract > | createData (DataCollectorAbstract *const data) override |
| Allocate task data and bind it to the action model's shared data. | |
| const Vector6s & | get_rate_reference () const |
| const Vector6s & | get_reference () const |
| virtual void | print (std::ostream &os) const override |
| Print relevant information about the task model. | |
| void | set_rate_reference (const Vector6s &hdot_ref) |
| void | set_reference (const Vector6s &href) |
| Public Member Functions inherited from TaskModelAbstractTpl< _Scalar > | |
| TaskModelAbstractTpl (std::shared_ptr< StateAbstract > state, const std::size_t nr, const std::size_t nu, const bool q_dependent=true, const bool v_dependent=true, const bool u_dependent=true, const bool has_acceleration=true) | |
| Initialize the task model. | |
| bool | get_has_acceleration () const |
| Return whether the task defines an acceleration component. | |
| std::size_t | get_nr () const |
| std::size_t | get_nu () const |
| bool | get_q_dependent () const |
| const std::shared_ptr< StateAbstract > & | get_state () const |
| bool | get_u_dependent () const |
| bool | get_v_dependent () const |
Public Attributes | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
| Public Attributes inherited from TaskModelAbstractTpl< _Scalar > | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Protected Attributes | |
| std::size_t | nr_ |
| std::size_t | nu_ |
| std::shared_ptr< StateAbstract > | state_ |
| Protected Attributes inherited from TaskModelAbstractTpl< _Scalar > | |
| bool | has_acceleration_ |
| std::size_t | nr_ |
| std::size_t | nu_ |
| bool | q_dependent_ |
| std::shared_ptr< StateAbstract > | state_ |
| bool | u_dependent_ |
| bool | v_dependent_ |
Centroidal-momentum task model.
The task quantity and rate are
![\[ y = h-h_{\mathrm{ref}}, \qquad
v = \dot h-\dot h_{\mathrm{ref}},
\]](form_418.png)
with
![\[ h=A_g(q)\dot q, \qquad
\dot h=\dot A_g(q,\dot q)\dot q+A_g(q)\ddot q.
\]](form_419.png)
The model is first-order only: a centroidal-momentum acceleration would require generalized jerk, which is not supplied by differential action models. Therefore, a, Ax, and Au remain zero.
The momentum and momentum-rate values, as well as their partial derivatives at fixed generalized acceleration, are read from the shared Pinocchio data. When shared joint data is available, its acceleration derivatives are used to apply the chain rule with respect to the action-model variables.
Definition at line 42 of file centroidal-momentum.hpp.
| typedef MathBaseTpl<Scalar> MathBase |
Definition at line 48 of file centroidal-momentum.hpp.
| typedef TaskModelAbstractTpl<Scalar> Base |
Definition at line 49 of file centroidal-momentum.hpp.
| typedef TaskDataCentroidalMomentumTpl<Scalar> Data |
Definition at line 50 of file centroidal-momentum.hpp.
| typedef TaskDataAbstractTpl<Scalar> TaskDataAbstract |
Definition at line 51 of file centroidal-momentum.hpp.
| typedef DataCollectorAbstractTpl<Scalar> DataCollectorAbstract |
Definition at line 52 of file centroidal-momentum.hpp.
| typedef StateMultibodyTpl<Scalar> StateMultibody |
Definition at line 53 of file centroidal-momentum.hpp.
| typedef MathBase::Vector6s Vector6s |
Definition at line 54 of file centroidal-momentum.hpp.
| typedef MathBase::VectorXs VectorXs |
Definition at line 55 of file centroidal-momentum.hpp.
| TaskModelCentroidalMomentumTpl | ( | std::shared_ptr< StateMultibody > | state, |
| const Vector6s & | href, | ||
| const Vector6s & | hdot_ref, | ||
| const std::size_t | nu ) |
Initialize with momentum and momentum-rate references.
| [in] | state | State of the multibody system |
| [in] | href | Reference centroidal momentum |
| [in] | hdot_ref | Reference centroidal-momentum rate |
| [in] | nu | Dimension of the control vector |
| TaskModelCentroidalMomentumTpl | ( | std::shared_ptr< StateMultibody > | state, |
| const Vector6s & | href, | ||
| const Vector6s & | hdot_ref ) |
Initialize with momentum and momentum-rate references.
The default control dimension is state.nv.
| [in] | state | State of the multibody system |
| [in] | href | Reference centroidal momentum |
| [in] | hdot_ref | Reference centroidal-momentum rate |
| TaskModelCentroidalMomentumTpl | ( | std::shared_ptr< StateMultibody > | state, |
| const Vector6s & | href, | ||
| const std::size_t | nu ) |
Initialize with a constant momentum reference.
The momentum-rate reference is zero.
| [in] | state | State of the multibody system |
| [in] | href | Reference centroidal momentum |
| [in] | nu | Dimension of the control vector |
| TaskModelCentroidalMomentumTpl | ( | std::shared_ptr< StateMultibody > | state, |
| const Vector6s & | href ) |
Initialize with a constant momentum reference.
The momentum-rate reference is zero and the default control dimension is state.nv.
| [in] | state | State of the multibody system |
| [in] | href | Reference centroidal momentum |
| overridevirtual |
Compute the task quantity, rate, and acceleration.
Implements TaskModelAbstractTpl< _Scalar >.
| overridevirtual |
Compute task Jacobians using values stored by calc().
Implements TaskModelAbstractTpl< _Scalar >.
| overridevirtual |
Allocate task data and bind it to the action model's shared data.
Reimplemented from TaskModelAbstractTpl< _Scalar >.
| overridevirtual |
Print relevant information about the task model.
Reimplemented from TaskModelAbstractTpl< _Scalar >.
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar |
Definition at line 47 of file centroidal-momentum.hpp.
| protected |
Definition at line 114 of file task-base.hpp.
| protected |
Definition at line 115 of file task-base.hpp.
| protected |
Definition at line 113 of file task-base.hpp.