Loading...
Searching...
No Matches
ompl::geometric::BITstar::CostHelper Class Reference

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 69 of file CostHelper.h.

Member Function Documentation

◆ betterCost()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::betterCost ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
inline

Definition at line 305 of file CostHelper.h.

◆ combineCosts() [1/2]

ompl::base::Cost ompl::geometric::BITstar::CostHelper::combineCosts ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
inline

Definition at line 309 of file CostHelper.h.

◆ combineCosts() [2/2]

template<typename... Costs>
ompl::base::Cost ompl::geometric::BITstar::CostHelper::combineCosts ( const ompl::base::Cost & cost,
const Costs &... costs ) const
inline

Combine multiple costs.

Definition at line 220 of file CostHelper.h.

◆ costToComeHeuristic()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::costToComeHeuristic ( const VertexConstPtr & vertex) const
inline

Calculate a heuristic estimate of the cost-to-come for a Vertex.

Definition at line 158 of file CostHelper.h.

◆ costToGoHeuristic()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::costToGoHeuristic ( const VertexConstPtr & vertex) const
inline

Calculate a heuristic estimate of the cost-to-go for a Vertex.

Definition at line 190 of file CostHelper.h.

◆ currentHeuristicEdge()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::currentHeuristicEdge ( const VertexConstPtrPair & edgePair) const
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()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::currentHeuristicToTarget ( const VertexConstPtrPair & edgePair) const
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()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::currentHeuristicVertex ( const VertexConstPtr & vertex) const
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()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::edgeCostHeuristic ( const VertexConstPtrPair & edgePair) const
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]

double ompl::geometric::BITstar::CostHelper::fractionalChange ( const ompl::base::Cost & newCost,
const ompl::base::Cost & oldCost ) const
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]

double ompl::geometric::BITstar::CostHelper::fractionalChange ( const ompl::base::Cost & newCost,
const ompl::base::Cost & oldCost,
const ompl::base::Cost & refCost ) const
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()

ompl::base::OptimizationObjectivePtr ompl::geometric::BITstar::CostHelper::getOptObj ( ) const
inline

Get the underling OptimizationObjective.

Definition at line 94 of file CostHelper.h.

◆ identityCost()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::identityCost ( ) const
inline

Definition at line 317 of file CostHelper.h.

◆ infiniteCost()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::infiniteCost ( ) const
inline

Definition at line 313 of file CostHelper.h.

◆ inflateCost()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::inflateCost ( const ompl::base::Cost & cost,
double factor ) const
inline

Inflate a cost by a given factor.

Definition at line 226 of file CostHelper.h.

◆ isCostBetterThan()

bool ompl::geometric::BITstar::CostHelper::isCostBetterThan ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
inline

Definition at line 301 of file CostHelper.h.

◆ isCostBetterThanOrEquivalentTo()

bool ompl::geometric::BITstar::CostHelper::isCostBetterThanOrEquivalentTo ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
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()

bool ompl::geometric::BITstar::CostHelper::isCostEquivalentTo ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
inline

Definition at line 297 of file CostHelper.h.

◆ isCostNotEquivalentTo()

bool ompl::geometric::BITstar::CostHelper::isCostNotEquivalentTo ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
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()

bool ompl::geometric::BITstar::CostHelper::isCostWorseThan ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
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()

bool ompl::geometric::BITstar::CostHelper::isCostWorseThanOrEquivalentTo ( const ompl::base::Cost & a,
const ompl::base::Cost & b ) const
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()

bool ompl::geometric::BITstar::CostHelper::isFinite ( const ompl::base::Cost & a) const
inline

Definition at line 293 of file CostHelper.h.

◆ isSatisfied()

bool ompl::geometric::BITstar::CostHelper::isSatisfied ( const ompl::base::Cost & a) const
inline

Definition at line 289 of file CostHelper.h.

◆ lowerBoundHeuristicEdge()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::lowerBoundHeuristicEdge ( const VertexConstPtrPair & edgePair) const
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()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::lowerBoundHeuristicToTarget ( const VertexConstPtrPair & edgePair) const
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()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::lowerBoundHeuristicVertex ( const VertexConstPtr & vertex) const
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()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::motionCost ( const ompl::base::State * a,
const ompl::base::State * b ) const
inline

Definition at line 325 of file CostHelper.h.

◆ motionCostHeuristic()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::motionCostHeuristic ( const ompl::base::State * a,
const ompl::base::State * b ) const
inline

Definition at line 321 of file CostHelper.h.

◆ reset()

void ompl::geometric::BITstar::CostHelper::reset ( )
inline

Reset the CostHelper, returns to state at construction.

Definition at line 87 of file CostHelper.h.

◆ setup()

void ompl::geometric::BITstar::CostHelper::setup ( const ompl::base::OptimizationObjectivePtr & opt,
ImplicitGraph * graph )
inline

Setup the CostHelper, must be called before use.

Definition at line 80 of file CostHelper.h.

◆ trueEdgeCost()

ompl::base::Cost ompl::geometric::BITstar::CostHelper::trueEdgeCost ( const VertexConstPtrPair & edgePair) const
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