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

Inconsistent semantics in "position" for reported collision #384

Open
SeanCurtis-TRI opened this issue Mar 19, 2019 · 5 comments
Open

Inconsistent semantics in "position" for reported collision #384

SeanCurtis-TRI opened this issue Mar 19, 2019 · 5 comments

Comments

@SeanCurtis-TRI
Copy link
Contributor

SeanCurtis-TRI commented Mar 19, 2019

Problem statement

when calling fcl::collide(), configured to return penetration depth, normal, and "contact position", the semantics of contact position differ based on the combination of primitives.

Some quick rhetoric to use when discussing what is happening in the code. When two geometries collide, there is an overlapping region. Generally, we expect the following:

  • We define a normal direction for the contact.
  • The penetration depth is the greatest thickness of the overlapping region measured in the normal direction. If we slide a line that lies parallel with the contact normal over the intersecting region, we'll create a line segment. The length of the longest line segment is the penetration depth.
  • The contact position would lie on the line segment used to determine penetration depth. It could be on either end (in which case it would lie on one colliding surface or the other), it could lie in the middle, or, more generally, anywhere on the segment. It is important that this be consistent so, given penetration depth, normal, and contact position, the corresponding points on the geometry surfaces can be reconstructed.

Survey of primitive-primitive semantics.

Proposal

Everything should be pushed up into the mid-point formulation.

Side topic [Added in edit]

In some cases, the query doesn't mean anything. For example, the penetration depth of halfspaces is meaningless because the volumes are infinite; any intersection is, ultimately, an infinite intersection. Conversely, planes have no volume so plane-plane penetration is ill-defined; the depth must always be zero. We need to consider those weird cases and handle them appropriately.

@sherm1
Copy link
Member

sherm1 commented Mar 19, 2019

Sounds like the right plan to me! Would be nice for the returned values always to mean the same thing.

One thing you didn't mention is what happens with non-primitive contact. Are those currently returning the midpoint in all cases?

@SeanCurtis-TRI
Copy link
Contributor Author

Excellent point; I've modified the text above to the best of my ability.

@SeanCurtis-TRI SeanCurtis-TRI changed the title Inconsistent semantics in primitive-primitive collision Inconsistent semantics in "position" for reported collision Mar 20, 2019
@ClementRolinat
Copy link

hello, it may be off-topic, but it seems that there are some inconsistencies in the returned normal direction as well, I reported the bug here : #422

@tonydangct
Copy link

What is the status on this for older versions of the fcl library? I'm still using fcl-0.5 in the MoveIt environment with ROS Kinetic.

@SeanCurtis-TRI
Copy link
Contributor Author

@ClementRolinat I'm going to respond to #422 there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants