A helper class to handle the various heuristic functions in one place. More...
#include <ompl/geometric/planners/informedtrees/bitstar/CostHelper.h>
Public Member Functions | |
CostHelper ()=default | |
Construct the heuristic helper, must be setup before use. | |
void | setup (const ompl::base::OptimizationObjectivePtr &opt, ImplicitGraph *graph) |
Setup the CostHelper, must be called before use. More... | |
void | reset () |
Reset the CostHelper, returns to state at construction. More... | |
ompl::base::OptimizationObjectivePtr | getOptObj () const |
Get the underling OptimizationObjective. More... | |
ompl::base::Cost | lowerBoundHeuristicVertex (const VertexConstPtr &vertex) const |
Calculates a heuristic estimate of the cost of a solution constrained to pass through a vertex, independent of the current cost-to-come. I.e., combines the heuristic estimates of the cost-to-come and cost-to-go. More... | |
ompl::base::Cost | currentHeuristicVertex (const VertexConstPtr &vertex) const |
Calculates a heuristic estimate of the cost of a solution constrained to pass through a vertex, dependent on the current cost-to-come. I.e., combines the current cost-to-come with a heuristic estimate of the cost-to-go. More... | |
ompl::base::Cost | lowerBoundHeuristicEdge (const VertexConstPtrPair &edgePair) const |
Calculates a heuristic estimate of the cost of a solution constrained to go through an edge, independent of the cost-to-come of the parent state. I.e., combines the heuristic estimates of the cost-to-come, edge cost, and cost-to-go. More... | |
ompl::base::Cost | currentHeuristicEdge (const VertexConstPtrPair &edgePair) const |
Calculates a heuristic estimate of the cost of a solution constrained to go through an edge, dependent on the cost-to-come of the parent state. I.e., combines the current cost-to-come with heuristic estimates of the edge cost, and cost-to-go. More... | |
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 current cost-to-come of the parent state. I.e., combines heuristics estimates of the cost-to-come and the edge cost. More... | |
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-to-come of the parent state. I.e., combines the current cost-to-come with heuristic estimates of the edge cost. More... | |
ompl::base::Cost | costToComeHeuristic (const VertexConstPtr &vertex) const |
Calculate a heuristic estimate of the cost-to-come for a Vertex. More... | |
ompl::base::Cost | edgeCostHeuristic (const VertexConstPtrPair &edgePair) const |
Calculate a heuristic estimate of the cost of an edge between two Vertices. More... | |
ompl::base::Cost | costToGoHeuristic (const VertexConstPtr &vertex) const |
Calculate a heuristic estimate of the cost-to-go for a Vertex. More... | |
ompl::base::Cost | trueEdgeCost (const VertexConstPtrPair &edgePair) const |
The true cost of an edge, including constraints. More... | |
template<typename... Costs> | |
ompl::base::Cost | combineCosts (const ompl::base::Cost &cost, const Costs &... costs) const |
Combine multiple costs. More... | |
ompl::base::Cost | inflateCost (const ompl::base::Cost &cost, double factor) const |
Inflate a cost by a given factor. More... | |
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. More... | |
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 other. More... | |
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. More... | |
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. More... | |
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", i.e., (newCost - oldCost)/oldCost. More... | |
double | fractionalChange (const ompl::base::Cost &newCost, const ompl::base::Cost &oldCost, const ompl::base::Cost &refCost) const |
Calculate the fractional change of cost "newCost" from "oldCost" relative to "refCost", i.e., (newCost - oldCost)/refCost. More... | |
bool | isSatisfied (const ompl::base::Cost &a) const |
bool | isFinite (const ompl::base::Cost &a) const |
bool | isCostEquivalentTo (const ompl::base::Cost &a, const ompl::base::Cost &b) const |
bool | isCostBetterThan (const ompl::base::Cost &a, const ompl::base::Cost &b) const |
ompl::base::Cost | betterCost (const ompl::base::Cost &a, const ompl::base::Cost &b) const |
ompl::base::Cost | combineCosts (const ompl::base::Cost &a, const ompl::base::Cost &b) const |
ompl::base::Cost | infiniteCost () const |
ompl::base::Cost | identityCost () const |
ompl::base::Cost | motionCostHeuristic (const ompl::base::State *a, const ompl::base::State *b) const |
ompl::base::Cost | motionCost (const ompl::base::State *a, const ompl::base::State *b) const |
Detailed Description
A helper class to handle the various heuristic functions in one place.
- Short Description
- A header-only class that consolidates all the various heuristic calculations for vertices/edges in a graph into one place. Most of these functions are simply combinatorial pass-throughs to the OptimizationObjective.
Definition at line 69 of file CostHelper.h.
Member Function Documentation
◆ betterCost()
|
inline |
Definition at line 305 of file CostHelper.h.
◆ combineCosts() [1/2]
|
inline |
Definition at line 309 of file CostHelper.h.
◆ combineCosts() [2/2]
|
inline |
Combine multiple costs.
Definition at line 220 of file CostHelper.h.
◆ costToComeHeuristic()
|
inline |
Calculate a heuristic estimate of the cost-to-come for a Vertex.
Definition at line 158 of file CostHelper.h.
◆ costToGoHeuristic()
|
inline |
Calculate a heuristic estimate of the cost-to-go for a Vertex.
Definition at line 190 of file CostHelper.h.
◆ currentHeuristicEdge()
|
inline |
Calculates a heuristic estimate of the cost of a solution constrained to go through an edge, dependent on the cost-to-come of the parent state. I.e., combines the current cost-to-come with heuristic estimates of the edge cost, and cost-to-go.
Definition at line 135 of file CostHelper.h.
◆ currentHeuristicToTarget()
|
inline |
Calculates a heuristic estimate of the cost of a path to the target of an edge, dependent on the cost-to-come of the parent state. I.e., combines the current cost-to-come with heuristic estimates of the edge cost.
Definition at line 152 of file CostHelper.h.
◆ currentHeuristicVertex()
|
inline |
Calculates a heuristic estimate of the cost of a solution constrained to pass through a vertex, dependent on the current cost-to-come. I.e., combines the current cost-to-come with a heuristic estimate of the cost-to-go.
Definition at line 118 of file CostHelper.h.
◆ edgeCostHeuristic()
|
inline |
Calculate a heuristic estimate of the cost of an edge between two Vertices.
Definition at line 184 of file CostHelper.h.
◆ fractionalChange() [1/2]
|
inline |
Calculate the fractional change of cost "newCost" from "oldCost" relative to "oldCost", i.e., (newCost - oldCost)/oldCost.
Definition at line 266 of file CostHelper.h.
◆ fractionalChange() [2/2]
|
inline |
Calculate the fractional change of cost "newCost" from "oldCost" relative to "refCost", i.e., (newCost - oldCost)/refCost.
Definition at line 273 of file CostHelper.h.
◆ getOptObj()
|
inline |
Get the underling OptimizationObjective.
Definition at line 94 of file CostHelper.h.
◆ identityCost()
|
inline |
Definition at line 317 of file CostHelper.h.
◆ infiniteCost()
|
inline |
Definition at line 313 of file CostHelper.h.
◆ inflateCost()
|
inline |
Inflate a cost by a given factor.
Definition at line 226 of file CostHelper.h.
◆ isCostBetterThan()
|
inline |
Definition at line 301 of file CostHelper.h.
◆ isCostBetterThanOrEquivalentTo()
|
inline |
Compare whether cost a is better or equivalent to cost b by checking that b is not better than a.
Definition at line 250 of file CostHelper.h.
◆ isCostEquivalentTo()
|
inline |
Definition at line 297 of file CostHelper.h.
◆ isCostNotEquivalentTo()
|
inline |
Compare whether cost a and cost b are not equivalent by checking if either a or b is better than the other.
Definition at line 242 of file CostHelper.h.
◆ isCostWorseThan()
|
inline |
Compare whether cost a is worse than cost b by checking whether b is better than a.
Definition at line 234 of file CostHelper.h.
◆ isCostWorseThanOrEquivalentTo()
|
inline |
Compare whether cost a is worse or equivalent to cost b by checking that a is not better than b.
Definition at line 258 of file CostHelper.h.
◆ isFinite()
|
inline |
Definition at line 293 of file CostHelper.h.
◆ isSatisfied()
|
inline |
Definition at line 289 of file CostHelper.h.
◆ lowerBoundHeuristicEdge()
|
inline |
Calculates a heuristic estimate of the cost of a solution constrained to go through an edge, independent of the cost-to-come of the parent state. I.e., combines the heuristic estimates of the cost-to-come, edge cost, and cost-to-go.
Definition at line 126 of file CostHelper.h.
◆ lowerBoundHeuristicToTarget()
|
inline |
Calculates a heuristic estimate of the cost of a path to the target of an edge, independent of the current cost-to-come of the parent state. I.e., combines heuristics estimates of the cost-to-come and the edge cost.
Definition at line 144 of file CostHelper.h.
◆ lowerBoundHeuristicVertex()
|
inline |
Calculates a heuristic estimate of the cost of a solution constrained to pass through a vertex, independent of the current cost-to-come. I.e., combines the heuristic estimates of the cost-to-come and cost-to-go.
Definition at line 104 of file CostHelper.h.
◆ motionCost()
|
inline |
Definition at line 325 of file CostHelper.h.
◆ motionCostHeuristic()
|
inline |
Definition at line 321 of file CostHelper.h.
◆ reset()
|
inline |
Reset the CostHelper, returns to state at construction.
Definition at line 87 of file CostHelper.h.
◆ setup()
|
inline |
Setup the CostHelper, must be called before use.
Definition at line 80 of file CostHelper.h.
◆ trueEdgeCost()
|
inline |
The true cost of an edge, including constraints.
Definition at line 213 of file CostHelper.h.
The documentation for this class was generated from the following file:
- ompl/geometric/planners/informedtrees/bitstar/CostHelper.h