expose-kinematics.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 //
4 
7 
8 namespace pinocchio
9 {
10  namespace python
11  {
12 
14  {
15  typedef context::Scalar Scalar;
17  enum
18  {
20  };
21 
22  bp::def(
23  "updateGlobalPlacements",
24  &updateGlobalPlacements<Scalar, Options, JointCollectionDefaultTpl>,
25  bp::args("model", "data"),
26  "Updates the global placements of all joint frames of the kinematic "
27  "tree and store the results in data according to the relative placements of the joints.\n\n"
28  "Parameters:\n"
29  "\tmodel: model of the kinematic tree\n"
30  "\tdata: data related to the model\n");
31 
32  bp::def(
33  "getVelocity", &getVelocity<Scalar, Options, JointCollectionDefaultTpl>,
34  (bp::arg("model"), bp::arg("data"), bp::arg("joint_id"),
35  bp::arg("reference_frame") = LOCAL),
36  "Returns the spatial velocity of the joint expressed in the coordinate system given "
37  "by reference_frame.\n"
38  "forwardKinematics(model,data,q,v[,a]) should be called first to compute the joint "
39  "spatial velocity stored in data.v");
40 
41  bp::def(
42  "getAcceleration", &getAcceleration<Scalar, Options, JointCollectionDefaultTpl>,
43  (bp::arg("model"), bp::arg("data"), bp::arg("joint_id"),
44  bp::arg("reference_frame") = LOCAL),
45  "Returns the spatial acceleration of the joint expressed in the coordinate system "
46  "given by reference_frame.\n"
47  "forwardKinematics(model,data,q,v,a) should be called first to compute the joint "
48  "spatial acceleration stored in data.a .");
49 
50  bp::def(
51  "getClassicalAcceleration",
52  &getClassicalAcceleration<Scalar, Options, JointCollectionDefaultTpl>,
53  (bp::arg("model"), bp::arg("data"), bp::arg("joint_id"),
54  bp::arg("reference_frame") = LOCAL),
55  "Returns the \"classical\" acceleration of the joint expressed in the coordinate "
56  "system given by reference_frame.\n"
57  "forwardKinematics(model,data,q,v,a) should be called first to compute the joint "
58  "spatial acceleration stored in data.a .");
59 
60  bp::def(
61  "forwardKinematics",
62  &forwardKinematics<Scalar, Options, JointCollectionDefaultTpl, VectorXs>,
63  bp::args("model", "data", "q"),
64  "Compute the global placements of all the joints of the kinematic "
65  "tree and store the results in data.\n\n"
66  "Parameters:\n"
67  "\tmodel: model of the kinematic tree\n"
68  "\tdata: data related to the model\n"
69  "\tq: the joint configuration vector (size model.nq)\n");
70 
71  bp::def(
72  "forwardKinematics",
73  &forwardKinematics<Scalar, Options, JointCollectionDefaultTpl, VectorXs, VectorXs>,
74  bp::args("model", "data", "q", "v"),
75  "Compute the global placements and local spatial velocities of all the joints of the "
76  "kinematic "
77  "tree and store the results in data.\n\n"
78  "Parameters:\n"
79  "\tmodel: model of the kinematic tree\n"
80  "\tdata: data related to the model\n"
81  "\tq: the joint configuration vector (size model.nq)\n"
82  "\tv: the joint velocity vector (size model.nv)\n");
83 
84  bp::def(
85  "forwardKinematics",
88  bp::args("model", "data", "q", "v", "a"),
89  "Compute the global placements, local spatial velocities and spatial accelerations "
90  "of all the joints of the kinematic "
91  "tree and store the results in data.\n\n"
92  "Parameters:\n"
93  "\tmodel: model of the kinematic tree\n"
94  "\tdata: data related to the model\n"
95  "\tq: the joint configuration vector (size model.nq)\n"
96  "\tv: the joint velocity vector (size model.nv)\n"
97  "\ta: the joint acceleration vector (size model.nv)\n");
98  }
99 
100  } // namespace python
101 } // namespace pinocchio
pinocchio::python::exposeKinematics
void exposeKinematics()
Definition: expose-kinematics.cpp:13
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
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::python::VectorXs
context::VectorXs VectorXs
Definition: admm-solver.cpp:30
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
pinocchio::JointCollectionDefaultTpl
Definition: context/generic.hpp:15
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::LOCAL
@ LOCAL
Definition: multibody/fwd.hpp:50


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:09