bindings/python/algorithm/parallel/aba.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 INRIA
3 //
4 
6 #include "pinocchio/algorithm/parallel/aba.hpp"
7 
9 
10 namespace pinocchio
11 {
12  namespace python
13  {
14 
15  static void aba_proxy_res(const int num_thread, ModelPool & pool,
16  const Eigen::MatrixXd & q, const Eigen::MatrixXd & v, const Eigen::MatrixXd & tau,
17  Eigen::Ref<Eigen::MatrixXd> a)
18  {
19  aba(num_thread,pool,q,v,tau,a);
20  }
21 
22  static Eigen::MatrixXd aba_proxy(const int num_thread, ModelPool & pool,
23  const Eigen::MatrixXd & q, const Eigen::MatrixXd & v, const Eigen::MatrixXd & tau)
24  {
25  Eigen::MatrixXd a(v.rows(),v.cols());
26  aba(num_thread,pool,q,v,tau,a);
27  return a;
28  }
29 
31  {
32  namespace bp = boost::python;
33 
34  using namespace Eigen;
35 
36  bp::def("aba",
37  aba_proxy,
38  bp::args("num_thread","pool","q","v","a"),
39  "Computes in parallel the ABA and returns the result.\n\n"
40  "Parameters:\n"
41  "\tnum_thread: number of threads used for the computation\n"
42  "\tpool: pool of model/data\n"
43  "\tq: the joint configuration vector (size model.nq x batch_size)\n"
44  "\tv: the joint velocity vector (size model.nv x batch_size)\n"
45  "\ttau: the joint torque vector (size model.nv x batch_size)\n");
46 
47  bp::def("aba",
49  bp::args("num_thread","pool","q","v","a","tau"),
50  "Computes in parallel the ABA, store the result in a.\n\n"
51  "Parameters:\n"
52  "\tnum_thread: number of threads used for the computation\n"
53  "\tpool: pool of model/data\n"
54  "\tq: the joint configuration vector (size model.nq x batch_size)\n"
55  "\tv: the joint velocity vector (size model.nv x batch_size)\n"
56  "\ttau: the joint torque vector (size model.nv x batch_size)\n"
57  "\ta: the resulting joint acceleration vectors (size model.nv x batch_size)\n");
58 
59  }
60 
61  } // namespace python
62 } // namespace pinocchio
63 
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)
The Articulated-Body algorithm. It computes the forward dynamics, aka the joint accelerations given t...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
static Eigen::MatrixXd aba_proxy(const int num_thread, ModelPool &pool, const Eigen::MatrixXd &q, const Eigen::MatrixXd &v, const Eigen::MatrixXd &tau)
Main pinocchio namespace.
Definition: timings.cpp:30
static void aba_proxy_res(const int num_thread, ModelPool &pool, const Eigen::MatrixXd &q, const Eigen::MatrixXd &v, const Eigen::MatrixXd &tau, Eigen::Ref< Eigen::MatrixXd > a)
list a


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