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

TODO: avoid BVH-BVH copy in collide? #559

Open
lmontaut opened this issue Mar 29, 2024 · 0 comments
Open

TODO: avoid BVH-BVH copy in collide? #559

lmontaut opened this issue Mar 29, 2024 · 0 comments
Labels

Comments

@lmontaut
Copy link
Contributor

BVH-BVH makes a full copy of both BVHs + BV fitting before calling collide:
https://github.com/humanoid-path-planner/hpp-fcl/blob/aa3c40a994b44c1d9ea1f007ff07999a016fe61c/src/collision_func_matrix.cpp#L214-L229

Doing this not only copies two BVHs (which can have thousands or even hundreds of thousands of vertices) but also fits them with a new BVs structure.
I think the original idea was to transform both BVH in the world frame, hence avoiding having to transform each AABB when doing the collision between leafs of the BVHs.

In practice, when doing BVH-BVH collision, there are only a few AABB collision checks, and transforming an AABB is very cheap. Is it really worth copying/fitting two BVHs in order to avoid these on-the-fly transformations?

@lmontaut lmontaut added the todo label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant