energy.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_energy_hpp__
6 #define __pinocchio_algorithm_energy_hpp__
7 
12 
13 namespace pinocchio {
14 
26  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
27  inline Scalar
28  computeKineticEnergy(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
29  DataTpl<Scalar,Options,JointCollectionTpl> & data);
30 
46  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType>
47  inline Scalar
50  const Eigen::MatrixBase<ConfigVectorType> & q,
51  const Eigen::MatrixBase<TangentVectorType> & v)
52  {
53  forwardKinematics(model,data,q.derived(),v.derived());
55  }
56 
73  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType>
74  PINOCCHIO_DEPRECATED
75  inline Scalar
78  const Eigen::MatrixBase<ConfigVectorType> & q,
79  const Eigen::MatrixBase<TangentVectorType> & v,
80  const bool update_kinematics)
81  {
82  if(update_kinematics)
83  return computeKineticEnergy(model,data,q.derived(),v.derived());
84  else
86  }
87 
106  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
107  inline Scalar
108  computePotentialEnergy(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
109  DataTpl<Scalar,Options,JointCollectionTpl> & data);
110 
129  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
130  inline Scalar
133  const Eigen::MatrixBase<ConfigVectorType> & q)
134  {
137  }
138 
153  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
154  PINOCCHIO_DEPRECATED
155  inline Scalar
158  const Eigen::MatrixBase<ConfigVectorType> & q,
159  const bool update_kinematics)
160  {
161  if(update_kinematics)
163  else
165  }
166 }
167 
168 #include "pinocchio/algorithm/energy.hxx"
169 
170 #endif // __pinocchio_algorithm_energy_hpp__
pinocchio::computePotentialEnergy
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....
pinocchio::DataTpl
Definition: multibody/data.hpp:29
pinocchio::forwardKinematics
void forwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Update the joint placements according to the current joint configuration.
kinematics.hpp
model.hpp
setup.data
data
Definition: cmake/cython/setup.in.py:48
pinocchio::python::Scalar
SE3::Scalar Scalar
Definition: conversions.cpp:15
data.hpp
pinocchio::kineticEnergy
PINOCCHIO_DEPRECATED Scalar kineticEnergy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const bool update_kinematics)
Computes the kinetic energy of the system. The result is accessible through data.kinetic_energy.
Definition: energy.hpp:76
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:747
pinocchio::computeKineticEnergy
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.
check.hpp
pinocchio::v
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Definition: joint-configuration.hpp:748
pinocchio::potentialEnergy
PINOCCHIO_DEPRECATED Scalar potentialEnergy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const bool update_kinematics)
Computes the potential energy of the system, i.e. the potential energy linked to the gravity field....
Definition: energy.hpp:156
pinocchio::ModelTpl< Scalar, Options, JointCollectionTpl >
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:746
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:28


pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:58