expose-energy.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
7 
8 namespace pinocchio
9 {
10  namespace python
11  {
12 
13  void exposeEnergy()
14  {
15  typedef context::Scalar Scalar;
17  enum
18  {
20  };
21 
22  bp::def(
23  "computeKineticEnergy",
24  &computeKineticEnergy<Scalar, Options, JointCollectionDefaultTpl, VectorXs, VectorXs>,
25  bp::args("model", "data", "q", "v"),
26  "Computes the forward kinematics and the kinematic energy of the system for the "
27  "given joint configuration and velocity given as input. The result is accessible "
28  "through data.kinetic_energy.");
29 
30  bp::def(
31  "computeKineticEnergy", &computeKineticEnergy<Scalar, Options, JointCollectionDefaultTpl>,
32  bp::args("model", "data"),
33  "Computes the kinematic energy of the system for the "
34  "given joint placement and velocity stored in data. The result is accessible through "
35  "data.kinetic_energy.");
36 
37  bp::def(
38  "computePotentialEnergy",
39  &computePotentialEnergy<Scalar, Options, JointCollectionDefaultTpl, VectorXs>,
40  bp::args("model", "data", "q"),
41  "Computes the potential energy of the system for the "
42  "given the joint configuration given as input. The result is accessible through "
43  "data.potential_energy.");
44 
45  bp::def(
46  "computePotentialEnergy",
47  &computePotentialEnergy<Scalar, Options, JointCollectionDefaultTpl>,
48  bp::args("model", "data"),
49  "Computes the potential energy of the system for the "
50  "given joint placement stored in data. The result is accessible through "
51  "data.potential_energy.");
52 
53  bp::def(
54  "computeMechanicalEnergy",
55  &computeMechanicalEnergy<Scalar, Options, JointCollectionDefaultTpl, VectorXs, VectorXs>,
56  bp::args("model", "data", "q", "v"),
57  "Computes the forward kinematics and the kinematic energy of the system for the "
58  "given joint configuration and velocity given as input. The result is accessible through "
59  "data.mechanical_energy.\n"
60  "A byproduct of this function is the computation of both data.kinetic_energy and "
61  "data.potential_energy too.");
62 
63  bp::def(
64  "computeMechanicalEnergy",
65  &computeMechanicalEnergy<Scalar, Options, JointCollectionDefaultTpl>,
66  bp::args("model", "data"),
67  "Computes the mechanical energy of the system for the "
68  "given joint placement and velocity stored in data. The result is accessible through "
69  "data.mechanical_energy.\n"
70  "A byproduct of this function is the computation of both data.kinetic_energy and "
71  "data.potential_energy too.");
72  }
73 
74  } // namespace python
75 } // namespace pinocchio
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::python::VectorXs
context::VectorXs VectorXs
Definition: admm-solver.cpp:30
pinocchio::python::exposeEnergy
void exposeEnergy()
Definition: expose-energy.cpp:13
pinocchio::python::Options
@ Options
Definition: expose-contact-inverse-dynamics.cpp:22
pinocchio::context::VectorXs
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > VectorXs
Definition: context/generic.hpp:47
algorithms.hpp
python
pinocchio::python::context::Options
@ Options
Definition: bindings/python/context/generic.hpp:40
energy.hpp
pinocchio::python::context::Scalar
PINOCCHIO_PYTHON_SCALAR_TYPE Scalar
Definition: bindings/python/context/generic.hpp:37
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:29