pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
energy.hpp
1//
2// Copyright (c) 2016-2020 CNRS INRIA
3//
4
5#pragma once
6
7// IWYU pragma: begin_keep
8#include <Eigen/Core>
9
10#include <cassert>
11#include <vector>
12
13#include <boost/fusion/container/vector.hpp>
14
15#include "pinocchio/multibody.hpp"
16#include "pinocchio/multibody/joint.hpp"
17#include "pinocchio/multibody/visitor.hpp"
18
19#include "pinocchio/algorithm/check.hpp"
20#include "pinocchio/algorithm/kinematics.hpp"
21// IWYU pragma: end_keep
22
23namespace pinocchio
24{
25
37 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
39 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
40 DataTpl<Scalar, Options, JointCollectionTpl> & data);
41
57 template<
58 typename Scalar,
59 int Options,
60 template<typename, int> class JointCollectionTpl,
61 typename ConfigVectorType,
62 typename TangentVectorType>
64 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
65 DataTpl<Scalar, Options, JointCollectionTpl> & data,
66 const Eigen::MatrixBase<ConfigVectorType> & q,
67 const Eigen::MatrixBase<TangentVectorType> & v);
68
88 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
90 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
91 DataTpl<Scalar, Options, JointCollectionTpl> & data);
92
112 template<
113 typename Scalar,
114 int Options,
115 template<typename, int> class JointCollectionTpl,
116 typename ConfigVectorType>
118 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
119 DataTpl<Scalar, Options, JointCollectionTpl> & data,
120 const Eigen::MatrixBase<ConfigVectorType> & q);
121
133 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
135 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
136 DataTpl<Scalar, Options, JointCollectionTpl> & data);
137
154 template<
155 typename Scalar,
156 int Options,
157 template<typename, int> class JointCollectionTpl,
158 typename ConfigVectorType,
159 typename TangentVectorType>
161 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
162 DataTpl<Scalar, Options, JointCollectionTpl> & data,
163 const Eigen::MatrixBase<ConfigVectorType> & q,
164 const Eigen::MatrixBase<TangentVectorType> & v);
165
166} // namespace pinocchio
167
168// IWYU pragma: begin_exports
169#include "pinocchio/src/algorithm/energy.hxx"
170// IWYU pragma: end_exports
Main pinocchio namespace.
Definition treeview.dox:11
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....
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.