Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doc and optional value for contact patches #588

Merged
merged 2 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/hpp/fcl/collision_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ struct HPP_FCL_DLLAPI ContactPatch {

/// @brief Penetration depth of the contact patch. This value corresponds to
/// the signed distance `d` between the shapes.
/// @note For each contact point `p` in the patch of normal `n`, `p1 = p +
/// 0.5*d*n` and `p2 = p - 0.5*d*n` define a pair of witness points. `p1`
/// @note For each contact point `p` in the patch of normal `n`, `p1 = p -
/// 0.5*d*n` and `p2 = p + 0.5*d*n` define a pair of witness points. `p1`
/// belongs to the surface of the first shape and `p2` belongs to the surface
/// of the second shape. For any pair of witness points, we always have `p1 -
/// p2 = d * n`. The vector `d * n` is called a minimum separation vector:
/// of the second shape. For any pair of witness points, we always have `p2 -
/// p1 = d * n`. The vector `d * n` is called a minimum separation vector:
/// if S1 is translated by it, S1 and S2 are not in collision anymore.
/// @note Although there may exist multiple minimum separation vectors between
/// two shapes, the term "minimum" comes from the fact that it's impossible to
Expand Down
10 changes: 5 additions & 5 deletions include/hpp/fcl/contact_patch_func_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ struct HPP_FCL_DLLAPI ContactPatchFunctionMatrix {
/// and tf2;
/// 2. the collision result that generated contact patches candidates
/// (`hpp::fcl::Contact`), from which contact patches will be expanded;
/// 3. the narrow phase solver that was used to compute the collision result;
/// 4. the solver for computation of contact patches;
/// 5. the request setting for contact patches (e.g. maximum amoung and size
/// of contact patches);
/// 6. the structure to return contact patches.
/// 3. the solver for computation of contact patches;
/// 4. the request setting for contact patches (e.g. maximum amount of
/// patches, patch tolerance etc.)
/// 5. the structure to return contact patches
/// (`hpp::fcl::ContactPatchResult`).
///
/// Note: we pass a GJKSolver, because it allows to reuse internal computation
/// that was made during the narrow phase. It also allows to experiment with
Expand Down
24 changes: 16 additions & 8 deletions include/hpp/fcl/narrowphase/support_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,35 +219,40 @@ void getSupportSet(const ShapeBase* shape, const Vec3f& dir,
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const TriangleP* triangle, SupportSet& support_set,
int& /*unused*/, ShapeSupportData& /*unused*/,
size_t /*unused*/, FCL_REAL tol = 1e-3);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL tol = 1e-3);

/// @brief Box support set function.
/// Assumes the support set frame has already been computed.
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const Box* box, SupportSet& support_set,
int& /*unused*/, ShapeSupportData& support_data,
size_t /*unused*/, FCL_REAL tol = 1e-3);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL tol = 1e-3);

/// @brief Sphere support set function.
/// Assumes the support set frame has already been computed.
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const Sphere* sphere, SupportSet& support_set,
int& /*unused*/, ShapeSupportData& /*unused*/,
size_t /*unused*/, FCL_REAL /*unused*/);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL /*unused*/ tol = 1e-3);

/// @brief Ellipsoid support set function.
/// Assumes the support set frame has already been computed.
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const Ellipsoid* ellipsoid, SupportSet& support_set,
int& /*unused*/, ShapeSupportData& /*unused*/,
size_t /*unused*/, FCL_REAL /*unused*/);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL /*unused*/ tol = 1e-3);

/// @brief Capsule support set function.
/// Assumes the support set frame has already been computed.
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const Capsule* capsule, SupportSet& support_set,
int& /*unused*/, ShapeSupportData& /*unused*/,
size_t /*unused*/, FCL_REAL tol = 1e-3);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL tol = 1e-3);

/// @brief Cone support set function.
/// Assumes the support set frame has already been computed.
Expand All @@ -270,21 +275,24 @@ void getShapeSupportSet(const Cylinder* cylinder, SupportSet& support_set,
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const ConvexBase* convex, SupportSet& support_set,
int& hint, ShapeSupportData& support_data,
size_t /*unused*/, FCL_REAL tol = 1e-3);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL tol = 1e-3);

/// @brief Support set function for large ConvexBase (>32 vertices).
/// Assumes the support set frame has already been computed.
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const SmallConvex* convex, SupportSet& support_set,
int& /*unused*/, ShapeSupportData& /*unused*/,
size_t /*unused*/, FCL_REAL tol = 1e-3);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL tol = 1e-3);

/// @brief Support set function for small ConvexBase (<32 vertices).
/// Assumes the support set frame has already been computed.
template <int _SupportOptions = SupportOptions::NoSweptSphere>
void getShapeSupportSet(const LargeConvex* convex, SupportSet& support_set,
int& hint, ShapeSupportData& support_data,
size_t /*unused*/, FCL_REAL tol = 1e-3);
size_t /*unused*/ num_sampled_supports = 6,
FCL_REAL tol = 1e-3);

/// @brief Computes the convex-hull of support_set. For now, this function is
/// only needed for Box and ConvexBase.
Expand Down
Loading