expose-cholesky.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019-2020 CNRS INRIA
3 //
4 
8 
10 
11 namespace pinocchio
12 {
13  namespace python
14  {
15 
17  {
18  using namespace Eigen;
19  using namespace pinocchio::cholesky;
20 
21  {
22  typedef context::Scalar Scalar;
24  enum
25  {
27  };
28 
29  // using the cholesky scope
30  bp::scope current_scope = getOrCreatePythonNamespace("cholesky");
31 
32  bp::def(
33  "decompose", &decompose<Scalar, Options, JointCollectionDefaultTpl>,
34  bp::args("Model", "Data"),
35  "Computes the Cholesky decomposition of the joint space inertia matrix M contained "
36  "in data.\n"
37  "The upper triangular part of data.M should have been filled first by calling "
38  "crba, or any related algorithms.",
39  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
40 
41  bp::def(
42  "solve", &solve<Scalar, Options, JointCollectionDefaultTpl, VectorXs>,
43  bp::args("Model", "Data", "v"),
44  "Returns the solution \f$x\f$ of \f$ M x = y \f$ using the Cholesky decomposition "
45  "stored in data given the entry \f$ y \f$.",
46  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
47 
48  bp::def(
49  "computeMinv", &computeMinv<Scalar, Options, JointCollectionDefaultTpl>,
50  bp::args("Model", "Data"),
51  "Returns the inverse of the joint space inertia matrix using the results of the "
52  "Cholesky decomposition\n"
53  "performed by cholesky.decompose. The result is stored in data.Minv.",
54  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
55  }
56  }
57 
58  } // namespace python
59 } // namespace pinocchio
Eigen
pinocchio::python::Options
@ Options
Definition: expose-contact-inverse-dynamics.cpp:24
pinocchio::python::exposeCholesky
void exposeCholesky()
Definition: expose-cholesky.cpp:16
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::python::VectorXs
context::VectorXs VectorXs
Definition: admm-solver.cpp:30
pinocchio::python::getOrCreatePythonNamespace
boost::python::object getOrCreatePythonNamespace(const std::string &submodule_name)
Helper to create or simply return an existing namespace in Python.
Definition: namespace.hpp:34
pinocchio::python::context::Options
@ Options
Definition: bindings/python/context/generic.hpp:40
algorithms.hpp
python
pinocchio::cholesky
Cholesky decompositions.
cholesky.hpp
pinocchio::python::mimic_not_supported_function
Definition: model-checker.hpp:22
model-checker.hpp
pinocchio::python::context::Scalar
PINOCCHIO_PYTHON_SCALAR_TYPE Scalar
Definition: bindings/python/context/generic.hpp:37
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:33
namespace.hpp


pinocchio
Author(s):
autogenerated on Wed Apr 16 2025 02:41:46