expose-kinematics.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
6 #include "pinocchio/algorithm/kinematics.hpp"
7 
8 namespace pinocchio
9 {
10  namespace python
11  {
12 
13  BOOST_PYTHON_FUNCTION_OVERLOADS(getVelocity_overload, (getVelocity<double,0,JointCollectionDefaultTpl>), 3, 4)
14  BOOST_PYTHON_FUNCTION_OVERLOADS(getAcceleration_overload, (getAcceleration<double,0,JointCollectionDefaultTpl>), 3, 4)
15  BOOST_PYTHON_FUNCTION_OVERLOADS(getClassicalAcceleration_overload, (getClassicalAcceleration<double,0,JointCollectionDefaultTpl>), 3, 4)
16 
18  {
19  using namespace Eigen;
20  bp::def("updateGlobalPlacements",
21  &updateGlobalPlacements<double,0,JointCollectionDefaultTpl>,
22  bp::args("model","data"),
23  "Updates the global placements of all joint frames of the kinematic "
24  "tree and store the results in data according to the relative placements of the joints.\n\n"
25  "Parameters:\n"
26  "\tmodel: model of the kinematic tree\n"
27  "\tdata: data related to the model\n");
28 
29  bp::def("getVelocity",
30  &getVelocity<double,0,JointCollectionDefaultTpl>,
31  getVelocity_overload(
32  bp::args("model","data","joint_id","reference_frame"),
33  "Returns the spatial velocity of the joint expressed in the coordinate system given by reference_frame.\n"
34  "forwardKinematics(model,data,q,v[,a]) should be called first to compute the joint spatial velocity stored in data.v"));
35 
36  bp::def("getAcceleration",
37  &getAcceleration<double,0,JointCollectionDefaultTpl>,
38  getAcceleration_overload(
39  bp::args("model","data","joint_id","reference_frame"),
40  "Returns the spatial acceleration of the joint expressed in the coordinate system given by reference_frame.\n"
41  "forwardKinematics(model,data,q,v,a) should be called first to compute the joint spatial acceleration stored in data.a ."));
42 
43  bp::def("getClassicalAcceleration",
44  &getClassicalAcceleration<double,0,JointCollectionDefaultTpl>,
45  getClassicalAcceleration_overload(
46  bp::args("model","data","joint_id","reference_frame"),
47  "Returns the \"classical\" acceleration of the joint expressed in the coordinate system given by reference_frame.\n"
48  "forwardKinematics(model,data,q,v,a) should be called first to compute the joint spatial acceleration stored in data.a ."));
49 
50  bp::def("forwardKinematics",
51  &forwardKinematics<double,0,JointCollectionDefaultTpl,VectorXd>,
52  bp::args("model","data","q"),
53  "Compute the global placements of all the joints of the kinematic "
54  "tree and store the results in data.\n\n"
55  "Parameters:\n"
56  "\tmodel: model of the kinematic tree\n"
57  "\tdata: data related to the model\n"
58  "\tq: the joint configuration vector (size model.nq)\n");
59 
60  bp::def("forwardKinematics",
61  &forwardKinematics<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
62  bp::args("model","data","q","v"),
63  "Compute the global placements and local spatial velocities of all the joints of the kinematic "
64  "tree and store the results in data.\n\n"
65  "Parameters:\n"
66  "\tmodel: model of the kinematic tree\n"
67  "\tdata: data related to the model\n"
68  "\tq: the joint configuration vector (size model.nq)\n"
69  "\tv: the joint velocity vector (size model.nv)\n");
70 
71  bp::def("forwardKinematics",
72  &forwardKinematics<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd,VectorXd>,
73  bp::args("model","data","q","v","a"),
74  "Compute the global placements, local spatial velocities and spatial accelerations of all the joints of the kinematic "
75  "tree and store the results in data.\n\n"
76  "Parameters:\n"
77  "\tmodel: model of the kinematic tree\n"
78  "\tdata: data related to the model\n"
79  "\tq: the joint configuration vector (size model.nq)\n"
80  "\tv: the joint velocity vector (size model.nv)\n"
81  "\ta: the joint acceleration vector (size model.nv)\n");
82  }
83 
84  } // namespace python
85 } // namespace pinocchio
BOOST_PYTHON_FUNCTION_OVERLOADS(computeKKTContactDynamicMatrixInverse_overload, computeKKTContactDynamicMatrixInverse_proxy, 4, 5) static const Eigen
MotionTpl< Scalar, Options > getClassicalAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointId, const ReferenceFrame rf=LOCAL)
Returns the "classical" acceleration of the joint expressed in the desired reference frame...
Main pinocchio namespace.
Definition: timings.cpp:30
MotionTpl< Scalar, Options > getAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointId, const ReferenceFrame rf=LOCAL)
Returns the spatial acceleration of the joint expressed in the desired reference frame. You must first call pinocchio::forwardKinematics to update placement, velocity and acceleration values in data structure.


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:02