CostHelper.h
50 // I am member class of the BITstar class (i.e., I am in it's namespace), so I need to include it's definition to be
51 // aware of the class BITstar. It has a forward declaration to me and the other helper classes but I will need to
133 };
140 return this->combineCosts(this->costToComeHeuristic(edgePair.first), this->edgeCostHeuristic(edgePair));
159 for (auto startIter = graphPtr_->startVerticesBeginConst(); startIter != graphPtr_->startVerticesEndConst();
185 for (auto goalIter = graphPtr_->goalVerticesBeginConst(); goalIter != graphPtr_->goalVerticesEndConst();
190 this->motionCostHeuristic(vertex->stateConst(), (*goalIter)->stateConst()));
240 inline bool isCostBetterThanOrEquivalentTo(const ompl::base::Cost &a, const ompl::base::Cost &b) const
248 inline bool isCostWorseThanOrEquivalentTo(const ompl::base::Cost &a, const ompl::base::Cost &b) const
256 inline double fractionalChange(const ompl::base::Cost &newCost, const ompl::base::Cost &oldCost) const
263 inline double fractionalChange(const ompl::base::Cost &newCost, const ompl::base::Cost &oldCost,
268 {
274 };
299 inline ompl::base::Cost combineCosts(const ompl::base::Cost &a, const ompl::base::Cost &b) const
310 };
311 inline ompl::base::Cost motionCostHeuristic(const ompl::base::State *a, const ompl::base::State *b) const
315 inline ompl::base::Cost motionCost(const ompl::base::State *a, const ompl::base::State *b) const
std::pair< VertexConstPtr, VertexConstPtr > VertexConstPtrPair
A pair of const vertices, i.e., an edge.
Definition: BITstar.h:234
VertexPtrVector::const_iterator goalVerticesBeginConst() const
Returns a const-iterator to the front of the goal-vertex vector.
Definition: ImplicitGraph.cpp:1371
VertexPtrVector::const_iterator goalVerticesEndConst() const
Returns a const-iterator to the end of the goal-vertex vector.
Definition: ImplicitGraph.cpp:1376
ompl::base::Cost lowerBoundHeuristicVertex(const VertexConstPtr &vertex) const
Calculates a heuristic estimate of the cost of a solution constrained to pass through a vertex,...
Definition: CostHelper.h:200
ompl::base::Cost lowerBoundHeuristicToTarget(const VertexConstPtrPair &edgePair) const
Calculates a heuristic estimate of the cost of a path to the target of an edge, independent of the cu...
Definition: CostHelper.h:234
CostHelper()=default
Construct the heuristic helper, must be setup before use.
ompl::base::Cost currentHeuristicEdge(const VertexConstPtrPair &edgePair) const
Calculates a heuristic estimate of the cost of a solution constrained to go through an edge,...
Definition: CostHelper.h:225
ompl::base::Cost edgeCostHeuristic(const VertexConstPtrPair &edgePair) const
Calculate a heuristic estimate of the cost of an edge between two Vertices.
Definition: CostHelper.h:268
ompl::base::Cost costToComeHeuristic(const VertexConstPtr &vertex) const
Calculate a heuristic estimate of the cost-to-come for a Vertex.
Definition: CostHelper.h:248
ompl::base::OptimizationObjectivePtr getOptObj() const
Get the underling OptimizationObjective.
Definition: CostHelper.h:190
ompl::base::Cost lowerBoundHeuristicEdge(const VertexConstPtrPair &edgePair) const
Calculates a heuristic estimate of the cost of a solution constrained to go through an edge,...
Definition: CostHelper.h:216
bool isCostNotEquivalentTo(const ompl::base::Cost &a, const ompl::base::Cost &b) const
Compare whether cost a and cost b are not equivalent by checking if either a or b is better than the ...
Definition: CostHelper.h:328
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:111
A shared pointer wrapper for ompl::base::OptimizationObjective.
VertexPtrVector::const_iterator startVerticesEndConst() const
Returns a const-iterator to the end of the start-vertex vector.
Definition: ImplicitGraph.cpp:1366
ompl::base::Cost currentHeuristicToTarget(const VertexConstPtrPair &edgePair) const
Calculates a heuristic estimate of the cost of a path to the target of an edge, dependent on the cost...
Definition: CostHelper.h:242
ompl::base::Cost currentHeuristicVertex(const VertexConstPtr &vertex) const
Calculates a heuristic estimate of the cost of a solution constrained to pass through a vertex,...
Definition: CostHelper.h:208
void setup(const ompl::base::OptimizationObjectivePtr &opt, ImplicitGraph *graph)
Setup the CostHelper, must be called before use.
Definition: CostHelper.h:176
ompl::base::Cost combineCosts(const ompl::base::Cost &a, const ompl::base::Cost &b, const ompl::base::Cost &c) const
Combine 3 costs.
Definition: CostHelper.h:303
bool isCostBetterThanOrEquivalentTo(const ompl::base::Cost &a, const ompl::base::Cost &b) const
Compare whether cost a is better or equivalent to cost b by checking that b is not better than a.
Definition: CostHelper.h:336
double fractionalChange(const ompl::base::Cost &newCost, const ompl::base::Cost &oldCost) const
Calculate the fractional change of cost "newCost" from "oldCost" relative to "oldCost",...
Definition: CostHelper.h:352
ompl::base::Cost costToGoHeuristic(const VertexConstPtr &vertex) const
Calculate a heuristic estimate of the cost-to-go for a Vertex.
Definition: CostHelper.h:274
bool isCostWorseThan(const ompl::base::Cost &a, const ompl::base::Cost &b) const
Compare whether cost a is worse than cost b by checking whether b is better than a.
Definition: CostHelper.h:320
std::shared_ptr< const Vertex > VertexConstPtr
A constant vertex shared pointer.
Definition: BITstar.h:222
ompl::base::Cost trueEdgeCost(const VertexConstPtrPair &edgePair) const
The true cost of an edge, including constraints.
Definition: CostHelper.h:297
VertexPtrVector::const_iterator startVerticesBeginConst() const
Returns a const-iterator to the front of the start-vertex vector.
Definition: ImplicitGraph.cpp:1361
bool isCostWorseThanOrEquivalentTo(const ompl::base::Cost &a, const ompl::base::Cost &b) const
Compare whether cost a is worse or equivalent to cost b by checking that a is not better than b.
Definition: CostHelper.h:344
Main namespace. Contains everything in this library.
Definition: ConstrainedSpaceInformation.h:52