InformedStateSampler.cpp
49 InformedSampler::InformedSampler(const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls)
50 : probDefn_(probDefn), space_(probDefn->getSpaceInformation()->getStateSpace()), numIters_(maxNumberCalls)
56 throw Exception("InformedSampler: An optimization objective must be specified at construction.");
73 // Subtract the measures defined by the max and min costs. These will be defined in the deriving class.
79 // Return the best heuristic estimate of the cost-to-come and cost-to-go from the state considering all
113 }
123 InformedStateSampler::InformedStateSampler(const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls,
129 costFunc, probDefn->getOptimizationObjective()->allocInformedStateSampler(probDefn, maxNumberCalls));
171 void InformedStateSampler::sampleUniformNear(State *statePtr, const State *near, const double distance)
178 void InformedStateSampler::sampleGaussian(State *statePtr, const State *mean, const double stdDev)
179 {
void sampleGaussian(State *statePtr, const State *mean, double stdDev) override
By default sampleGaussian throws. This can be overloaded by a specific informed sampler if desired.
Definition: InformedStateSampler.cpp:242
ProblemDefinitionPtr probDefn_
A copy of the problem definition.
Definition: InformedStateSampler.h:177
unsigned int getMaxNumberOfIters() const
Definition: InformedStateSampler.cpp:179
void sampleUniformNear(State *statePtr, const State *near, double distance) override
By default sampleUniformNear throws. This can be overloaded by a specific informed sampler if desired...
Definition: InformedStateSampler.cpp:235
ProblemDefinitionPtr getProblemDefn() const
Definition: InformedStateSampler.cpp:174
A shared pointer wrapper for ompl::base::ProblemDefinition.
OptimizationObjectivePtr opt_
A copy of the optimization objective.
Definition: InformedStateSampler.h:179
InformedStateSampler(const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls, const GetCurrentCostFunc &costFunc)
Construct a sampler that only generates states with a heuristic solution estimate that is less than t...
Definition: InformedStateSampler.cpp:187
virtual double getInformedMeasure(const Cost ¤tCost) const =0
The measure of the subset of the state space defined by the current solution cost that is being searc...
unsigned int numIters_
The number of iterations I'm allowed to attempt.
Definition: InformedStateSampler.h:183
virtual Cost heuristicSolnCost(const State *statePtr) const
A helper function to calculate the heuristic estimate of the solution cost for a given state using th...
Definition: InformedStateSampler.cpp:141
void sampleUniform(State *statePtr) override
Sample uniformly in the subset of the state space whose heuristic solution estimates are less than th...
Definition: InformedStateSampler.cpp:218
virtual StateSamplerPtr allocDefaultStateSampler() const =0
Allocate an instance of the default uniform state sampler for this space.
Main namespace. Contains everything in this library.
Definition: MultiLevelPlanarManipulatorDemo.cpp:65