expose-cholesky.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019 CNRS INRIA
3 //
4 
7 #include "pinocchio/algorithm/cholesky.hpp"
8 
9 namespace pinocchio
10 {
11  namespace python
12  {
13 
15  {
16  using namespace Eigen;
17  using namespace pinocchio::cholesky;
18 
19  {
20  // using the cholesky scope
21  bp::scope current_scope = getOrCreatePythonNamespace("cholesky");
22 
23  bp::def("decompose",
24  &decompose<double,0,JointCollectionDefaultTpl>,
25  bp::args("Model","Data"),
26  "Computes the Cholesky decomposition of the joint space inertia matrix M contained in data.\n"
27  "The upper triangular part of data.M should have been filled first by calling crba, or any related algorithms.",
28  bp::return_value_policy<bp::return_by_value>());
29 
30  bp::def("solve",
31  &solve<double,0,JointCollectionDefaultTpl,VectorXd>,
32  bp::args("Model","Data","v"),
33  "Returns the solution \f$x\f$ of \f$ M x = y \f$ using the Cholesky decomposition stored in data given the entry \f$ y \f$.",
34  bp::return_value_policy<bp::return_by_value>());
35 
36  bp::def("computeMinv",
37  &pinocchio::cholesky::computeMinv<double,0,JointCollectionDefaultTpl>,
38  bp::args("Model","Data"),
39  "Returns the inverse of the inverse of the joint space inertia matrix using the results of the Cholesky decomposition\n"
40  "performed by cholesky.decompose. The result is stored in data.Minv.",
41  bp::return_value_policy<bp::return_by_value>());
42  }
43 
44  }
45 
46  } // namespace python
47 } // namespace pinocchio
Cholesky decompositions.
boost::python::object getOrCreatePythonNamespace(const std::string &submodule_name)
Helper to create or simply return an existing namespace in Python.
Definition: namespace.hpp:22
Main pinocchio namespace.
Definition: timings.cpp:30


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