ompl::geometric::PathHybridization Class Reference

Given multiple geometric paths, attempt to combine them in order to obtain a shorter solution. More...

#include <ompl/geometric/PathHybridization.h>

Public Member Functions

 PathHybridization (base::SpaceInformationPtr si)
 The constructor needs to know about the space information of the paths it will operate on. More...
 
 PathHybridization (base::SpaceInformationPtr si, base::OptimizationObjectivePtr obj)
 This constructor also takes an alternative Optimization Objective to find lower costs for arbitrary objectives. More...
 
const geometric::PathGeometricPtr & getHybridPath () const
 Get the currently computed hybrid path. computeHybridPath() needs to have been called before. More...
 
void computeHybridPath ()
 Run Dijkstra's algorithm to find out the lowest-cost path among the mixed ones. More...
 
unsigned int recordPath (const geometric::PathGeometricPtr &pp, bool matchAcrossGaps)
 Add a path to the hybridization. If matchAcrossGaps is true, more possible edge connections are evaluated. Return the number of attempted connections between paths. More...
 
std::size_t pathCount () const
 Get the number of paths that are currently considered as part of the hybridization. More...
 
void matchPaths (const geometric::PathGeometric &p, const geometric::PathGeometric &q, double gapValue, std::vector< int > &indexP, std::vector< int > &indexQ) const
 Given two geometric paths p and q, compute the alignment of the paths using dynamic programming in an edit-distance like fashion, as described in the referenced paper. The cost of a gap is considered to be gapCost. The output of the computation is two arrays indexP and indexQ of equal length, such that these arrays contain matching index positions from the states in p and q, respectively. Gaps are marked by -1. More...
 
void clear ()
 Clear all the stored paths. More...
 
void print (std::ostream &out=std::cout) const
 Print information about the computed path. More...
 
const std::string & getName () const
 Get the name of the algorithm. More...
 

Detailed Description

Given multiple geometric paths, attempt to combine them in order to obtain a shorter solution.

External documentation

B. Raveh, A. Enosh, and D. Halperin, A little more, a lot better: Improving path quality by a path-merging algorithm, IEEE Trans. on Robotics, vol. 27, pp. 365–371, Apr. 2011. DOI: 10.1109/TRO.2010.2098622
[PDF]

Definition at line 70 of file PathHybridization.h.

Constructor & Destructor Documentation

◆ PathHybridization() [1/2]

ompl::geometric::PathHybridization::PathHybridization ( base::SpaceInformationPtr  si)

The constructor needs to know about the space information of the paths it will operate on.

Definition at line 52 of file PathHybridization.cpp.

◆ PathHybridization() [2/2]

ompl::geometric::PathHybridization::PathHybridization ( base::SpaceInformationPtr  si,
base::OptimizationObjectivePtr  obj 
)

This constructor also takes an alternative Optimization Objective to find lower costs for arbitrary objectives.

Definition at line 64 of file PathHybridization.cpp.

Member Function Documentation

◆ clear()

void ompl::geometric::PathHybridization::clear ( )

Clear all the stored paths.

Definition at line 81 of file PathHybridization.cpp.

◆ computeHybridPath()

void ompl::geometric::PathHybridization::computeHybridPath ( )

Run Dijkstra's algorithm to find out the lowest-cost path among the mixed ones.

Definition at line 108 of file PathHybridization.cpp.

◆ getHybridPath()

const ompl::geometric::PathGeometricPtr & ompl::geometric::PathHybridization::getHybridPath ( ) const

Get the currently computed hybrid path. computeHybridPath() needs to have been called before.

Definition at line 132 of file PathHybridization.cpp.

◆ getName()

const std::string & ompl::geometric::PathHybridization::getName ( ) const

Get the name of the algorithm.

Definition at line 103 of file PathHybridization.cpp.

◆ matchPaths()

void ompl::geometric::PathHybridization::matchPaths ( const geometric::PathGeometric p,
const geometric::PathGeometric q,
double  gapValue,
std::vector< int > &  indexP,
std::vector< int > &  indexQ 
) const

Given two geometric paths p and q, compute the alignment of the paths using dynamic programming in an edit-distance like fashion, as described in the referenced paper. The cost of a gap is considered to be gapCost. The output of the computation is two arrays indexP and indexQ of equal length, such that these arrays contain matching index positions from the states in p and q, respectively. Gaps are marked by -1.

Definition at line 284 of file PathHybridization.cpp.

◆ pathCount()

std::size_t ompl::geometric::PathHybridization::pathCount ( ) const

Get the number of paths that are currently considered as part of the hybridization.

Definition at line 279 of file PathHybridization.cpp.

◆ print()

void ompl::geometric::PathHybridization::print ( std::ostream &  out = std::cout) const

Print information about the computed path.

Definition at line 93 of file PathHybridization.cpp.

◆ recordPath()

unsigned int ompl::geometric::PathHybridization::recordPath ( const geometric::PathGeometricPtr &  pp,
bool  matchAcrossGaps 
)

Add a path to the hybridization. If matchAcrossGaps is true, more possible edge connections are evaluated. Return the number of attempted connections between paths.

Definition at line 137 of file PathHybridization.cpp.


The documentation for this class was generated from the following files: