42 const Eigen::MatrixBase<ConfigVectorPool> & q,
43 const Eigen::MatrixBase<TangentVectorPool1> & v,
44 const Eigen::MatrixBase<TangentVectorPool2> &
a,
45 const Eigen::MatrixBase<TangentVectorPool3> & tau)
48 typedef typename Pool::Model
Model;
49 typedef typename Pool::Data
Data;
50 typedef typename Pool::ModelVector ModelVector;
51 typedef typename Pool::DataVector DataVector;
53 PINOCCHIO_CHECK_INPUT_ARGUMENT(
pool.size() > 0,
"The pool should have at least one element");
54 PINOCCHIO_CHECK_INPUT_ARGUMENT(
num_threads <=
pool.size(),
"The pool is too small");
61 PINOCCHIO_CHECK_ARGUMENT_SIZE(q.rows(),
model_check.nq);
62 PINOCCHIO_CHECK_ARGUMENT_SIZE(v.rows(),
model_check.nv);
64 PINOCCHIO_CHECK_ARGUMENT_SIZE(res.rows(),
model_check.nv);
66 PINOCCHIO_CHECK_ARGUMENT_SIZE(q.cols(), v.cols());
67 PINOCCHIO_CHECK_ARGUMENT_SIZE(q.cols(),
a.cols());
68 PINOCCHIO_CHECK_ARGUMENT_SIZE(q.cols(), res.cols());
71 const Eigen::DenseIndex
batch_size = res.cols();
72 Eigen::DenseIndex
i = 0;
74#pragma omp parallel for schedule( \
81 res.col(
i) =
rnea(model, data, q.col(
i), v.col(
i),
a.col(
i));
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & rnea(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 > &a)
The Recursive Newton-Euler algorithm. It computes the inverse dynamics, aka the joint torques accordi...
void rneaInParallel(const size_t num_threads, ModelPoolTpl< Scalar, Options, JointCollectionTpl > &pool, const Eigen::MatrixBase< ConfigVectorPool > &q, const Eigen::MatrixBase< TangentVectorPool1 > &v, const Eigen::MatrixBase< TangentVectorPool2 > &a, const Eigen::MatrixBase< TangentVectorPool3 > &tau)
The Recursive Newton-Euler algorithm. It computes the inverse dynamics, aka the joint torques accordi...