Closed MaartenBehn closed 2 years ago
Hey,
I have the following times on my computer (AMD Ryzen 7 2700 Eight-Core Processor):
AABB Tree time: 0.395 (test_Bug = False
, test_AABBs_Tree = True
)
Brute-Force time: 0.106 (test_Bug = False
, test_AABBs_Tree = False
)
Because of vectorization and parallelization, building and using the AABBTree is actually a bit slower than not using it at all. Even when I scale the number of tetrahedra up a lot (rigid_body1 = hydroelastic_contact.RigidBody.make_sphere(0.13 * np.ones(3), 0.15, 5)
), I get the following results:
AABB Tree time: 24.787 (test_Bug = False
, test_AABBs_Tree = True
)
Brute-Force time: 2.05 (test_Bug = False
, test_AABBs_Tree = False
)
Still, brute force is way faster. The factor is even bigger. (I don't know why to be honest.)
Conclusion: we need a faster AABBTree implementation :)
btw. you based your branch on hydroelastic_mesh
, which I don't want to merge to master yet. Please cherry-pick your commits to your master branch and make a new PR.
Thx for the rewiev. I will close this PR and create a new one into master.
The AABBs of an axis aligned Cube contains always two equal AABBs for every side of the cube. When unique is turned on the AABBs library deletes one pair hence the wrong results.
Calculation times on my machine: AABB Tree time: 0.14666247367858887 Brute-Force time: 0.9549121856689453