Template Function pinocchio::computeTotalMass(const ModelTpl<Scalar, Options, JointCollectionTpl>&, DataTpl<Scalar, Options, JointCollectionTpl>&)

Function Documentation

template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
inline Scalar pinocchio::computeTotalMass(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data)

Compute the total mass of the model, put it in data.mass[0] and return it.

Warning

This method does not fill the whole data.mass vector. Only data.mass[0] is updated. If you need the whole data.mass vector to be computed, use computeSubtreeMasses

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

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

Returns:

Total mass of the model.