Template Function pinocchio::computeGeneralizedGravity

Function Documentation

template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl, typename ConfigVectorType>
inline const DataTpl<Scalar, Options, JointCollectionTpl>::TangentVectorType &pinocchio::computeGeneralizedGravity(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data, const Eigen::MatrixBase<ConfigVectorType> &q)

Computes the generalized gravity contribution \( g(q) \) of the Lagrangian dynamics:

Note

This function is equivalent to pinocchio::rnea(model, data, q, 0, 0).

Template Parameters:
  • JointCollection – Collection of Joint types.

  • ConfigVectorType – Type of the joint configuration vector.

Parameters:
  • model[in] The model structure of the rigid body system.

  • data[in] The data structure of the rigid body system.

  • q[in] The joint configuration vector (dim model.nq).

Returns:

The generalized gravity torque stored in data.g.