expose-energy.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
6 #include "pinocchio/algorithm/energy.hpp"
7 
8 namespace pinocchio
9 {
10  namespace python
11  {
12 
13  void exposeEnergy()
14  {
15  using namespace Eigen;
16 
17  bp::def("computeKineticEnergy",
18  &computeKineticEnergy<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
19  bp::args("model","data","q","v"),
20  "Computes the forward kinematics and the kinematic energy of the model for the "
21  "given joint configuration and velocity given as input. The result is accessible through data.kinetic_energy.");
22 
23  bp::def("computeKineticEnergy",
24  &computeKineticEnergy<double,0,JointCollectionDefaultTpl>,
25  bp::args("model","data"),
26  "Computes the kinematic energy of the model for the "
27  "given joint placement and velocity stored in data. The result is accessible through data.kinetic_energy.");
28 
29  bp::def("computePotentialEnergy",
30  &computePotentialEnergy<double,0,JointCollectionDefaultTpl,VectorXd>,
31  bp::args("model","data","q"),
32  "Computes the potential energy of the model for the "
33  "given the joint configuration given as input. The result is accessible through data.potential_energy.");
34 
35  bp::def("computePotentialEnergy",
36  &computePotentialEnergy<double,0,JointCollectionDefaultTpl>,
37  bp::args("model","data"),
38  "Computes the potential energy of the model for the "
39  "given joint placement stored in data. The result is accessible through data.potential_energy.");
40  }
41 
42  } // namespace python
43 } // namespace pinocchio
Main pinocchio namespace.
Definition: timings.cpp:28


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:29