OMPL state validation callback is 2-3 times slower than using default state validation checking
Posted: 24 Jan 2019, 18:19
I noticed that using simOMPL.setStateValidationCallback is slower than using the default state validation (e.g. specifying collision pairs by simOMPL.setCollisionPairs). I have implemented the same collision checking in the callback function that I would expect to be implemented by default when no callback function is specified. You can find the demo scene here: https://drive.google.com/open?id=1uTJMo ... QdaOhqDKMj
All you need to do is comment one of the following 2 lines, run the simulation and look at the terminal and check "Info: PRMstar: Created xxx states."
With callback function it is about 3 times slower (3 times fewer created states) than without callback function.
My questions:
In general I would like planning to run as fast as possible. I noticed that when running OMPL planning, that only one CPU core is fully utilized. How could I run planning on several CPUs? Do I need to run several instances of identical V-REP scenes? But how would I "distribute" the work and "combine" the results for planning in several environments"?
Thanks,
Uli
All you need to do is comment one of the following 2 lines, run the simulation and look at the terminal and check "Info: PRMstar: Created xxx states."
Code: Select all
--simOMPL.setCollisionPairs(t,collisionPairs)
simOMPL.setStateValidationCallback(t,'stateValidationCheckCollision')
My questions:
- Why is the callback function slower? Shouldn't both methods perform the same operations (e.g. reading/writing states and collision checking)? Are there any additional operations by the callback that slow it down?
Or is it because LUA script is slower than the compiled plugin?
- Would I get a speed up by implementing the state validation on the plugin side instead of using a callback function? It might not be straight forward implementing that on the plugin side.
In general I would like planning to run as fast as possible. I noticed that when running OMPL planning, that only one CPU core is fully utilized. How could I run planning on several CPUs? Do I need to run several instances of identical V-REP scenes? But how would I "distribute" the work and "combine" the results for planning in several environments"?
Thanks,
Uli