expose-aba.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 //
4 
7 
11 
12 namespace pinocchio
13 {
14  namespace python
15  {
16 
19  {
21  make_symmetric(data.Minv);
22  return data.Minv;
23  }
24 
27  {
29  make_symmetric(data.Minv);
30  return data.Minv;
31  }
32 
33  void exposeABA()
34  {
35  typedef context::Scalar Scalar;
37  enum
38  {
40  };
41 
42  bp::def(
43  "computeMinverse", &computeMinverse_proxy, bp::args("model", "data", "q"),
44  "Computes the inverse of the joint space inertia matrix using an extension of the "
45  "Articulated Body algorithm.\n"
46  "The result is stored in data.Minv.\n"
47  "Parameters:\n"
48  "\t model: Model of the kinematic tree\n"
49  "\t data: Data related to the kinematic tree\n"
50  "\t q: joint configuration (size model.nq)",
51  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
52 
53  bp::def(
54  "aba", &aba<Scalar, Options, JointCollectionDefaultTpl, VectorXs, VectorXs, VectorXs>,
55  (bp::arg("model"), bp::arg("data"), bp::arg("q"), bp::arg("v"), bp::arg("tau"),
56  bp::arg("convention") = pinocchio::Convention::LOCAL),
57  "Compute ABA, store the result in data.ddq and return it.\n"
58  "Parameters:\n"
59  "\t model: Model of the kinematic tree\n"
60  "\t data: Data related to the kinematic tree\n"
61  "\t q: joint configuration (size model.nq)\n"
62  "\t tau: joint velocity (size model.nv)\n"
63  "\t v: joint torque (size model.nv)"
64  "\t convention: Convention to use",
65  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
66 
67  bp::def(
68  "aba",
69  &aba<
71  (bp::arg("model"), bp::arg("data"), bp::arg("q"), bp::arg("v"), bp::arg("tau"),
72  bp::arg("fext"), bp::arg("convention") = pinocchio::Convention::LOCAL),
73  "Compute ABA with external forces, store the result in data.ddq and return it.\n"
74  "Parameters:\n"
75  "\t model: Model of the kinematic tree\n"
76  "\t data: Data related to the kinematic tree\n"
77  "\t q: joint configuration (size model.nq)\n"
78  "\t v: joint velocity (size model.nv)\n"
79  "\t tau: joint torque (size model.nv)\n"
80  "\t fext: vector of external forces expressed in the local frame of the joint (size "
81  "model.njoints)"
82  "\t convention: Convention to use",
83  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
84 
85  bp::def(
86  "computeMinverse", &computeMinverse_min_proxy, bp::args("model", "data"),
87  "Computes the inverse of the joint space inertia matrix using an extension of the "
88  "Articulated Body algorithm.\n"
89  "The result is stored in data.Minv.\n"
90  "Remarks: pinocchio.aba should have been called first.\n"
91  "Parameters:\n"
92  "\t model: Model of the kinematic tree\n"
93  "\t data: Data related to the kinematic tree",
94  mimic_not_supported_function<bp::return_value_policy<bp::return_by_value>>(0));
95  }
96 
97  } // namespace python
98 } // namespace pinocchio
pinocchio::DataTpl
Definition: context/generic.hpp:25
pinocchio::DataTpl::RowMatrixXs
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor|Options > RowMatrixXs
Definition: multibody/data.hpp:99
pinocchio::python::Options
@ Options
Definition: expose-contact-inverse-dynamics.cpp:24
setup.data
data
Definition: cmake/cython/setup.in.py:48
pinocchio::python::computeMinverse_proxy
const context::Data::RowMatrixXs & computeMinverse_proxy(const context::Model &model, context::Data &data, const context::VectorXs &q)
Definition: expose-aba.cpp:17
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::aba
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & aba(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType1 > &v, const Eigen::MatrixBase< TangentVectorType2 > &tau, const Convention convention=Convention::LOCAL)
The Articulated-Body algorithm. It computes the forward dynamics, aka the joint accelerations given t...
pinocchio::python::VectorXs
context::VectorXs VectorXs
Definition: admm-solver.cpp:30
pinocchio::computeMinverse
const DataTpl< Scalar, Options, JointCollectionTpl >::RowMatrixXs & computeMinverse(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Computes the inverse of the joint space inertia matrix using Articulated Body formulation.
aba.hpp
pinocchio::python::make_symmetric
void make_symmetric(const Eigen::MatrixBase< Matrix > &mat, const int mode=Eigen::Upper)
Definition: bindings/python/utils/eigen.hpp:24
pinocchio::python::context::Options
@ Options
Definition: bindings/python/context/generic.hpp:40
algorithms.hpp
pinocchio::python::computeMinverse_min_proxy
const context::Data::RowMatrixXs & computeMinverse_min_proxy(const context::Model &model, context::Data &data)
Definition: expose-aba.cpp:26
python
pinocchio::ForceTpl
Definition: context/casadi.hpp:26
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:1083
pinocchio::python::mimic_not_supported_function
Definition: model-checker.hpp:22
pinocchio::Convention::LOCAL
@ LOCAL
pinocchio::JointCollectionDefaultTpl
Definition: context/generic.hpp:15
model-checker.hpp
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::python::context::Scalar
PINOCCHIO_PYTHON_SCALAR_TYPE Scalar
Definition: bindings/python/context/generic.hpp:37
eigen.hpp
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:33
namespace.hpp
pinocchio::python::exposeABA
void exposeABA()
Definition: expose-aba.cpp:33


pinocchio
Author(s):
autogenerated on Thu Apr 10 2025 02:42:18