-
Notifications
You must be signed in to change notification settings - Fork 421
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
libccd EPA expandPolytope: "this should not happen" #319
Comments
FTR This is using |
For FCL and our own code, yes. For libccd it is using the 16.04 system-provided |
I just upgraded to the latest master and I am still getting this fairly frequently. Any new insights on this? I do not yet have more reproducible cases beyond the one above (as I am not logging the faulty cases any more). Happy to help if I can (Ubuntu 16.04, libccd from system Debians, latest master, only shape primitives, all |
Are you getting the same "this shouldn't be happening" or are you getting a "zero area" error? It's an important distinction. |
From my failure logs - it is always this one:
|
Good to know; we were hoping it was just due to the fact that we weren't handling degenerate triangles. But clearly, that is not the case. Thanks for checking with the new master. |
Thanks, I will try to write a test to reproduce the error. |
@wxmerkt I tried to reproduce the error, but couldn't. The test is in https://github.com/hongkai-dai/fcl/blob/epa_touching_degenerate/test/narrowphase/detail/convexity_based_algorithm/test_box_cylinder.cpp. Actually the GJKSignedDistance thinks that the two objects are separated by 2.5 cm, so it doesn't call EPA algorithm at all. Could you let me know if I did something wrong in this test? Thanks! |
In your data, the box is rotated by 90 degrees about z axis, the cylinder is also rotated about z axis by a certain angle (but the rotation on the cylinder does not matter, since z axis is the axis of the cylinder). So after transformation, in the xy plane, you have a box with dimension (0.39, 0.05) centered at (0.8, -0.385), and a circle with radius 0.18, centered at (0.4, -0.4). You can see that along the x axis, the "rightmost" point of the circle is (0.58, -0.4), and the "leftmost" point of the box is (0.605, -0.4), where 0.605 = 0.8 - 0.39 / 2, so they are exactly separated by 0.605 - 0.58 = 0.025m |
Could you post the argument in your |
Hi Hongkai and Sean,
Otherwise I can add a try-catch block to extract more details when it happens. Best, |
Hi Wolfgang, I tried the argument you used, and fcl still doesn't throw me the error. The code is in https://github.com/hongkai-dai/fcl/blob/epa_touching_degenerate/test/narrowphase/detail/convexity_based_algorithm/test_box_cylinder.cpp. I am quite sure with the box and cylinder you mentioned, it cannot cause FCL to throw that error. Since the box and cylinder are separated by 2.5cm. On the other hand, the EPA algorithm is only called if the two objects are penetrating. Could you check if the box/cylinder data are correct? Best, |
@hongkai-dai Thank you, I will update and run it later this week or after IROS. |
Hi,
|
Thanks for the data. This is our second data point drawn from the wild. A previous reported failure was exercised in this branch, but using the reported data, I was unable to reproduce the error. I used your data and was likewise unable to reproduce that error. So, the hypothesis that #381 is outputting sufficient information to reproduce the inexplicable phenomenon is taking a severe beating. Obviously, more work has to be done to figure out why this is happening. Feel free to look at the branch and let me know if you think I've missed something obvious in reproducing the circumstances that should lead to the error. Alternatively, there must be some additional state/parameter/configuration that contributes to the error. Please let me know if you gain any particular insight. |
Thank you for the quick response @SeanCurtis-TRI. I have tried this with both the |
Yes and yes: double and libccd master. In the last 30 minutes, I've had a third data point that likewise doesn't reproduce the error. So, the evidence is mounting that the log isn't serving the purpose it was intended to. We apparently have a "reliable" set of code to produce this bug. So, probably next week, I'm going to run that and dig down into FCL from the actual end application to see if I can't figure out first, what information is relevant and, second, what the actual bug is. |
Thank you Sean, this sounds promising - I will continue to test here and see if I can extract any more insights and will update the issue if so. |
Thanks. Hopefully we'll track this down relatively soon. |
This data came from flexible-collision-library#319. Still unable to reproduce the result.
As noted in #305 (comment), I have encountered the "should not happen" logic error:
Here are details on how to reproduce:
fcl::distance
call between a box (o1, GEOM_BOX) and a cylinder (o2, GEOM_CYLINDER)..05 0.39 1.47
length=0.18, radius=0.18
xyz=0.8 -0.385 0.735; wxyz=0.707107 0 0 0.707107
xyz=0.4 -0.4 0.93; wxyz=0.991445 0 0 -0.130526
I have been able to reliably reproduce it (as part of a larger process - caught and extracted the above from it).
cc @hongkai-dai
The text was updated successfully, but these errors were encountered: