26 using namespace Eigen;
28 typedef Eigen::Matrix<bool, Eigen::Dynamic, 1>
VectorXb;
30 template<
typename BroadPhaseManager>
34 const Eigen::MatrixBase<Eigen::MatrixXd> &
q,
35 const bool stopAtFirstCollisionInConfiguration =
false,
36 const bool stopAtFirstCollisionInBatch =
false)
41 stopAtFirstCollisionInBatch);
45 template<
typename BroadPhaseManager>
49 const std::vector<Eigen::MatrixXd> & trajectories,
50 const bool stopAtFirstCollisionInTrajectory =
false)
52 std::vector<VectorXb>
res(trajectories.size());
53 for (
size_t k = 0; k < trajectories.size(); ++k)
55 res[k].resize(trajectories[k].
cols());
62 template<
typename BroadPhaseManager>
66 "computeCollisionsInParallel", computeCollisionsInParallel_1<BroadPhaseManager>,
67 (bp::arg(
"num_thread"), bp::arg(
"pool"), bp::arg(
"q"),
68 bp::arg(
"stop_at_first_collision_in_configuration") =
false,
69 bp::arg(
"stop_at_first_collision_in_batch") =
false),
70 "Evaluates in parallel the batch of configurations and returns the result.\n\n"
72 "\tnum_thread: number of threads used for the computation\n"
73 "\tpool: the broadphase manager pool\n"
74 "\tq: the batch of joint configurations\n"
75 "\tstop_at_first_collision_in_configuration: if set to true, stops when encountering "
76 "the first collision in a configuration\n"
77 "\tstop_at_first_collision_in_batch: if set to true, stops when encountering the "
78 "first collision in a batch.\n");
81 "computeCollisionsInParallel", computeCollisionsInParallel_2<BroadPhaseManager>,
82 (bp::arg(
"num_thread"), bp::arg(
"pool"), bp::arg(
"trajectories"),
83 bp::arg(
"stop_at_first_collision_in_trajectory") =
false),
84 "Evaluates in parallel the batch of trajectories and returns a vector of vector of Boolean "
85 "containing the status for each configuration contained in a given trajectory.\n\n"
87 "\tnum_thread: number of threads used for the computation\n"
88 "\tpool: the broadphase manager pool\n"
89 "\ttrajectories: the list of joint trajectories\n"
90 "\tstop_at_first_collision_in_trajectory: if set to true, stops when encountering the "
91 "first collision in a given trajectory.\n");
96 exposeCase<BroadPhaseManagerTpl<hpp::fcl::DynamicAABBTreeCollisionManager>>();
97 exposeCase<TreeBroadPhaseManagerTpl<hpp::fcl::DynamicAABBTreeCollisionManager>>();