Template Function pinocchio::computePotentialEnergy(const ModelTpl<Scalar, Options, JointCollectionTpl>&, DataTpl<Scalar, Options, JointCollectionTpl>&)
Defined in File energy.hxx
Function Documentation
-
template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
Scalar pinocchio::computePotentialEnergy(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data) Computes the potential energy of the system, i.e. the potential energy linked to the gravity field. The result is accessible through data.potential_energy.
Note
This potential energy are of the for
where: is the mass of the body , is the height of the body , is the gravity value.
- Template Parameters:
JointCollection – Collection of Joint types.
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 potential energy of the system expressed in [J].