-
Notifications
You must be signed in to change notification settings - Fork 986
Fcl combined collision check #3167
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
base: master
Are you sure you want to change the base?
Fcl combined collision check #3167
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3167 +/- ##
==========================================
- Coverage 62.08% 62.07% -0.00%
==========================================
Files 375 375
Lines 33139 33200 +61
==========================================
+ Hits 20572 20607 +35
- Misses 12567 12593 +26
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Note that |
302822c to
a52d835
Compare
52ea399 to
3d441b0
Compare
3d441b0 to
8f6fd08
Compare
this didn't match the behavior of PlanningScene and had a strong impact on Bullet performance in benchmarks
8f6fd08 to
2c1bf03
Compare
|
Looking at the rest of the test cases I noticed that the impact of the expensive BVH creation increases for simpler test cases (only one box) with collisions: But if not in collision we still see the nice improvement: Also somewhat unrelated but very surprising non-colliding collision checks with meshes seem to be more than a factor 2 cheaper than with boxes (60.000/s vs 24.000/s). I'll investigate that further as well @Levi-Armstrong any further ideas and hints on where to improve? I found a comment in tesseract where you concluded that collisions between two BVHs / managers are slower than iterating over a list and colliding each entry with the second BVH/manager. How did you get to that conclusion? |
|
To be honest, this looks like a small improvement in most cases. But occasionally it's a very large penalty. I'm not sure it's worth it. |
|
Nice graphs !
This makes a huge difference for tests that returns after the first collision. The framework that happens to check the object in collision first will obviously be faster. I agree for tests that checks all the collisions. Also I think Tesseract tells FCL that it uses convex meshes and there are some optimisation done. Can we add this flag in MoveIt to tell FCL that the meshes are convex ? @v4hn Il try adding the collision check with Tesseract in the benchmark suite (probably in October). That way we could check the graphs and @simonschmeisser could compare the flame graphs. |
|
There have been long and recurring discussions about declaring meshes as convex in URDF that never lead anywhere. FCL has a different geometry type for convex meshes, I'll try what happens when I change it in general and if improvements are promising convex decomposition from bullet HACD could be used here as well like tesseract seems to do. |
I believe the main argument for convex meshes, capsules,... was always that urdf must not be changed. I strongly hoped the situation would change at least with ros2. |
|
While the 4% is nice, would that be a breaking change for the worst time complexity ? I think a
For real-time applications, I would prefer a worst case of |
1dae0c8 to
5323772
Compare
e1b0ec1 to
fdc3b1c
Compare









This should speed up collision checks with FCL by not converting the RobotState to a FclCollisionManager (a BVH for example) up to four times but only once. This "conversion" includes calculating AABBs for each Link which is at least one matrix multiplication.
Also checking two optimized spatial structures against each other might be faster than doing these checks per scene object.
I would be really grateful to @captain-yoshi if you could run benchmarks to test the speed gain. Should be especially visible in case of no collisions. If you provide me with the scripts, I can also run the actual benchmarks myself.
The separation between padded collision checking for robot-scene collision and unpadded self-collisions somewhat limits the benefits of this optimization. To save it I have some more todos: