6 #include "pinocchio/algorithm/parallel/geometry.hpp" 15 using namespace Eigen;
16 typedef Eigen::Matrix<bool,Eigen::Dynamic,1>
VectorXb;
21 const bool stopAtFirstCollision =
false)
23 return computeCollisions(num_threads, geom_model, geom_data, stopAtFirstCollision);
32 const bool stopAtFirstCollision =
false)
34 return computeCollisions(num_threads, model, data, geom_model, geom_data, q, stopAtFirstCollision);
38 const Eigen::MatrixXd &
q, Eigen::Ref<VectorXb>
res,
39 bool stop_at_first_collision =
false)
45 const Eigen::MatrixXd &
q,
46 bool stop_at_first_collision =
false)
48 VectorXb
res(q.cols());
62 using namespace Eigen;
64 bp::def(
"computeCollisions",
66 computeCollisions_overload(bp::args(
"num_thread",
"geometry_model",
"geometry_data",
"stop_at_first_collision"),
67 "Evaluates in parallel the collisions for a single data and returns the result.\n\n" 69 "\tnum_thread: number of threads used for the computation\n" 70 "\tgeometry_model: the geometry model\n" 71 "\tgeometry_data: the geometry data\n" 72 "\tstop_at_first_collision: if set to true, stops when encountering the first collision.\n"));
74 bp::def(
"computeCollisions",
76 computeCollisions_full_overload(bp::args(
"num_thread",
"model",
"data",
"geometry_model",
"geometry_data",
"q",
"stop_at_first_collision"),
77 "Evaluates in parallel the collisions for a single data and returns the result.\n\n" 79 "\tnum_thread: number of threads used for the computation\n" 80 "\tmodel: the kinematic model\n" 81 "\tdata: the data associated to the model\n" 82 "\tgeometry_model: the geometry model\n" 83 "\tgeometry_data: the geometry data associated to the tgeometry_model\n" 84 "\tq: the joint configuration vector (size model.nq)\n" 85 "\tstop_at_first_collision: if set to true, stops when encountering the first collision.\n"));
87 bp::def(
"computeCollisions",
89 computeCollisions_pool_proxy_overload(bp::args(
"num_thread",
"pool",
"q",
"stop_at_first_collision"),
90 "Evaluates in parallel the collisions and returns the result.\n\n" 92 "\tnum_thread: number of threads used for the computation\n" 93 "\tpool: pool of geometry model/ geometry data\n" 94 "\tq: the joint configuration vector (size model.nq x batch_size)\n" 95 "\tstop_at_first_collision: if set to true, stop when encountering the first collision in a batch element.\n"));
97 bp::def(
"computeCollisions",
99 computeCollisions_pool_proxy_res_overload(bp::args(
"num_thread",
"pool",
"q",
"res",
"stop_at_first_collision"),
100 "Evaluates in parallel the collisions and stores the result in res.\n\n" 102 "\tnum_thread: number of threads used for the computation\n" 103 "\tpool: pool of geometry model/ geometry data\n" 104 "\tq: the joint configuration vector (size model.nq x batch_size)\n" 105 "\tres: the resulting collision vector (batch_size)\n" 106 "\tstop_at_first_collision: if set to true, stop when encountering the first collision in a batch element.\n"));
static bool computeCollisions_full_proxy(const int num_threads, const Model &model, Data &data, const GeometryModel &geom_model, GeometryData &geom_data, const Eigen::VectorXd &q, const bool stopAtFirstCollision=false)
static bool computeCollisions_proxy(const int num_threads, const GeometryModel &geom_model, GeometryData &geom_data, const bool stopAtFirstCollision=false)
static void computeCollisions_pool_proxy_res(const int num_thread, GeometryPool &pool, const Eigen::MatrixXd &q, Eigen::Ref< VectorXb > res, bool stop_at_first_collision=false)
BOOST_PYTHON_FUNCTION_OVERLOADS(computeKKTContactDynamicMatrixInverse_overload, computeKKTContactDynamicMatrixInverse_proxy, 4, 5) static const Eigen
static VectorXb computeCollisions_pool_proxy(const int num_thread, GeometryPool &pool, const Eigen::MatrixXd &q, bool stop_at_first_collision=false)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
bool computeCollisions(const int num_threads, const GeometryModel &geom_model, GeometryData &geom_data, const bool stopAtFirstCollision=false)
Eigen::Matrix< bool, Eigen::Dynamic, 1 > VectorXb
Main pinocchio namespace.
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXd
void exposeParallelGeometry()
JointCollectionTpl & model