aikido
aikido copied to clipboard
OMPL default state sampler
Current implementation of allocDefaultStateSampler will allocate a sampler that returns the same sequence every time, i.e. two calls to the function will generate samplers that produce identical sequences. Check that this fits within OMPL's intended usage of the function.
FWIW I'm unaware of any particular place in OMPL's docs that require that sampler allocators yield samplers which produce different sequences of samples. However, the top-level samplers documentation here includes this text:
We cannot set the type of sampler directly in the
SimpleSetuporSpaceInformationclasses, because each thread needs it own copy of a sampler. Instead, we need to define aompl::base::ValidStateSamplerAllocator, a function that, given a pointer to anompl::base::SpaceInformation, returnsompl::base::ValidStateSamplerPtr.
(Note that this is for valid samplers, which are often just fancy samplers which also do validity checking -- I think the same semantics are assumed for vanilla samplers.) This talk about threading implies to me that many multi-threaded planners may be implemented in such a way that each thread allocates its own sampler to build a sub-tree of some sort. In this use case, I would expect that if each thread's samples are identical to those of the other threads, the multi-threaded planner would not perform very well. So it may be best to figure out a way for the allocator to yield different samplers.
Archiving