1#ifndef TESSERACT_COLLISION_COLLISION_SPHERE_SPHERE_CAST_UNIT_HPP
2#define TESSERACT_COLLISION_COLLISION_SPHERE_SPHERE_CAST_UNIT_HPP
21 auto mesh_vertices = std::make_shared<tesseract_common::VectorVector3d>();
22 auto mesh_faces = std::make_shared<Eigen::VectorXi>();
24 std::string(TESSERACT_SUPPORT_DIR) +
"/meshes/sphere_p25m.ply", *mesh_vertices, *mesh_faces,
true),
27 auto mesh = std::make_shared<tesseract_geometry::Mesh>(mesh_vertices, mesh_faces);
32 sphere = std::make_shared<tesseract_geometry::Sphere>(0.25);
35 Eigen::Isometry3d sphere_pose;
36 sphere_pose.setIdentity();
37 sphere_pose.translation()[2] = 0.25;
41 obj1_shapes.push_back(
sphere);
42 obj1_poses.push_back(sphere_pose);
52 CollisionShapePtr thin_box = std::make_shared<tesseract_geometry::Box>(0.1, 1, 1);
53 Eigen::Isometry3d thin_box_pose;
54 thin_box_pose.setIdentity();
58 obj2_shapes.push_back(thin_box);
59 obj2_poses.push_back(thin_box_pose);
74 auto mesh_vertices = std::make_shared<tesseract_common::VectorVector3d>();
75 auto mesh_faces = std::make_shared<Eigen::VectorXi>();
77 std::string(TESSERACT_SUPPORT_DIR) +
"/meshes/sphere_p25m.ply", *mesh_vertices, *mesh_faces,
true),
80 auto mesh = std::make_shared<tesseract_geometry::Mesh>(mesh_vertices, mesh_faces);
85 sphere1 = std::make_shared<tesseract_geometry::Sphere>(0.25);
88 Eigen::Isometry3d sphere1_pose;
89 sphere1_pose.setIdentity();
90 sphere1_pose.translation()[2] = 0.25;
94 obj3_shapes.push_back(sphere1);
95 obj3_poses.push_back(sphere1_pose);
103 CollisionShapePtr remove_box = std::make_shared<tesseract_geometry::Box>(0.1, 1, 1);
104 Eigen::Isometry3d remove_box_pose;
105 thin_box_pose.setIdentity();
109 obj4_shapes.push_back(remove_box);
110 obj4_poses.push_back(remove_box_pose);
140 std::vector<std::string>
active_links{
"sphere_link",
"sphere1_link" };
152 location_start[
"sphere_link"] = Eigen::Isometry3d::Identity();
153 location_start[
"sphere_link"].translation()(0) = -0.2;
154 location_start[
"sphere_link"].translation()(1) = -1.0;
156 location_start[
"sphere1_link"] = Eigen::Isometry3d::Identity();
157 location_start[
"sphere1_link"].translation()(0) = 0.2;
158 location_start[
"sphere1_link"].translation()(2) = -1.0;
162 location_end[
"sphere_link"] = Eigen::Isometry3d::Identity();
163 location_end[
"sphere_link"].translation()(0) = -0.2;
164 location_end[
"sphere_link"].translation()(1) = 1.0;
166 location_end[
"sphere1_link"] = Eigen::Isometry3d::Identity();
167 location_end[
"sphere1_link"].translation()(0) = 0.2;
168 location_end[
"sphere1_link"].translation()(2) = 1.0;
182 std::vector<int> idx = { 0, 1, 1 };
224 location_start[
"sphere_link"] = Eigen::Isometry3d::Identity();
225 location_start[
"sphere_link"].translation()(0) = -0.2;
226 location_start[
"sphere_link"].translation()(1) = -0.5;
228 location_start[
"sphere1_link"] = Eigen::Isometry3d::Identity();
229 location_start[
"sphere1_link"].translation()(0) = 0.2;
230 location_start[
"sphere1_link"].translation()(2) = -1.0;
233 location_end[
"sphere_link"] = Eigen::Isometry3d::Identity();
234 location_end[
"sphere_link"].translation()(0) = -0.2;
235 location_end[
"sphere_link"].translation()(1) = 1.0;
237 location_end[
"sphere1_link"] = Eigen::Isometry3d::Identity();
238 location_end[
"sphere1_link"].translation()(0) = 0.2;
239 location_end[
"sphere1_link"].translation()(2) = 1.0;
296 std::vector<std::string>
active_links{
"sphere_link",
"sphere1_link" };
308 location_start[
"sphere_link"] = Eigen::Isometry3d::Identity();
309 location_start[
"sphere_link"].translation()(0) = -0.2;
310 location_start[
"sphere_link"].translation()(1) = -1.0;
312 location_start[
"sphere1_link"] = Eigen::Isometry3d::Identity();
313 location_start[
"sphere1_link"].translation()(0) = 0.2;
314 location_start[
"sphere1_link"].translation()(2) = -1.0;
318 location_end[
"sphere_link"] = Eigen::Isometry3d::Identity();
319 location_end[
"sphere_link"].translation()(0) = -0.2;
320 location_end[
"sphere_link"].translation()(1) = 1.0;
322 location_end[
"sphere1_link"] = Eigen::Isometry3d::Identity();
323 location_end[
"sphere1_link"].translation()(0) = 0.2;
324 location_end[
"sphere1_link"].translation()(2) = 1.0;
338 std::vector<int> idx = { 0, 1, 1 };
380 location_start[
"sphere_link"] = Eigen::Isometry3d::Identity();
381 location_start[
"sphere_link"].translation()(0) = -0.2;
382 location_start[
"sphere_link"].translation()(1) = -0.5;
384 location_start[
"sphere1_link"] = Eigen::Isometry3d::Identity();
385 location_start[
"sphere1_link"].translation()(0) = 0.2;
386 location_start[
"sphere1_link"].translation()(2) = -1.0;
389 location_end[
"sphere_link"] = Eigen::Isometry3d::Identity();
390 location_end[
"sphere_link"].translation()(0) = -0.2;
391 location_end[
"sphere_link"].translation()(1) = 1.0;
393 location_end[
"sphere1_link"] = Eigen::Isometry3d::Identity();
394 location_end[
"sphere1_link"].translation()(0) = 0.2;
395 location_end[
"sphere1_link"].translation()(2) = 1.0;
double getMaxCollisionMargin() const
Get the largest collision margin.
Definition: collision_margin_data.h:165
results transform[0]
Definition: collision_core_unit.cpp:144
EXPECT_NEAR(config.contact_manager_config.margin_data.getDefaultCollisionMargin(), 5, 1e-6)
tesseract_collision::ContactResultVector result_vector
Definition: collision_core_unit.cpp:410
results distance
Definition: collision_core_unit.cpp:139
results link_names[0]
Definition: collision_core_unit.cpp:146
results normal
Definition: collision_core_unit.cpp:154
results cc_type[0]
Definition: collision_core_unit.cpp:157
results cc_time[0]
Definition: collision_core_unit.cpp:155
EXPECT_FALSE(tesseract_collision::isContactAllowed("base_link", "link_2", acm, false))
results nearest_points[0]
Definition: collision_core_unit.cpp:140
results cc_transform[0]
Definition: collision_core_unit.cpp:159
results nearest_points_local[0]
Definition: collision_core_unit.cpp:142
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)
void addCollisionObjects(ContinuousContactManager &checker)
Definition: collision_box_box_cast_unit.hpp:11
void runTestConvex(DiscreteContactManager &checker)
Definition: collision_box_sphere_unit.hpp:236
void runTestPrimitive(DiscreteContactManager &checker)
Definition: collision_box_sphere_unit.hpp:123
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
std::vector< std::string > active_links
Definition: tesseract_environment_collision.cpp:112
auto sphere
Definition: tesseract_geometry_unit.cpp:23
auto mesh
Definition: tesseract_geometry_unit.cpp:25