-
Notifications
You must be signed in to change notification settings - Fork 110
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
nextSupport function does not compute the right answer #44
Comments
@hongkai-dai: For point 2 above, the calculated |
Oh, I take it back. Combined with point 3 I see you need the actual distance there (and |
This also makes me wonder whether |
@sherm1 for point 2, if we want to compute the squared distance, it should be d²=(v⋅w)²/(w⋅w), that is still not what the code |
I believe there are problems in nextSupport function. What this function does is a part of the EPA algorithm. The EPA algorithm can be summarized as follows
Given this is what EPA algorithm does, there are a few issues that confuse me in libccd's nextSupport function
el
(which is the point on the boundary of the polytope that is nearest to the origin) is the origin. I do not think this is the right assertion. The condition for touch contact should be that the origin is on the boundary of the Minkowski difference A⊖B, not on the boundary of the polytope. The polytope is inside the Minkowski difference. When the origin is on the boundary of the polytope, it only means that the object A and B is in contact (or penetrating). We should continue to expand the polytope, until the difference between the distance upper bound and the lower bound is sufficiently small, instead of returning -1 here.dist
is computed in https://github.com/danfis/libccd/blob/master/src/ccd.c#L973 asout->v
iswᵢ
in the documentation above, andel->witness
isvᵢ
. I do not think the computation ofdist
is right. To compute the distance, I thinkel->witness
should be normalized.el->dist
is the squared distance of the witness, whiledist
should be a non-squared distance. And even if we use squared distance for bothdist
andel->dist
, I still do not think it is a good termination condition, since μᵢ² - |vᵢ|² ≤ ε says nothing about the difference between the upper bound μᵢ and the lower bound |vᵢ| (because both μᵢ and |vᵢ| can be arbitrarily large or arbitrarily small, thus making the difference μᵢ - |vᵢ| arbitrary.). On the other hand, the termination condition in https://github.com/danfis/libccd/blob/master/src/ccd.c#L992 is reasonable, as it means (μᵢ - |vᵢ|)² ≤ εThe text was updated successfully, but these errors were encountered: