Go to the documentation of this file. 1 #ifndef TESSERACT_COLLISION_COLLISION_LARGE_DATASET_UNIT_HPP
2 #define TESSERACT_COLLISION_COLLISION_LARGE_DATASET_UNIT_HPP
6 #include <console_bridge/console.h>
25 auto mesh_vertices = std::make_shared<tesseract_common::VectorVector3d>();
26 auto mesh_faces = std::make_shared<Eigen::VectorXi>();
35 auto mesh = std::make_shared<tesseract_geometry::Mesh>(mesh_vertices, mesh_faces);
40 sphere = std::make_shared<tesseract_geometry::Sphere>(0.25);
46 std::vector<std::string> link_names;
48 for (std::size_t x = 0; x < t; ++x)
50 for (std::size_t y = 0; y < t; ++y)
52 for (std::size_t z = 0; z < t; ++z)
56 Eigen::Isometry3d sphere_pose;
57 sphere_pose.setIdentity();
60 obj3_poses.push_back(sphere_pose);
62 link_names.push_back(
"sphere_link_" + std::to_string(x) + std::to_string(y) + std::to_string(z));
64 location[link_names.back()] = sphere_pose;
65 location[link_names.back()].translation() = Eigen::Vector3d(
66 static_cast<double>(x) * delta,
static_cast<double>(y) * delta,
static_cast<double>(z) * delta);
75 EXPECT_TRUE(tesseract_common::isIdentical<std::string>(link_names, check_active_links,
false));
86 auto start_time = std::chrono::high_resolution_clock::now();
88 for (
auto i = 0; i < num_interations; ++i)
91 result_vector.clear();
95 if (result_vector.size() != 300)
96 for (
const auto& result : result_vector)
97 std::cout << result.link_names[0] <<
"," << result.link_names[1] <<
"," << result.distance <<
"\n";
101 auto end_time = std::chrono::high_resolution_clock::now();
103 CONSOLE_BRIDGE_logInform(
"DT: %f ms", std::chrono::duration<double, std::milli>(end_time - start_time).count());
106 #endif // TESSERACT_COLLISION_COLLISION_LARGE_DATASET_UNIT_HPP
AlignedVector< Eigen::Isometry3d > VectorIsometry3d
double getMaxCollisionMargin() const
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_common::AlignedVector< ContactResult > ContactResultVector
int loadSimplePlyFile(const std::string &path, tesseract_common::VectorVector3d &vertices, Eigen::VectorXi &faces, bool triangles_only=false)
Loads a simple ply file given a path.
This is a collection of common methods.
#define EXPECT_TRUE(args)
tesseract_geometry::ConvexMesh::Ptr makeConvexMesh(const tesseract_geometry::Mesh &mesh)
#define EXPECT_NEAR(a, b, prec)
std::shared_ptr< tesseract_geometry::Geometry > CollisionShapePtr
std::vector< CollisionShapeConstPtr > CollisionShapesConst
std::shared_ptr< Resource > locateResource(const std::string &url) const override
This is a collection of common methods.
void runTest(ContinuousContactManager &checker)
tesseract_common::CollisionMarginData CollisionMarginData