Template Function pinocchio::computeGeneralizedGravityDerivatives

Function Documentation

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

Computes the partial derivative of the generalized gravity contribution with respect to the joint configuration.

Remark

gravity_partial_dq must be first initialized with zeros (gravity_partial_dq.setZero).

Template Parameters:
  • JointCollection – Collection of Joint types.

  • ConfigVectorType – Type of the joint configuration vector.

  • ReturnMatrixType – Type of the matrix containing the partial derivative of the gravity vector with respect to 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).

  • gravity_partial_dq[out] Partial derivative of the generalized gravity vector with respect to the joint configuration.