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


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:29