PathHybridization.cpp
51 : si_(std::move(si)), stateProperty_(boost::get(vertex_state_t(), g_)), name_("PathHybridization")
107 unsigned int ompl::geometric::PathHybridization::recordPath(const base::PathPtr &pp, bool matchAcrossGaps)
166 matchPaths(*p, *q, (pi.length_ + path.length_) / (2.0 / magic::GAP_COST_FRACTION), indexP, indexQ);
244 void ompl::geometric::PathHybridization::attemptNewEdge(const PathInfo &p, const PathInfo &q, int indexP, int indexQ)
259 void ompl::geometric::PathHybridization::matchPaths(const PathGeometric &p, const PathGeometric &q, double gapCost,
273 double match = si_->distance(p.getState(i), q.getState(j)) + ((i > 0 && j > 0) ? C[i - 1][j - 1] : 0.0);
static const double GAP_COST_FRACTION
The fraction of the path length to consider as gap cost when aligning paths to be hybridized...
Definition: PathHybridization.cpp:46
Definition: SPARSdb.cpp:73
const base::PathPtr & getHybridPath() const
Get the currently computed hybrid path. computeHybridPath() needs to have been called before...
Definition: PathHybridization.cpp:102
std::size_t getStateCount() const
Get the number of states (way-points) that make up this path.
Definition: PathGeometric.h:249
STL namespace.
const std::string & getName() const
Get the name of the algorithm.
Definition: PathHybridization.cpp:83
void computeHybridPath()
Run Dijkstra's algorithm to find out the shortest path among the mixed ones.
Definition: PathHybridization.cpp:88
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathGeometric.h:237
A shared pointer wrapper for ompl::base::SpaceInformation.
void print(std::ostream &out=std::cout) const
Print information about the computed path.
Definition: PathHybridization.cpp:73
unsigned int recordPath(const base::PathPtr &pp, bool matchAcrossGaps)
Add a path to the hybridization. If matchAcrossGaps is true, more possible edge connections are evalu...
Definition: PathHybridization.cpp:107
std::size_t pathCount() const
Get the number of paths that are currently considered as part of the hybridization.
Definition: PathHybridization.cpp:254
void matchPaths(const geometric::PathGeometric &p, const geometric::PathGeometric &q, double gapCost, 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...
Definition: PathHybridization.cpp:259
PathHybridization(base::SpaceInformationPtr si)
The constructor needs to know about the space information of the paths it will operate on...
Definition: PathHybridization.cpp:50
A shared pointer wrapper for ompl::base::Path.