-
Notifications
You must be signed in to change notification settings - Fork 92
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
Compute multiple contact points/contact surfaces #574
Merged
jcarpent
merged 102 commits into
coal-library:devel
from
lmontaut:topic/multi-contact-points
May 14, 2024
Merged
Compute multiple contact points/contact surfaces #574
jcarpent
merged 102 commits into
coal-library:devel
from
lmontaut:topic/multi-contact-points
May 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lmontaut
force-pushed
the
topic/multi-contact-points
branch
2 times, most recently
from
May 11, 2024 17:36
ada0204
to
d82f543
Compare
jcarpent
force-pushed
the
topic/multi-contact-points
branch
from
May 14, 2024 09:50
70554b6
to
1f55279
Compare
jcarpent
reviewed
May 14, 2024
jcarpent
reviewed
May 14, 2024
This function is usefull to have in other tests.
- Comparison operators - rename `insert` -> `addContactPoint`, `getSize` -> `size`, `getMaximumSize` -> `capacity` - getter for i-th contact point
This is transferred to the `shape_shape_contact_patch.h` file.
This has multiple advantages: it makes the algos simpler to write, and most importantly, it encodes the fact that points in a contact patch all live on the same plane. This information is lost when using a 3D representation.
Multiple things: - There is no reason not to store the GJKSolver cached result in QueryResult. It's up to the QueryRequest to decide whether or not to retrieve this cached result. This is why I made the cache fields of QueryRequest mutable, and removed the now useless function signatures in collision.h and distance.h. - Fixed cached result in GJKSolver: the result of EPA can be used to warm-start the next GJK.
These conflict with the way the python bindings have been done... It's fine, these templated functions are not used right now and they are only very simple helpers. If needed, we can create templated functors in the future instead of templated functions; these won't cause conflict with python.
This has the effect of setting the base `max_size` of a ContactPatchRequest to 12 instead of 6. This is to make sure the box-box case is fully captured.
We only need the polygon representation, not the full support set.
…cases The SH algo is super easy to understand; however we have to handle the edge cases carefully. The edge cases are mainly due to degenerate cases where we have segments and points instead of non-empty convex polygons. If not handled properly, these edge cases induce redundancies in the final polygon of SH. For example, if SH is ran on two triangles which have only one common point, SH will return an intersection polygon composed of 3 identical points (the common point of the triangles). We detect these cases by using a tolerance when computing determinants. This allows us to remove redundant points. Also, we deal with the special case of the segment-polygon.
This flag needs to be present at the CMakeLists level, as Eigen is present everywhere in hpp-fcl.
Important for physics simulation where we might want to know in advance the maximum amount of contact points per contact pair.
HPP-FCL should simply compute the patch and let the user decide which point of the contact patch they want to keep.
lmontaut
force-pushed
the
topic/multi-contact-points
branch
from
May 14, 2024 12:55
1f55279
to
54d242e
Compare
nim65s
added a commit
to nim65s/robotpkg
that referenced
this pull request
Nov 21, 2024
## [3.0.0] - 2024-11-20 ### Added - Renaming the library from `hpp-fcl` to `coal`. Created a `COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL` CMake option for retro compatibility. This allows to still do `find_package(hpp-fcl)` and `#include <hpp/fcl/...>` in C++ and it allows to still do `import hppfcl` in python (coal-library/coal#596). - Added `Transform3f::Random` and `Transform3f::setRandom` (coal-library/coal#584) - New feature: computation of contact surfaces for any pair of primitive shapes (triangle, sphere, ellipsoid, plane, halfspace, cone, capsule, cylinder, convex) (coal-library/coal#574). - Enhance Broadphase DynamicAABBTree to better handle planes and halfspace (coal-library/coal#570) - (coal-library/coal#558): - [internal] Removed dead code in `narrowphase/details.h` (coal-library/coal#558) - [internal] Removed specializations of methods of `GJKSolver`. Now the specializations are all handled by `ShapeShapeDistance` in `shape_shape_func.h`. - [new feature] Added support for Swept-Sphere primitives (sphere, box, capsule, cone, ellipsoid, triangle, halfspace, plane, convex mesh). - [API change] Renamed default convergence criterion from `VDB` to `Default` (coal-library/coal#556) - Fixed EPA returning nans on cases where it could return an estimate of the normal and penetration depth. (coal-library/coal#556) - Fixed too low tolerance in GJK/EPA asserts (coal-library/coal#554) - Fixed `normal_and_nearest_points` test (no need to have Eigen 3.4) (coal-library/coal#553) - (coal-library/coal#549) - Optimize EPA: ignore useless faces in EPA's polytope; warm-start support computation for `Convex`; fix edge-cases witness points computation. - 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. - CMake: allow use of installed jrl-cmakemodules (coal-library/coal#564) - CMake: Add compatibility with jrl-cmakemodules workspace (coal-library/coal#610) - Python: add id() support for geometries (coal-library/coal#618). Packaging changes: - renamed package - removed patch 522, merged upstream - updated patch aa - replaced common Makefile from HPP to JRL - turned on backward compatibility with hpp-fcl - updated required version to 3.0.0 (coal < 3.0.0 does not exist)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This solves #144 and #163, i.e.
hpp::fcl::computeContactPatch(s1, tf1, s2, tf2, collision_result, patch_request, patch_result)
now computes the intersection polygon between the collision pair (s1, tf1) and (s2, tf2), afterhpp::fcl::collide(s1, tf1, s2, tf2, collision_request, collision_result)
has been called on the collision pair.The C++ code has been exposed to python.
Example using the python bindings:
This script gives the following result (in purple, the points of the contact patch, in blue the contact patch normal):
Todos:
ContactPatch
,ContactPatchRequest
andContactPatchResult