1 #ifndef TESSERACT_COLLISION_PRIMATIVES_BENCHMARKS_HPP
2 #define TESSERACT_COLLISION_PRIMATIVES_BENCHMARKS_HPP
20 const Eigen::Isometry3d& pose1,
22 const Eigen::Isometry3d& pose2,
27 geom1_.push_back(geom1->clone());
28 geom2_.push_back(geom2->clone());
44 std::vector<std::string> active_obj(num_obj);
45 for (std::size_t ind = 0; ind < num_obj; ind++)
47 std::string
name =
"geom_" + std::to_string(ind);
48 active_obj.push_back(
name);
82 int selected_link{ 0 };
85 benchmark::DoNotOptimize(selected_link = rand() % num_obj);
96 std::vector<std::string> active_obj(num_obj);
97 for (std::size_t ind = 0; ind < num_obj; ind++)
99 std::string
name =
"geom_" + std::to_string(ind);
100 active_obj[ind] =
name;
111 std::size_t selected_link =
static_cast<std::size_t
>(rand()) % num_obj;
123 std::vector<std::string> active_obj(num_obj);
124 for (std::size_t ind = 0; ind < num_obj; ind++)
126 std::string
name =
"geom_" + std::to_string(ind);
127 active_obj[ind] =
name;
133 std::vector<std::string> selected_links(1);
139 selected_links[0] = active_obj[
static_cast<std::size_t
>(rand()) % num_obj];
151 std::vector<std::string> active_obj(num_obj);
152 for (std::size_t ind = 0; ind < num_obj; ind++)
154 std::string
name =
"geom_" + std::to_string(ind);
155 active_obj[ind] =
name;
166 selected_link.clear();
167 selected_link[active_obj[
static_cast<std::size_t
>(rand()) % num_obj]] = info.
obj2_poses[0];