SPARStwo.h
1 /*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2013, Rutgers the State University of New Jersey, New Brunswick
5 * All Rights Reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 * * Neither the name of Rutgers University nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *********************************************************************/
34 
35 /* Author: Andrew Dobson */
36 
37 #ifndef OMPL_GEOMETRIC_PLANNERS_SPARS_TWO_
38 #define OMPL_GEOMETRIC_PLANNERS_SPARS_TWO_
39 
40 #include "ompl/geometric/planners/PlannerIncludes.h"
41 #include "ompl/datastructures/NearestNeighbors.h"
42 #include "ompl/geometric/PathSimplifier.h"
43 #include "ompl/util/Time.h"
44 #include "ompl/util/Hash.h"
45 
46 #include <boost/range/adaptor/map.hpp>
47 #include <unordered_map>
48 #include <boost/graph/graph_traits.hpp>
49 #include <boost/graph/adjacency_list.hpp>
50 #include <boost/pending/disjoint_sets.hpp>
51 #include <functional>
52 #include <mutex>
53 #include <iostream>
54 #include <fstream>
55 #include <utility>
56 #include <vector>
57 #include <map>
58 
59 namespace ompl
60 {
61 
62  namespace geometric
63  {
64 
80  class SPARStwo : public base::Planner
81  {
82  public:
83 
85  enum GuardType
86  {
87  START,
88  GOAL,
89  COVERAGE,
90  CONNECTIVITY,
91  INTERFACE,
92  QUALITY,
93  };
94 
96  typedef unsigned long int VertexIndexType;
97 
99  typedef std::pair< VertexIndexType, VertexIndexType > VertexPair;
100 
103  {
106  base::State *pointB_;
107 
110  base::State *sigmaB_;
111 
113  double d_;
114 
117  pointA_(nullptr),
118  pointB_(nullptr),
119  sigmaA_(nullptr),
120  sigmaB_(nullptr),
121  d_(std::numeric_limits<double>::infinity())
122  {
123  }
124 
127  {
128  if (pointA_)
129  {
130  si->freeState(pointA_);
131  pointA_ = nullptr;
132  }
133  if (pointB_)
134  {
135  si->freeState(pointB_);
136  pointB_ = nullptr;
137  }
138  if (sigmaA_)
139  {
140  si->freeState(sigmaA_);
141  sigmaA_ = nullptr;
142  }
143  if (sigmaB_)
144  {
145  si->freeState(sigmaB_);
146  sigmaB_ = nullptr;
147  }
148  d_ = std::numeric_limits<double>::infinity();
149  }
150 
152  void setFirst(const base::State *p, const base::State *s, const base::SpaceInformationPtr& si)
153  {
154  if (pointA_)
155  si->copyState(pointA_, p);
156  else
157  pointA_ = si->cloneState(p);
158  if (sigmaA_)
159  si->copyState(sigmaA_, s);
160  else
161  sigmaA_ = si->cloneState(s);
162  if (pointB_)
163  d_ = si->distance(pointA_, pointB_);
164  }
165 
167  void setSecond(const base::State *p, const base::State *s, const base::SpaceInformationPtr& si)
168  {
169  if (pointB_)
170  si->copyState(pointB_, p);
171  else
172  pointB_ = si->cloneState(p);
173  if (sigmaB_)
174  si->copyState(sigmaB_, s);
175  else
176  sigmaB_ = si->cloneState(s);
177  if (pointA_)
178  d_ = si->distance(pointA_, pointB_);
179  }
180  };
181 
183  typedef std::unordered_map<VertexPair, InterfaceData> InterfaceHash;
184 
185  struct vertex_state_t {
186  typedef boost::vertex_property_tag kind;
187  };
188 
189  struct vertex_color_t {
190  typedef boost::vertex_property_tag kind;
191  };
192 
194  typedef boost::vertex_property_tag kind;
195  };
196 
212  typedef boost::adjacency_list <
213  boost::vecS, boost::vecS, boost::undirectedS,
214  boost::property < vertex_state_t, base::State*,
215  boost::property < boost::vertex_predecessor_t, VertexIndexType,
216  boost::property < boost::vertex_rank_t, VertexIndexType,
217  boost::property < vertex_color_t, GuardType,
218  boost::property < vertex_interface_data_t, InterfaceHash > > > > >,
219  boost::property < boost::edge_weight_t, base::Cost >
220  > Graph;
221 
223  typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
224 
226  typedef boost::graph_traits<Graph>::edge_descriptor Edge;
227 
230 
232  virtual ~SPARStwo();
233 
234  virtual void setProblemDefinition(const base::ProblemDefinitionPtr &pdef);
235 
237  void setStretchFactor(double t)
238  {
239  stretchFactor_ = t;
240  }
241 
243  void setSparseDeltaFraction( double D )
244  {
246  if (sparseDelta_ > 0.0) // setup was previously called
247  sparseDelta_ = D * si_->getMaximumExtent();
248  }
249 
251  void setDenseDeltaFraction( double d )
252  {
254  if (denseDelta_ > 0.0) // setup was previously called
255  denseDelta_ = d * si_->getMaximumExtent();
256  }
257 
259  void setMaxFailures( unsigned int m )
260  {
261  maxFailures_ = m;
262  }
263 
265  unsigned int getMaxFailures( ) const
266  {
267  return maxFailures_;
268  }
269 
271  double getDenseDeltaFraction( ) const
272  {
273  return denseDeltaFraction_;
274  }
275 
277  double getSparseDeltaFraction( ) const
278  {
279  return sparseDeltaFraction_;
280  }
281 
283  double getStretchFactor( ) const
284  {
285  return stretchFactor_;
286  }
287 
290 
293  void constructRoadmap(const base::PlannerTerminationCondition &ptc, bool stopOnMaxFail);
294 
308 
313  void clearQuery();
314 
315  virtual void clear();
316 
318  template<template<typename T> class NN>
320  {
321  nn_.reset(new NN< Vertex >());
322  if (isSetup())
323  setup();
324  }
325 
326  virtual void setup();
327 
329  const Graph& getRoadmap() const
330  {
331  return g_;
332  }
333 
335  unsigned int milestoneCount() const
336  {
337  return boost::num_vertices(g_);
338  }
339 
340  virtual void getPlannerData(base::PlannerData &data) const;
341 
343  void printDebug(std::ostream &out = std::cout) const;
344 
346  // Planner progress property functions
347  std::string getIterationCount() const
348  {
349  return boost::lexical_cast<std::string>(iterations_);
350  }
351  std::string getBestCost() const
352  {
353  return boost::lexical_cast<std::string>(bestCost_);
354  }
355 
356  protected:
357 
359  void freeMemory();
360 
363 
365  bool checkAddCoverage(const base::State *qNew, std::vector<Vertex> &visibleNeighborhood);
366 
368  bool checkAddConnectivity(const base::State *qNew, std::vector<Vertex> &visibleNeighborhood);
369 
371  bool checkAddInterface(const base::State *qNew, std::vector<Vertex> &graphNeighborhood, std::vector<Vertex> &visibleNeighborhood);
372 
374  bool checkAddPath( Vertex v );
375 
377  void resetFailures();
378 
380  void findGraphNeighbors(base::State *st, std::vector<Vertex> &graphNeighborhood, std::vector<Vertex> &visibleNeighborhood);
381 
383  void approachGraph( Vertex v );
384 
386  Vertex findGraphRepresentative(base::State *st);
387 
389  void findCloseRepresentatives(base::State *workArea, const base::State *qNew, Vertex qRep,
390  std::map<Vertex, base::State*> &closeRepresentatives, const base::PlannerTerminationCondition &ptc);
391 
393  void updatePairPoints(Vertex rep, const base::State *q, Vertex r, const base::State *s);
394 
396  void computeVPP(Vertex v, Vertex vp, std::vector<Vertex> &VPPs);
397 
399  void computeX(Vertex v, Vertex vp, Vertex vpp, std::vector<Vertex> &Xs);
400 
402  VertexPair index( Vertex vp, Vertex vpp );
403 
405  InterfaceData& getData( Vertex v, Vertex vp, Vertex vpp );
406 
408  void distanceCheck(Vertex rep, const base::State *q, Vertex r, const base::State *s, Vertex rp);
409 
411  void abandonLists(base::State *st);
412 
414  Vertex addGuard(base::State *state, GuardType type);
415 
417  void connectGuards( Vertex v, Vertex vp );
418 
420  bool haveSolution(const std::vector<Vertex> &start, const std::vector<Vertex> &goal, base::PathPtr &solution);
421 
423  void checkForSolution(const base::PlannerTerminationCondition &ptc, base::PathPtr &solution);
424 
426  bool reachedTerminationCriterion() const;
427 
429  bool reachedFailureLimit () const;
430 
432  base::PathPtr constructSolution(const Vertex start, const Vertex goal) const;
433 
435  bool sameComponent(Vertex m1, Vertex m2);
436 
438  double distanceFunction(const Vertex a, const Vertex b) const
439  {
440  return si_->distance(stateProperty_[a], stateProperty_[b]);
441  }
442 
445 
448 
450  std::shared_ptr< NearestNeighbors<Vertex> > nn_;
451 
454 
456  std::vector<Vertex> startM_;
457 
459  std::vector<Vertex> goalM_;
460 
463 
466 
469 
472 
474  unsigned int maxFailures_;
475 
477  unsigned int nearSamplePoints_;
478 
480  boost::property_map<Graph, vertex_state_t>::type stateProperty_;
481 
484 
486  boost::property_map<Graph, boost::edge_weight_t>::type weightProperty_;
487 
489  boost::property_map<Graph, vertex_color_t>::type colorProperty_;
490 
492  boost::property_map<Graph, vertex_interface_data_t>::type interfaceDataProperty_;
493 
495  boost::disjoint_sets<
496  boost::property_map<Graph, boost::vertex_rank_t>::type,
497  boost::property_map<Graph, boost::vertex_predecessor_t>::type >
501 
504 
506  unsigned int consecutiveFailures_;
507 
509  double sparseDelta_;
510 
512  double denseDelta_;
513 
515  mutable std::mutex graphMutex_;
516 
519 
522 
524  // Planner progress properties
526  long unsigned int iterations_;
529  };
530 
531  }
532 }
533 
534 #endif
bool sameComponent(Vertex m1, Vertex m2)
Check if two milestones (m1 and m2) are part of the same connected component. This is not a const fun...
Definition: SPARStwo.cpp:211
double sparseDeltaFraction_
Maximum visibility range for nodes in the graph as a fraction of maximum extent.
Definition: SPARStwo.h:468
Graph g_
Connectivity graph.
Definition: SPARStwo.h:453
base::State * pointA_
States which lie inside the visibility region of a vertex and support an interface.
Definition: SPARStwo.h:105
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
Definition: PlannerData.h:163
virtual void clear()
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition: SPARStwo.cpp:142
base::ValidStateSamplerPtr sampler_
Sampler user for generating valid samples in the state space.
Definition: SPARStwo.h:444
bool haveSolution(const std::vector< Vertex > &start, const std::vector< Vertex > &goal, base::PathPtr &solution)
Check if there exists a solution, i.e., there exists a pair of milestones such that the first is in s...
Definition: SPARStwo.cpp:174
unsigned int milestoneCount() const
Get the number of vertices in the sparse roadmap.
Definition: SPARStwo.h:335
A shared pointer wrapper for ompl::base::ProblemDefinition.
double distanceFunction(const Vertex a, const Vertex b) const
Compute distance between two milestones (this is simply distance between the states of the milestones...
Definition: SPARStwo.h:438
void setDenseDeltaFraction(double d)
Sets interface support tolerance as a fraction of max. extent.
Definition: SPARStwo.h:251
void findCloseRepresentatives(base::State *workArea, const base::State *qNew, Vertex qRep, std::map< Vertex, base::State * > &closeRepresentatives, const base::PlannerTerminationCondition &ptc)
Finds representatives of samples near qNew_ which are not his representative.
Definition: SPARStwo.cpp:605
A shared pointer wrapper for ompl::base::ValidStateSampler.
std::unordered_map< VertexPair, InterfaceData > InterfaceHash
the hash which maps pairs of neighbor points to pairs of states
Definition: SPARStwo.h:183
void findGraphNeighbors(base::State *st, std::vector< Vertex > &graphNeighborhood, std::vector< Vertex > &visibleNeighborhood)
Finds visible nodes in the graph near st.
Definition: SPARStwo.cpp:560
unsigned long int VertexIndexType
The type used internally for representing vertex IDs.
Definition: SPARStwo.h:96
A shared pointer wrapper for ompl::base::StateSampler.
double denseDeltaFraction_
Maximum range for allowing two samples to support an interface as a fraction of maximum extent...
Definition: SPARStwo.h:471
long unsigned int iterations_
A counter for the number of iterations of the algorithm.
Definition: SPARStwo.h:526
void setStretchFactor(double t)
Sets the stretch factor.
Definition: SPARStwo.h:237
void resetFailures()
A reset function for resetting the failures count.
Definition: SPARStwo.cpp:555
void distanceCheck(Vertex rep, const base::State *q, Vertex r, const base::State *s, Vertex rp)
Performs distance checking for the candidate new state, q against the current information.
Definition: SPARStwo.cpp:702
SPARStwo(const base::SpaceInformationPtr &si)
Constructor.
Definition: SPARStwo.cpp:53
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Vertex findGraphRepresentative(base::State *st)
Finds the representative of the input state, st.
Definition: SPARStwo.cpp:587
base::Cost bestCost_
Best cost found so far by algorithm.
Definition: SPARStwo.h:528
boost::property_map< Graph, boost::edge_weight_t >::type weightProperty_
Access to the weights of each Edge.
Definition: SPARStwo.h:486
std::vector< Vertex > startM_
Array of start milestones.
Definition: SPARStwo.h:456
double getDenseDeltaFraction() const
Retrieve the dense graph interface support delta.
Definition: SPARStwo.h:271
void clearQuery()
Clear the query previously loaded from the ProblemDefinition. Subsequent calls to solve() will reuse ...
Definition: SPARStwo.cpp:135
std::vector< Vertex > goalM_
Array of goal milestones.
Definition: SPARStwo.h:459
void setSparseDeltaFraction(double D)
Sets vertex visibility range as a fraction of max. extent.
Definition: SPARStwo.h:243
virtual base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc)
Function that can solve the motion planning problem. This function can be called multiple times on th...
Definition: SPARStwo.cpp:306
virtual void getPlannerData(base::PlannerData &data) const
Get information about the current run of the motion planner. Repeated calls to this function will upd...
Definition: SPARStwo.cpp:845
double getStretchFactor() const
Retrieve the spanner's set stretch factor.
Definition: SPARStwo.h:283
base::OptimizationObjectivePtr opt_
Objective cost function for PRM graph edges.
Definition: SPARStwo.h:518
base::State * sigmaA_
States which lie just outside the visibility region of a vertex and support an interface.
Definition: SPARStwo.h:109
bool checkAddCoverage(const base::State *qNew, std::vector< Vertex > &visibleNeighborhood)
Checks to see if the sample needs to be added to ensure coverage of the space.
Definition: SPARStwo.cpp:392
unsigned int consecutiveFailures_
A counter for the number of consecutive failed iterations of the algorithm.
Definition: SPARStwo.h:506
virtual void setProblemDefinition(const base::ProblemDefinitionPtr &pdef)
Set the problem definition for the planner. The problem needs to be set before calling solve()...
Definition: SPARStwo.cpp:129
double denseDelta_
Maximum range for allowing two samples to support an interface.
Definition: SPARStwo.h:512
boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, boost::property< vertex_state_t, base::State *, boost::property< boost::vertex_predecessor_t, VertexIndexType, boost::property< boost::vertex_rank_t, VertexIndexType, boost::property< vertex_color_t, GuardType, boost::property< vertex_interface_data_t, InterfaceHash > > > > >, boost::property< boost::edge_weight_t, base::Cost > > Graph
The underlying roadmap graph.
Definition: SPARStwo.h:220
bool checkAddConnectivity(const base::State *qNew, std::vector< Vertex > &visibleNeighborhood)
Checks to see if the sample needs to be added to ensure connectivity.
Definition: SPARStwo.cpp:401
std::pair< VertexIndexType, VertexIndexType > VertexPair
Pair of vertices which support an interface.
Definition: SPARStwo.h:99
void computeVPP(Vertex v, Vertex vp, std::vector< Vertex > &VPPs)
Computes all nodes which qualify as a candidate v" for v and vp.
Definition: SPARStwo.cpp:664
unsigned int getMaxFailures() const
Retrieve the maximum consecutive failure limit.
Definition: SPARStwo.h:265
bool addedSolution_
A flag indicating that a solution has been added during solve()
Definition: SPARStwo.h:503
void setNearestNeighbors()
Set a different nearest neighbors datastructure.
Definition: SPARStwo.h:319
void setSecond(const base::State *p, const base::State *s, const base::SpaceInformationPtr &si)
Sets information for the second interface (i.e. interface with larger index vertex).
Definition: SPARStwo.h:167
Vertex addGuard(base::State *state, GuardType type)
Construct a guard for a given state (state) and store it in the nearest neighbors data structure...
Definition: SPARStwo.cpp:764
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition: RandomNumbers.h:58
void constructRoadmap(const base::PlannerTerminationCondition &ptc)
While the termination condition permits, construct the spanner graph.
Definition: SPARStwo.cpp:239
bool reachedTerminationCriterion() const
Returns true if we have reached the iteration failures limit, maxFailures_ or if a solution was added...
Definition: SPARStwo.cpp:221
virtual void setup()
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Definition: SPARStwo.cpp:96
Base class for a planner.
Definition: Planner.h:230
bool reachedFailureLimit() const
Returns whether we have reached the iteration failures limit, maxFailures_.
Definition: SPARStwo.cpp:216
SPArse Roadmap Spanner Version 2.0
Definition: SPARStwo.h:80
Interface information storage class, which does bookkeeping for criterion four.
Definition: SPARStwo.h:102
base::PathPtr constructSolution(const Vertex start, const Vertex goal) const
Given two milestones from the same connected component, construct a path connecting them and set it a...
Definition: SPARStwo.cpp:794
boost::disjoint_sets< boost::property_map< Graph, boost::vertex_rank_t >::type, boost::property_map< Graph, boost::vertex_predecessor_t >::type > disjointSets_
Data structure that maintains the connected components.
Definition: SPARStwo.h:498
double sparseDelta_
Maximum visibility range for nodes in the graph.
Definition: SPARStwo.h:509
bool checkAddInterface(const base::State *qNew, std::vector< Vertex > &graphNeighborhood, std::vector< Vertex > &visibleNeighborhood)
Checks to see if the current sample reveals the existence of an interface, and if so...
Definition: SPARStwo.cpp:434
void approachGraph(Vertex v)
Approaches the graph from a given vertex.
Definition: SPARStwo.cpp:573
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:48
A shared pointer wrapper for ompl::base::SpaceInformation.
void clear(const base::SpaceInformationPtr &si)
Clears the given interface data.
Definition: SPARStwo.h:126
Definition of an abstract state.
Definition: State.h:50
PathSimplifierPtr psimp_
A path simplifier used to simplify dense paths added to the graph.
Definition: SPARStwo.h:483
std::mutex graphMutex_
Mutex to guard access to the Graph member (g_)
Definition: SPARStwo.h:515
void setMaxFailures(unsigned int m)
Sets the maximum failures until termination.
Definition: SPARStwo.h:259
unsigned int maxFailures_
The number of consecutive failures to add to the graph before termination.
Definition: SPARStwo.h:474
A shared pointer wrapper for ompl::geometric::PathSimplifier.
boost::graph_traits< Graph >::edge_descriptor Edge
Edge in Graph.
Definition: SPARStwo.h:226
std::shared_ptr< NearestNeighbors< Vertex > > nn_
Nearest neighbors data structure.
Definition: SPARStwo.h:450
InterfaceData & getData(Vertex v, Vertex vp, Vertex vpp)
Retrieves the Vertex data associated with v,vp,vpp.
Definition: SPARStwo.cpp:697
GuardType
Enumeration which specifies the reason a guard is added to the spanner.
Definition: SPARStwo.h:85
A shared pointer wrapper for ompl::base::OptimizationObjective.
base::StateSamplerPtr simpleSampler_
Sampler user for generating random in the state space.
Definition: SPARStwo.h:447
void connectGuards(Vertex v, Vertex vp)
Connect two guards in the roadmap.
Definition: SPARStwo.cpp:782
boost::property_map< Graph, vertex_color_t >::type colorProperty_
Access to the colors for the vertices.
Definition: SPARStwo.h:489
void checkForSolution(const base::PlannerTerminationCondition &ptc, base::PathPtr &solution)
Definition: SPARStwo.cpp:371
boost::graph_traits< Graph >::vertex_descriptor Vertex
Vertex in Graph.
Definition: SPARStwo.h:223
const Graph & getRoadmap() const
Retrieve the computed roadmap.
Definition: SPARStwo.h:329
void printDebug(std::ostream &out=std::cout) const
Print debug information about planner.
Definition: SPARStwo.cpp:831
void updatePairPoints(Vertex rep, const base::State *q, Vertex r, const base::State *s)
High-level method which updates pair point information for repV_ with neighbor r. ...
Definition: SPARStwo.cpp:652
void checkQueryStateInitialization()
Check that the query vertex is initialized (used for internal nearest neighbor searches) ...
Definition: SPARStwo.cpp:296
double d_
Last known distance between the two interfaces supported by points_ and sigmas.
Definition: SPARStwo.h:113
base::Cost costHeuristic(Vertex u, Vertex v) const
Given two vertices, returns a heuristic on the cost of the path connecting them. This method wraps Op...
Definition: SPARStwo.cpp:881
double stretchFactor_
Stretch Factor as per graph spanner literature (multiplicative bound on path quality) ...
Definition: SPARStwo.h:465
bool checkAddPath(Vertex v)
Checks vertex v for short paths through its region and adds when appropriate.
Definition: SPARStwo.cpp:465
void freeMemory()
Free all the memory allocated by the planner.
Definition: SPARStwo.cpp:154
SpaceInformationPtr si_
The space information for which planning is done.
Definition: Planner.h:398
void abandonLists(base::State *st)
When a new guard is added at state st, finds all guards who must abandon their interface information ...
Definition: SPARStwo.cpp:747
boost::property_map< Graph, vertex_state_t >::type stateProperty_
Access to the internal base::state at each Vertex.
Definition: SPARStwo.h:480
virtual ~SPARStwo()
Destructor.
Definition: SPARStwo.cpp:91
VertexPair index(Vertex vp, Vertex vpp)
Rectifies indexing order for accessing the vertex data.
Definition: SPARStwo.cpp:687
Vertex queryVertex_
Vertex for performing nearest neighbor queries.
Definition: SPARStwo.h:462
RNG rng_
Random number generator.
Definition: SPARStwo.h:500
boost::property_map< Graph, vertex_interface_data_t >::type interfaceDataProperty_
Access to the interface pair information for the vertices.
Definition: SPARStwo.h:492
void computeX(Vertex v, Vertex vp, Vertex vpp, std::vector< Vertex > &Xs)
Computes all nodes which qualify as a candidate x for v, v', and v".
Definition: SPARStwo.cpp:673
double getSparseDeltaFraction() const
Retrieve the sparse graph visibility range delta.
Definition: SPARStwo.h:277
void setFirst(const base::State *p, const base::State *s, const base::SpaceInformationPtr &si)
Sets information for the first interface (i.e. interface with smaller index vertex).
Definition: SPARStwo.h:152
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:47
unsigned int nearSamplePoints_
Number of sample points to use when trying to detect interfaces.
Definition: SPARStwo.h:477
bool isSetup() const
Check if setup() was called for this planner.
Definition: Planner.cpp:107