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

Exact negative distance computation using additional collision checking #172

Merged
merged 6 commits into from
Sep 24, 2016

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Sep 7, 2016

For distance query, FCL seems to always (or in most case) return -1 distance when the two objects are in collision. Also, the comment of DistanceResult::min_distant is not clear whether this behavior was intentional or not.

This pull request adds a flag to DistanceRequest that indicates whether the caller wants the exact distance even when it's a negative value. If the flag is set to true and the distance is negative (objects are in collision), FCL will perform an additional collision checking within the distance routine to compute the exact negative distance that is the negated maximum penetration depth.

The default value of the flag is false, and this change adds only an overhead of one if-statement for the flag checking when the option is disabled.

@jslee02 jslee02 added this to the FCL 0.6.0 milestone Sep 7, 2016
@sherm1
Copy link
Member

sherm1 commented Sep 11, 2016

Looks great, @jslee02. It might be good to mention how the penetration depth is calculated. I believe it is not always unambiguous so it would be good to know what method is being applied.

@jslee02
Copy link
Member Author

jslee02 commented Sep 23, 2016

I'm not sure if describing the penetration depth calculation methods here (I guess you mean ) is a good idea because it varies in the geometry types. FCL has various penetration (also contact point) calculation methods such as for mesh-mesh (at the end it's triangle-triangle), mesh-primitive, mesh-octree, primitive-primitive, and so on. Furthermore, even for primitive-primitive, it could use the convexity-based methods or different method if there is a special algorithm only for the primitive shape pair (e.g., sphere-sphere, plane-sphere, and so on).

@sherm1
Copy link
Member

sherm1 commented Sep 24, 2016

I see your point -- sounds good to me!

@jslee02 jslee02 merged commit 68b7655 into master Sep 24, 2016
@jslee02 jslee02 deleted the signed_distance branch September 26, 2016 13:49
@jslee02 jslee02 restored the signed_distance branch December 9, 2016 20:14
@jslee02 jslee02 deleted the signed_distance branch December 9, 2016 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants