-
Notifications
You must be signed in to change notification settings - Fork 96
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
Should we clear
inside collide
?
#565
Comments
I had the same issue, debug was very hard because of this behavior. |
Regarding this issue, we can add an extra argument to collide and distance, named |
I guess we can but I just don't see the reason why we don't simply clear inside |
EDIT: I think the rationale behind not clearing is that if you set the Anyway, I think mixing collision pairs inside the same result is a bad idea, and the current design of hpp-fcl enforces that. @jcarpent I will do a PR with your solution and set the default behavior to clear the result |
When we call
collide
(ordistance
, it behaves the same) on a collision pair (collide(o1, T1, o2, T2, col_req, col_res)
), the functioncollide
does notclear
the collision resultcol_res
.The problem is that if
col_res
is not cleared,collide
will basically exit immediately, without doing any kind of computation.The consequence of that is if we do:
then the results stored in
col_res
will actually not correspond to the poses(T3, T4)
but(T1, T2)
.This behavior of hpp-fcl has caused me a lot of bugs, which don't even throw an error so it's often very hard to debug this problem.
So I am wondering if this is something we should keep or not? Should we call
clear
insidecollide
? If not, what is the reason behind this choice?Thanks!
The text was updated successfully, but these errors were encountered: