37 #include "ompl/base/objectives/MaximizeMinClearanceObjective.h"
38 #include "ompl/tools/config/MagicConstants.h"
41 ompl::base::MaximizeMinClearanceObjective::
42 MaximizeMinClearanceObjective(
const SpaceInformationPtr &si) :
50 return Cost(si_->getStateValidityChecker()->clearance(s));
60 return Cost(std::numeric_limits<double>::infinity());
65 return Cost(-std::numeric_limits<double>::infinity());
double v
The value of the cost.
void setCostThreshold(Cost c)
Set the cost threshold for objective satisfaction. When a path is found with a cost better than the c...
virtual Cost identityCost(void) const
Returns +infinity, since any cost combined with +infinity under this objective will always return the...
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
virtual Cost stateCost(const State *s) const
Defined as the clearance of the state s, which is computed using the StateValidityChecker in this obj...
virtual bool isCostBetterThan(Cost c1, Cost c2) const
Since we wish to maximize clearance, and costs are equivalent to path clearance, we return the greate...
Definition of an abstract state.
virtual Cost infiniteCost(void) const
Returns -infinity, since no path clearance value can be considered worse than this.
static const double BETTER_PATH_COST_MARGIN
When running algorithms such as RRT*, rewire updates are made when the cost of a path appears better ...