expose-crba.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS
3 //
4 
6 #include "pinocchio/algorithm/crba.hpp"
7 
8 namespace pinocchio
9 {
10  namespace python
11  {
12  static Eigen::MatrixXd crba_proxy(const Model & model,
13  Data & data,
14  const Eigen::VectorXd & q)
15  {
16  data.M.fill(0);
17  crba(model,data,q);
18  data.M.triangularView<Eigen::StrictlyLower>()
19  = data.M.transpose().triangularView<Eigen::StrictlyLower>();
20  return data.M;
21  }
22 
23  void exposeCRBA()
24  {
25  bp::def("crba",crba_proxy,
26  bp::args("model","data","q"),
27  "Computes CRBA, store the result in Data and return it.\n"
28  "Parameters:\n"
29  "\tmodel: model of the kinematic tree\n"
30  "\tdata: data related to the model\n"
31  "\tq: the joint configuration vector (size model.nq)\n");
32  }
33 
34  } // namespace python
35 } // namespace pinocchio
const DataTpl< Scalar, Options, JointCollectionTpl >::MatrixXs & crba(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Computes the upper triangular part of the joint space inertia matrix M by using the Composite Rigid B...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
MatrixXs M
The joint space inertia matrix (a square matrix of dim model.nv).
Main pinocchio namespace.
Definition: timings.cpp:28
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXd
Definition: conversions.cpp:14
JointCollectionTpl & model
static Eigen::MatrixXd crba_proxy(const Model &model, Data &data, const Eigen::VectorXd &q)
Definition: expose-crba.cpp:12


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