1#ifndef TESSERACT_COLLISION_COLLISION_LARGE_DATASET_UNIT_HPP
2#define TESSERACT_COLLISION_COLLISION_LARGE_DATASET_UNIT_HPP
6#include <console_bridge/console.h>
24 auto mesh_vertices = std::make_shared<tesseract_common::VectorVector3d>();
25 auto mesh_faces = std::make_shared<Eigen::VectorXi>();
27 std::string(TESSERACT_SUPPORT_DIR) +
"/meshes/sphere_p25m.ply", *mesh_vertices, *mesh_faces,
true),
30 auto mesh = std::make_shared<tesseract_geometry::Mesh>(mesh_vertices, mesh_faces);
35 sphere = std::make_shared<tesseract_geometry::Sphere>(0.25);
43 for (std::size_t x = 0; x < t; ++x)
45 for (std::size_t y = 0; y < t; ++y)
47 for (std::size_t z = 0; z < t; ++z)
51 Eigen::Isometry3d sphere_pose;
52 sphere_pose.setIdentity();
55 obj3_poses.push_back(sphere_pose);
57 link_names.push_back(
"sphere_link_" + std::to_string(x) + std::to_string(y) + std::to_string(z));
60 location[
link_names.back()].translation() = Eigen::Vector3d(
61 static_cast<double>(x) * delta,
static_cast<double>(y) * delta,
static_cast<double>(z) * delta);
81 auto start_time = std::chrono::high_resolution_clock::now();
83 for (
auto i = 0; i < num_interations; ++i)
92 std::cout << result.link_names[0] <<
"," << result.link_names[1] <<
"," << result.distance << std::endl;
96 auto end_time = std::chrono::high_resolution_clock::now();
98 CONSOLE_BRIDGE_logInform(
"DT: %f ms", std::chrono::duration<double, std::milli>(end_time - start_time).count());
double getMaxCollisionMargin() const
Get the largest collision margin.
Definition: collision_margin_data.h:165
EXPECT_NEAR(config.contact_manager_config.margin_data.getDefaultCollisionMargin(), 5, 1e-6)
tesseract_collision::ContactResultVector result_vector
Definition: collision_core_unit.cpp:410
results link_names[0]
Definition: collision_core_unit.cpp:146
EXPECT_EQ(results.distance, std::numeric_limits< double >::max())
EXPECT_TRUE(tesseract_common::isIdentical< tesseract_collision::ObjectPairKey >(pairs, check_pairs, false))
This is a collection of common methods.
This is a collection of common methods.
EXPECT_GT(m.m.condition, 1e+20)
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: large_dataset_benchmarks.hpp:17
void runTest(ContinuousContactManager &checker)
Definition: collision_box_box_cast_unit.hpp:111
tesseract_common::CollisionMarginData CollisionMarginData
Definition: types.h:50
tesseract_geometry::Geometry::Ptr CollisionShapePtr
Definition: types.h:49
std::vector< tesseract_geometry::Geometry::ConstPtr > CollisionShapesConst
Definition: types.h:47
tesseract_common::AlignedVector< ContactResult > ContactResultVector
Definition: types.h:134
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.
Definition: common.cpp:285
tesseract_geometry::ConvexMesh::Ptr makeConvexMesh(const tesseract_geometry::Mesh &mesh)
Definition: convex_hull_utils.cpp:114
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
Definition: types.h:66
template bool isIdentical< std::string >(const std::vector< std::string > &, const std::vector< std::string > &, bool, const std::function< bool(const std::string &, const std::string &)> &, const std::function< bool(const std::string &, const std::string &)> &)
AlignedVector< Eigen::Isometry3d > VectorIsometry3d
Definition: types.h:62
auto sphere
Definition: tesseract_geometry_unit.cpp:23
auto mesh
Definition: tesseract_geometry_unit.cpp:25