aikido icon indicating copy to clipboard operation
aikido copied to clipboard

OMPL default state sampler

Open jeking04 opened this issue 9 years ago • 2 comments

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.

jeking04 avatar Apr 13 '16 16:04 jeking04

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 SimpleSetup or SpaceInformation classes, because each thread needs it own copy of a sampler. Instead, we need to define a ompl::base::ValidStateSamplerAllocator, a function that, given a pointer to an ompl::base::SpaceInformation, returns ompl::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.

cdellin avatar Apr 15 '16 21:04 cdellin

Archiving

egordon avatar Dec 09 '22 22:12 egordon