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. | |
| void | reset () |
| Reset the CostHelper, returns to state at construction. | |
| ompl::base::OptimizationObjectivePtr | getOptObj () const |
| Get the underling OptimizationObjective. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| ompl::base::Cost | costToComeHeuristic (const VertexConstPtr &vertex) const |
| Calculate a heuristic estimate of the cost-to-come for a Vertex. | |
| ompl::base::Cost | edgeCostHeuristic (const VertexConstPtrPair &edgePair) const |
| Calculate a heuristic estimate of the cost of an edge between two Vertices. | |
| ompl::base::Cost | costToGoHeuristic (const VertexConstPtr &vertex) const |
| Calculate a heuristic estimate of the cost-to-go for a Vertex. | |
| ompl::base::Cost | trueEdgeCost (const VertexConstPtrPair &edgePair) const |
| The true cost of an edge, including constraints. | |
| template<typename... Costs> | |
| ompl::base::Cost | combineCosts (const ompl::base::Cost &cost, const Costs &...costs) const |
| Combine multiple costs. | |
| ompl::base::Cost | inflateCost (const ompl::base::Cost &cost, double factor) const |
| Inflate a cost by a given factor. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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 68 of file CostHelper.h.
Member Function Documentation
◆ betterCost()
|
inline |
Definition at line 304 of file CostHelper.h.
◆ combineCosts() [1/2]
|
inline |
Definition at line 308 of file CostHelper.h.
◆ combineCosts() [2/2]
|
inline |
Combine multiple costs.
Definition at line 219 of file CostHelper.h.
◆ costToComeHeuristic()
|
inline |
Calculate a heuristic estimate of the cost-to-come for a Vertex.
Definition at line 157 of file CostHelper.h.
◆ costToGoHeuristic()
|
inline |
Calculate a heuristic estimate of the cost-to-go for a Vertex.
Definition at line 189 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 134 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 151 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 117 of file CostHelper.h.
◆ edgeCostHeuristic()
|
inline |
Calculate a heuristic estimate of the cost of an edge between two Vertices.
Definition at line 183 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 265 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 272 of file CostHelper.h.
◆ getOptObj()
|
inline |
Get the underling OptimizationObjective.
Definition at line 93 of file CostHelper.h.
◆ identityCost()
|
inline |
Definition at line 316 of file CostHelper.h.
◆ infiniteCost()
|
inline |
Definition at line 312 of file CostHelper.h.
◆ inflateCost()
|
inline |
Inflate a cost by a given factor.
Definition at line 225 of file CostHelper.h.
◆ isCostBetterThan()
|
inline |
Definition at line 300 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 249 of file CostHelper.h.
◆ isCostEquivalentTo()
|
inline |
Definition at line 296 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 241 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 233 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 257 of file CostHelper.h.
◆ isFinite()
|
inline |
Definition at line 292 of file CostHelper.h.
◆ isSatisfied()
|
inline |
Definition at line 288 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 125 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 143 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 103 of file CostHelper.h.
◆ motionCost()
|
inline |
Definition at line 324 of file CostHelper.h.
◆ motionCostHeuristic()
|
inline |
Definition at line 320 of file CostHelper.h.
◆ reset()
|
inline |
Reset the CostHelper, returns to state at construction.
Definition at line 86 of file CostHelper.h.
◆ setup()
|
inline |
Setup the CostHelper, must be called before use.
Definition at line 79 of file CostHelper.h.
◆ trueEdgeCost()
|
inline |
The true cost of an edge, including constraints.
Definition at line 212 of file CostHelper.h.
The documentation for this class was generated from the following file:
- ompl/geometric/planners/informedtrees/bitstar/CostHelper.h