-
Notifications
You must be signed in to change notification settings - Fork 417
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
Defining collision w.r.t. osculating surfaces #281
Comments
Argument for why "kissing" contact (exactly 0 penetration) should be considered a "collision":
When contact is instead modeled using compliant (soft) surfaces (also common) the contact force is a function of the penetration depth. A 0-depth contact thus produces 0 contact force, which is not very interesting but is still correct. So saying "yes, contact" at 0 depth works for both kinds of models but saying "no" means the rigid ones can't generate forces then. |
So, the question is, does the Big "if" there. I don't know that the |
To put in my two cents: your question is case-dependent. Instead of a binary answer, couldn't it return an enum like one of (COLLISION, CONTACT, SEPARABLE) ? Maybe with thresholds tunable by users ? |
@jmirabel I like your suggestion. It should give us a basis to reasonably expect results based on thresholds and configuration. That gets my vote as well. |
I would want to make sure we're not just punting a hard decision from people who have thought about it a lot to people who haven't! It would certainly be useful to be able to specify a non-zero margin to make collision query report on near objects as well as contacting ones. That's not a tolerance in the algorithmic sense though. And the margin would have to be known to the broad phase as well to prevent early weed-outs. |
One thought to consider -- if the algorithm converges to defining osculation as not colliding (as the tolerance levels get tighter), then, at the very least, we should consider that the current implementation implies that osculation != collision and it should be documented and supported in tests. The next question being whether that behavior is correct can then be dealt with in a subsequent endeavor (and a much more painful one to get the code to agree). |
@jmirabel in retrospect, I'm taking my vote back. Ultimately, FCL should provide a signed distance value The definition of two objects "colliding" is simply syntactic sugar on top of that. We've taken the domain of If we wanted to add a user parameter such that |
From a theoretical point of view, yes. From a computer scientist point of view, the difference can be up to 8 times faster... The question is to know whether you can have a richer answer than a boolean for the same cost. Will
Yes, I agree. It is not simple to implement. This is related to #276 . Anyway, my suggestion was a mere thought with no deep |
I completely agree with what you're saying. The So, my final proposal is that we document and have supporting tests for the current behavior: that collisions are defined as |
Fundamental question
If two surfaces are perfectly touching (i.e. zero distance and zero penetration), are they "colliding"?
Example
There is a unit test which places a sphere and box in perfect osculation. The sphere is centered at the origin and the box is displaced along the x-axis a distance equal to the sphere's radius plus 1/2 the box's size (in the x-direction). Mathematically, they are perfectly touching. This uses the
GJKSolver_indep
to determine collision and, historically, this has been considered a collision.Problem
Historically,
GJKSolver_indep
has used 1e-6 for thegjk_tolerance
. With this tolerance, the test passes. As the tolerance gets "tighter" (i.e., smaller) the behavior is preserved. Until we cross from a tolerance of 1e-10 to 1e-11 (and smaller). With this tighter tolerance, the solver converges to deciding that the sphere and box do not collide. One would expect as the tolerance decreases, we're converging to the "true answer".Arguments
It's worth noting that the solver only considers a collision to exist iff the GJK solver classifies the origin as being inside the minkowski difference. It's worth noting that that's a necessary but not sufficient condition -- the EPA solver must also report successful (aka Non-Failed) status. So, if the GJK status of "inside" is to be taken at face value, one would assume that osculating surfaces should fail this test.
So, the question is, should two surfaces with a distance of zero between them be considered a collision?
Votes and comments please?
P.S. For the unit test in question, it should explicitly set the solver tolerances which distinguish between collision and non-collision.
The text was updated successfully, but these errors were encountered: