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


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:09