Skip to content

Commit b927464

Browse files
authored
Merge pull request #592 from jcarpent/topic/devel
Add contact_patch_function_not_implemented
2 parents 7154948 + 8efe206 commit b927464

File tree

2 files changed

+65
-5
lines changed

2 files changed

+65
-5
lines changed

CHANGELOG.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
8+
9+
### Added
810
- Added `Transform3f::Random` and `Transform3f::setRandom` ([#584](https://github.com/humanoid-path-planner/hpp-fcl/pull/584))
911
- New feature: computation of contact surfaces for any pair of primitive shapes (triangle, sphere, ellipsoid, plane, halfspace, cone, capsule, cylinder, convex) ([#574](https://github.com/humanoid-path-planner/hpp-fcl/pull/574)).
1012
- Enhance Broadphase DynamicAABBTree to better handle planes and halfspace ([#570](https://github.com/humanoid-path-planner/hpp-fcl/pull/570))
@@ -17,12 +19,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1719
- Fixed too low tolerance in GJK/EPA asserts ([#554](https://github.com/humanoid-path-planner/hpp-fcl/pull/554))
1820
- Fixed `normal_and_nearest_points` test (no need to have Eigen 3.4) ([#553](https://github.com/humanoid-path-planner/hpp-fcl/pull/553))
1921
- [#549](https://github.com/humanoid-path-planner/hpp-fcl/pull/549)
20-
- Optimize EPA: ignore useless faces in EPA's polytope; warm-start support computation for `Convex`; fix edge-cases witness points computation.
21-
- Add `Serializable` trait to transform, collision data, collision geometries, bounding volumes, bvh models, hfields. Collision problems can now be serialized from C++ and sent to python and vice versa.
22+
- Optimize EPA: ignore useless faces in EPA's polytope; warm-start support computation for `Convex`; fix edge-cases witness points computation.
23+
- Add `Serializable` trait to transform, collision data, collision geometries, bounding volumes, bvh models, hfields. Collision problems can now be serialized from C++ and sent to python and vice versa.
2224
- CMake: allow use of installed jrl-cmakemodules ([#564](https://github.com/humanoid-path-planner/hpp-fcl/pull/564))
23-
- Fix compilation with earlier Eigen version
24-
- Fix compilation warning message
25-
- Fix issue in Octomap.computeLocalAABB
2625

2726
### Fixed
2827

@@ -43,6 +42,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4342
- Account for lateral borders in Height Fields model.
4443
- Fix compilation error on recent APPLE compilers ([#539](https://github.com/humanoid-path-planner/hpp-fcl/pull/539)).
4544
- Fix printing of deprecated message ([#540](https://github.com/humanoid-path-planner/hpp-fcl/pull/540)).
45+
- Fix compilation with earlier Eigen version
46+
- Fix compilation warning message
47+
- Fix issue in Octomap.computeLocalAABB
48+
- Fix unsupported function for contact_patch_matrix
4649

4750
## [2.4.4] - 2024-03-06
4851

src/contact_patch_func_matrix.cpp

+57
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,23 @@ struct BVHComputeContactPatch {
118118
}
119119
};
120120

121+
HPP_FCL_LOCAL void contact_patch_function_not_implemented(
122+
const CollisionGeometry* o1, const Transform3f& /*tf1*/,
123+
const CollisionGeometry* o2, const Transform3f& /*tf2*/,
124+
const CollisionResult& /*collision_result*/,
125+
const ContactPatchSolver* /*csolver*/,
126+
const ContactPatchRequest& /*request*/, ContactPatchResult& /*result*/) {
127+
NODE_TYPE node_type1 = o1->getNodeType();
128+
NODE_TYPE node_type2 = o2->getNodeType();
129+
130+
HPP_FCL_THROW_PRETTY("Contact patch function between node type "
131+
<< std::string(get_node_type_name(node_type1))
132+
<< " and node type "
133+
<< std::string(get_node_type_name(node_type2))
134+
<< " is not yet supported.",
135+
std::invalid_argument);
136+
}
137+
121138
ContactPatchFunctionMatrix::ContactPatchFunctionMatrix() {
122139
for (int i = 0; i < NODE_COUNT; ++i) {
123140
for (int j = 0; j < NODE_COUNT; ++j) contact_patch_matrix[i][j] = nullptr;
@@ -347,6 +364,46 @@ ContactPatchFunctionMatrix::ContactPatchFunctionMatrix() {
347364
contact_patch_matrix[BV_OBBRSS][BV_OBBRSS] = &BVHComputeContactPatch<OBBRSS>::run;
348365

349366
// TODO(louis): octrees
367+
#ifdef HPP_FCL_HAS_OCTOMAP
368+
contact_patch_matrix[GEOM_OCTREE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
369+
contact_patch_matrix[GEOM_OCTREE][GEOM_BOX] = &contact_patch_function_not_implemented;
370+
contact_patch_matrix[GEOM_OCTREE][GEOM_SPHERE] = &contact_patch_function_not_implemented;
371+
contact_patch_matrix[GEOM_OCTREE][GEOM_CAPSULE] = &contact_patch_function_not_implemented;
372+
contact_patch_matrix[GEOM_OCTREE][GEOM_CONE] = &contact_patch_function_not_implemented;
373+
contact_patch_matrix[GEOM_OCTREE][GEOM_CYLINDER] = &contact_patch_function_not_implemented;
374+
contact_patch_matrix[GEOM_OCTREE][GEOM_CONVEX] = &contact_patch_function_not_implemented;
375+
contact_patch_matrix[GEOM_OCTREE][GEOM_PLANE] = &contact_patch_function_not_implemented;
376+
contact_patch_matrix[GEOM_OCTREE][GEOM_HALFSPACE] = &contact_patch_function_not_implemented;
377+
contact_patch_matrix[GEOM_OCTREE][GEOM_ELLIPSOID] = &contact_patch_function_not_implemented;
378+
contact_patch_matrix[GEOM_OCTREE][GEOM_TRIANGLE] = &contact_patch_function_not_implemented;
379+
contact_patch_matrix[GEOM_OCTREE][BV_AABB] = &contact_patch_function_not_implemented;
380+
contact_patch_matrix[GEOM_OCTREE][BV_OBB] = &contact_patch_function_not_implemented;
381+
contact_patch_matrix[GEOM_OCTREE][BV_RSS] = &contact_patch_function_not_implemented;
382+
contact_patch_matrix[GEOM_OCTREE][BV_OBBRSS] = &contact_patch_function_not_implemented;
383+
contact_patch_matrix[GEOM_OCTREE][BV_kIOS] = &contact_patch_function_not_implemented;
384+
contact_patch_matrix[GEOM_OCTREE][BV_KDOP16] = &contact_patch_function_not_implemented;
385+
contact_patch_matrix[GEOM_OCTREE][BV_KDOP18] = &contact_patch_function_not_implemented;
386+
contact_patch_matrix[GEOM_OCTREE][BV_KDOP24] = &contact_patch_function_not_implemented;
387+
388+
contact_patch_matrix[GEOM_BOX][GEOM_OCTREE] = &contact_patch_function_not_implemented;
389+
contact_patch_matrix[GEOM_SPHERE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
390+
contact_patch_matrix[GEOM_CAPSULE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
391+
contact_patch_matrix[GEOM_CONE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
392+
contact_patch_matrix[GEOM_CYLINDER][GEOM_OCTREE] = &contact_patch_function_not_implemented;
393+
contact_patch_matrix[GEOM_CONVEX][GEOM_OCTREE] = &contact_patch_function_not_implemented;
394+
contact_patch_matrix[GEOM_PLANE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
395+
contact_patch_matrix[GEOM_HALFSPACE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
396+
contact_patch_matrix[GEOM_ELLIPSOID][GEOM_OCTREE] = &contact_patch_function_not_implemented;
397+
contact_patch_matrix[GEOM_TRIANGLE][GEOM_OCTREE] = &contact_patch_function_not_implemented;
398+
contact_patch_matrix[BV_AABB][GEOM_OCTREE] = &contact_patch_function_not_implemented;
399+
contact_patch_matrix[BV_OBB][GEOM_OCTREE] = &contact_patch_function_not_implemented;
400+
contact_patch_matrix[BV_RSS][GEOM_OCTREE] = &contact_patch_function_not_implemented;
401+
contact_patch_matrix[BV_OBBRSS][GEOM_OCTREE] = &contact_patch_function_not_implemented;
402+
contact_patch_matrix[BV_kIOS][GEOM_OCTREE] = &contact_patch_function_not_implemented;
403+
contact_patch_matrix[BV_KDOP16][GEOM_OCTREE] = &contact_patch_function_not_implemented;
404+
contact_patch_matrix[BV_KDOP18][GEOM_OCTREE] = &contact_patch_function_not_implemented;
405+
contact_patch_matrix[BV_KDOP24][GEOM_OCTREE] = &contact_patch_function_not_implemented;
406+
#endif
350407
// clang-format on
351408
}
352409

0 commit comments

Comments
 (0)