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

Function Documentation

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

Computes the mechanical energy of the system stored in data.mechanical_energy. The result is accessible through data.kinetic_energy.

Template Parameters:

JointCollection – Collection of Joint types.

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

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

Returns:

The total mechanal energy of the system in [J].