humanoid-path-planner/hpp-fcl

Performance compared to fcl

simonschmeisser opened this issue · 7 comments

I added an initial PR for using hpp-fcl as a collision detector in MoveIt: moveit/moveit#3336

Now it seems that in my benchmarks hpp-fcl is slower than fcl in most cases. Is that expected? Am I doing something wrong? Do you have general ideas what I could look for to improve MoveIt's collision checking performance?

The strategy that is currently copied from the fcl plugin is to first do a self-collision check and then do a collision check between each of the robots links and the environment (in form of a pre-computed BVH)

Dear @simonschmeisser,

This is a very nice initiative.
I did a quick reading of your code, and it seems, in general, you use hpp::fcl::collide or hpp::fcl::distance functions to perform the operations. Yet, HPP-FCL is much more efficient by deploying caching mechanisms and functors, as done in Pinocchio (https://github.com/stack-of-tasks/pinocchio/blob/c7530c9731095f6f3e5164ac8e4b925987079f39/src/multibody/geometry.hxx#L50-L62). In addition, you did not activate the acceleration procedures as presented here.

Another benchmark has been performed #318 (comment) and has shown substantial performance gains.

Could you provide the set of basic primitives and meshes you use in your benchmarks? It would be nice to first try to replicate the approach without the additional layer you have added. Indeed, it might be one reason for the limited performances.

Thanks for your quick feedback @jcarpent I'll try to read up on it and see what I can implement.

Benchmarks were done using https://github.com/captain-yoshi/moveit_benchmark_suite

it currently supports the MoveIt API only ( https://github.com/captain-yoshi/moveit_benchmark_suite/blob/master/core/src/scene.cpp ) but there are plans to add support for tesseract and possibly Pinocchio?

Let's go one by one. Could you report the result for one of the object pairs ? It's usually simpler to compare results for primitive shapes.

Eventually some pointers to the code would help if it's not too buried.

Last question, how did you install the two libraries?

I will close this issue as there is no more activity. @simonschmeisser feel free to reopen it.

I'm unfortunately a bit buried in other stuff currently but last time I tried to read up on your comments I did not understand how to follow this part:

In addition, you did not activate the acceleration procedures as presented here.

Do you have a little bit more details please?

I'll need to spend more time to understand the functors. Do I basically create one for each pair of collision geometry and do they stay valid when the global transform of either object changes?

Solved via #478