expose-cat.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 //
4 
6 #include "pinocchio/algorithm/compute-all-terms.hpp"
7 
8 namespace pinocchio
9 {
10  namespace python
11  {
12  static void computeAllTerms_proxy(const Model & model,
13  Data & data,
14  const Eigen::VectorXd & q,
15  const Eigen::VectorXd & v)
16  {
17  data.M.fill(0);
18  computeAllTerms(model,data,q,v);
19  data.M.triangularView<Eigen::StrictlyLower>()
20  = data.M.transpose().triangularView<Eigen::StrictlyLower>();
21  }
22 
23  void exposeCAT()
24  {
25  bp::def("computeAllTerms",computeAllTerms_proxy,
26  bp::args("model","data","q","v"),
27  "Compute all the terms M, non linear effects, center of mass quantities, centroidal quantities and Jacobians in"
28  "in the same loop and store the results in data.\n"
29  "This algorithm is equivalent to calling:\n"
30  "\t- forwardKinematics\n"
31  "\t- crba\n"
32  "\t- nonLinearEffects\n"
33  "\t- computeJointJacobians\n"
34  "\t- centerOfMass\n"
35  "\t- jacobianCenterOfMass\n"
36  "\t- ccrba\n"
37  "\t- computeKineticEnergy\n"
38  "\t- computePotentialEnergy\n"
39  "\t- computeGeneralizedGravity\n"
40  "Parameters:\n"
41  "\tmodel: model of the kinematic tree\n"
42  "\tdata: data related to the model\n"
43  "\tq: the joint configuration vector (size model.nq)\n"
44  "\tv: the joint velocity vector (size model.nv)\n"
45  );
46  }
47  } // namespace python
48 } // namespace pinocchio
void computeAllTerms(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Computes efficiently all the terms needed for dynamic simulation. It is equivalent to the call at the...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
MatrixXs M
The joint space inertia matrix (a square matrix of dim model.nv).
static void computeAllTerms_proxy(const Model &model, Data &data, const Eigen::VectorXd &q, const Eigen::VectorXd &v)
Definition: expose-cat.cpp:12
Main pinocchio namespace.
Definition: timings.cpp:30
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXd
Definition: conversions.cpp:14
JointCollectionTpl & model


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