45 ompl::base::PathLengthOptimizationObjective::PathLengthOptimizationObjective(const SpaceInformationPtr &si)
46 : ompl::base::OptimizationObjective(si)
48 description_ = "Path Length";
59 ompl::base::Cost ompl::base::PathLengthOptimizationObjective::motionCost(const State *s1, const State *s2) const
61 return Cost(si_->distance(s1, s2));
64 ompl::base::Cost ompl::base::PathLengthOptimizationObjective::motionCostHeuristic(const State *s1,
65 const State *s2) const
70 ompl::base::InformedSamplerPtr ompl::base::PathLengthOptimizationObjective::allocInformedStateSampler(
71 const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls) const
73 // Make the direct path-length informed sampler and return. If OMPL was compiled with Eigen, a direct version is
78 throw Exception("Direct sampling of the path-length objective requires Eigen, but this version of OMPL was "
79 "compiled without Eigen support. If possible, please install Eigen and recompile OMPL. If this is "
80 "not possible, you can manually create an instantiation of RejectionInfSampler to approximate the "
The description of this optimization objective.
A shared pointer wrapper for ompl::base::ProblemDefinition.
Cost stateCost(const State *s) const override
Returns identity cost.
Cost goalRegionCostToGo(const State *state, const Goal *goal)
For use when the cost-to-go of a state under the optimization objective is equivalent to the goal reg...
void setCostToGoHeuristic(const CostToGoHeuristic &costToGo)
Set the cost-to-go heuristic function for this objective. The cost-to-go heuristic is a function whic...
Cost motionCost(const State *s1, const State *s2) const override
Motion cost for this objective is defined as the configuration space distance between s1 and s2...
InformedSamplerPtr allocInformedStateSampler(const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls) const override
Allocate a state sampler for the path-length objective (i.e., direct ellipsoidal sampling).
Cost motionCostHeuristic(const State *s1, const State *s2) const override
the motion cost heuristic for this objective is simply the configuration space distance between s1 an...