pinocchio  3.6.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
energy.hpp
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_energy_hpp__
6 #define __pinocchio_algorithm_energy_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 #include "pinocchio/algorithm/kinematics.hpp"
11 #include "pinocchio/algorithm/check.hpp"
12 
13 namespace pinocchio
14 {
15 
27  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
31 
47  template<
48  typename Scalar,
49  int Options,
50  template<typename, int> class JointCollectionTpl,
51  typename ConfigVectorType,
52  typename TangentVectorType>
56  const Eigen::MatrixBase<ConfigVectorType> & q,
57  const Eigen::MatrixBase<TangentVectorType> & v);
58 
78  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
82 
102  template<
103  typename Scalar,
104  int Options,
105  template<typename, int> class JointCollectionTpl,
106  typename ConfigVectorType>
110  const Eigen::MatrixBase<ConfigVectorType> & q);
111 
123  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
127 
144  template<
145  typename Scalar,
146  int Options,
147  template<typename, int> class JointCollectionTpl,
148  typename ConfigVectorType,
149  typename TangentVectorType>
153  const Eigen::MatrixBase<ConfigVectorType> & q,
154  const Eigen::MatrixBase<TangentVectorType> & v);
155 
156 } // namespace pinocchio
157 
158 #include "pinocchio/algorithm/energy.hxx"
159 
160 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
161  #include "pinocchio/algorithm/energy.txx"
162 #endif // PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
163 
164 #endif // __pinocchio_algorithm_energy_hpp__
Main pinocchio namespace.
Definition: treeview.dox:11
Scalar computeKineticEnergy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data)
Computes the kinetic energy of the system. The result is accessible through data.kinetic_energy.
Scalar 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 accessib...
Scalar 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....