37 #ifndef OMPL_BASE_OBJECTIVES_STATE_COST_OPTIMIZATION_OBJECTIVE_
38 #define OMPL_BASE_OBJECTIVES_STATE_COST_OPTIMIZATION_OBJECTIVE_
40 #include "ompl/base/OptimizationObjective.h"
65 bool enableMotionCostInterpolation =
false);
110 return Cost(0.5 * dist * (c1.
v + c2.
v));
bool interpolateMotionCost_
If true, then motionCost() will more accurately compute the cost of a motion by taking small steps al...
bool isMotionCostInterpolationEnabled(void) const
Returns whether this objective subdivides motions into smaller segments for more accurate motion cost...
double v
The value of the cost.
virtual Cost motionCost(const State *s1, const State *s2) const
Compute the cost of a path segment from s1 to s2 (including endpoints)
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Defines optimization objectives where path cost can be represented as a path integral over a cost fun...
Definition of an abstract state.
StateCostIntegralObjective(const SpaceInformationPtr &si, bool enableMotionCostInterpolation=false)
If enableMotionCostInterpolation is set to true, then calls to motionCost() will divide the motion se...
Cost trapezoid(Cost c1, Cost c2, double dist) const
Helper method which uses the trapezoidal rule to approximate the integral of the cost between two sta...
Abstract definition of optimization objectives.