37 #include "ompl/base/objectives/MechanicalWorkOptimizationObjective.h"
41 double pathLengthWeight) :
43 pathLengthWeight_(pathLengthWeight)
50 return pathLengthWeight_;
54 const State *s2)
const
57 double positiveCostAccrued = std::max(stateCost(s2).v - stateCost(s1).v, 0.0);
58 return Cost(positiveCostAccrued + pathLengthWeight_*si_->distance(s1,s2));
std::string description_
The description of this optimization objective.
virtual Cost motionCost(const State *s1, const State *s2) const
Defines motion cost in terms of the mechanical work formulation used for TRRT.
virtual double getPathLengthWeight(void) const
Set the factor to use for weighing path length in the mechanical work objective formulation.
MechanicalWorkOptimizationObjective(const SpaceInformationPtr &si, double pathLengthWeight=0.00001)
The mechanical work formulation requires a weighing factor to use for the length of a path in order t...
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition of an abstract state.
Abstract definition of optimization objectives.