expose-aba.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
6 #include "pinocchio/algorithm/aba.hpp"
8 
9 namespace pinocchio
10 {
11  namespace python
12  {
13 
14  const Data::RowMatrixXs &
16  {
17  computeMinverse(model,data,q);
18  make_symmetric(data.Minv);
19  return data.Minv;
20  }
21 
22  void exposeABA()
23  {
24  using namespace Eigen;
25 
26  bp::def("aba",
27  &aba<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd,VectorXd>,
28  bp::args("Model","Data",
29  "Joint configuration q (size Model::nq)",
30  "Joint velocity v (size Model::nv)",
31  "Joint torque tau (size Model::nv)"),
32  "Compute ABA, store the result in Data::ddq and return it.",
33  bp::return_value_policy<bp::return_by_value>());
34 
35  bp::def("aba",
36  &aba<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd,VectorXd,Force>,
37  bp::args("Model","Data",
38  "Joint configuration q (size Model::nq)",
39  "Joint velocity v (size Model::nv)",
40  "Joint torque tau (size Model::nv)",
41  "Vector of external forces expressed in the local frame of each joint (size Model::njoints)"),
42  "Compute ABA with external forces, store the result in Data::ddq and return it.",
43  bp::return_value_policy<bp::return_by_value>());
44 
45  bp::def("computeMinverse",
47  bp::args("Model","Data",
48  "Joint configuration q (size Model::nq)"),
49  "Computes the inverse of the joint space inertia matrix using a variant of the Articulated Body algorithm.\n"
50  "The result is stored in data.Minv.",
51  bp::return_value_policy<bp::return_by_value>());
52 
53  }
54 
55  } // namespace python
56 } // namespace pinocchio
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor|Options > RowMatrixXs
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.
const Data::RowMatrixXs & computeMinverse_proxy(const Model &model, Data &data, const Eigen::VectorXd &q)
Definition: expose-aba.cpp:15
void make_symmetric(Eigen::MatrixBase< Matrix > &mat)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
RowMatrixXs Minv
The inverse of the joint space inertia matrix (a square matrix of dim model.nv).
Main pinocchio namespace.
Definition: timings.cpp:30
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXd
Definition: conversions.cpp:14
JointCollectionTpl & model


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