All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
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 
45 #include <boost/range/adaptor/map.hpp>
46 #include <boost/unordered_map.hpp>
47 #include <boost/graph/graph_traits.hpp>
48 #include <boost/graph/adjacency_list.hpp>
49 #include <boost/pending/disjoint_sets.hpp>
50 #include <boost/function.hpp>
51 #include <boost/thread.hpp>
52 #include <iostream>
53 #include <fstream>
54 #include <utility>
55 #include <vector>
56 #include <map>
57 
58 namespace ompl
59 {
60 
61  namespace geometric
62  {
63 
79  class SPARStwo : public base::Planner
80  {
81  public:
82 
84  enum GuardType
85  {
86  START,
87  GOAL,
88  COVERAGE,
89  CONNECTIVITY,
90  INTERFACE,
91  QUALITY,
92  };
93 
95  typedef unsigned long int VertexIndexType;
96 
98  typedef std::pair< VertexIndexType, VertexIndexType > VertexPair;
99 
102  {
105  base::State* pointB_;
106 
109  base::State* sigmaB_;
110 
112  double d_;
113 
116  pointA_(NULL),
117  pointB_(NULL),
118  sigmaA_(NULL),
119  sigmaB_(NULL),
120  d_(std::numeric_limits<double>::infinity())
121  {
122  }
123 
126  {
127  if (pointA_)
128  {
129  si->freeState(pointA_);
130  pointA_ = NULL;
131  }
132  if (pointB_)
133  {
134  si->freeState(pointB_);
135  pointB_ = NULL;
136  }
137  if (sigmaA_)
138  {
139  si->freeState(sigmaA_);
140  sigmaA_ = NULL;
141  }
142  if (sigmaB_)
143  {
144  si->freeState(sigmaB_);
145  sigmaB_ = NULL;
146  }
147  d_ = std::numeric_limits<double>::infinity();
148  }
149 
151  void setFirst(const base::State *p, const base::State *s, const base::SpaceInformationPtr& si)
152  {
153  if (pointA_)
154  si->copyState(pointA_, p);
155  else
156  pointA_ = si->cloneState(p);
157  if (sigmaA_)
158  si->copyState(sigmaA_, s);
159  else
160  sigmaA_ = si->cloneState(s);
161  if (pointB_)
162  d_ = si->distance(pointA_, pointB_);
163  }
164 
166  void setSecond(const base::State *p, const base::State *s, const base::SpaceInformationPtr& si)
167  {
168  if (pointB_)
169  si->copyState(pointB_, p);
170  else
171  pointB_ = si->cloneState(p);
172  if (sigmaB_)
173  si->copyState(sigmaB_, s);
174  else
175  sigmaB_ = si->cloneState(s);
176  if (pointA_)
177  d_ = si->distance(pointA_, pointB_);
178  }
179  };
180 
182  typedef boost::unordered_map< VertexPair, InterfaceData, boost::hash< VertexPair > > InterfaceHash;
183 
184  // The InterfaceHash structure is wrapped inside of this struct due to a compilation error on
185  // GCC 4.6 with Boost 1.48. An implicit assignment operator overload does not compile with these
186  // components, so an explicit overload is given here.
187  // Remove this struct when the minimum Boost requirement is > v1.48.
189  {
190  InterfaceHashStruct& operator=(const InterfaceHashStruct &rhs) { interfaceHash = rhs.interfaceHash; return *this; }
191  InterfaceHash interfaceHash;
192  };
193 
194  struct vertex_state_t {
195  typedef boost::vertex_property_tag kind;
196  };
197 
198  struct vertex_color_t {
199  typedef boost::vertex_property_tag kind;
200  };
201 
203  typedef boost::vertex_property_tag kind;
204  };
205 
221  typedef boost::adjacency_list <
222  boost::vecS, boost::vecS, boost::undirectedS,
223  boost::property < vertex_state_t, base::State*,
224  boost::property < boost::vertex_predecessor_t, VertexIndexType,
225  boost::property < boost::vertex_rank_t, VertexIndexType,
226  boost::property < vertex_color_t, GuardType,
227  boost::property < vertex_interface_data_t, InterfaceHashStruct > > > > >,
228  boost::property < boost::edge_weight_t, double >
229  > Graph;
230 
232  typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
233 
235  typedef boost::graph_traits<Graph>::edge_descriptor Edge;
236 
239 
241  virtual ~SPARStwo(void);
242 
243  virtual void setProblemDefinition(const base::ProblemDefinitionPtr &pdef);
244 
246  void setStretchFactor(double t)
247  {
248  stretchFactor_ = t;
249  }
250 
252  void setSparseDeltaFraction( double D )
253  {
255  if (sparseDelta_ > 0.0) // setup was previously called
256  sparseDelta_ = D * si_->getMaximumExtent();
257  }
258 
260  void setDenseDeltaFraction( double d )
261  {
263  if (denseDelta_ > 0.0) // setup was previously called
264  denseDelta_ = d * si_->getMaximumExtent();
265  }
266 
268  void setMaxFailures( unsigned int m )
269  {
270  maxFailures_ = m;
271  }
272 
274  unsigned int getMaxFailures( ) const
275  {
276  return maxFailures_;
277  }
278 
280  double getDenseDeltaFraction( ) const
281  {
282  return denseDeltaFraction_;
283  }
284 
286  double getSparseDeltaFraction( ) const
287  {
288  return sparseDeltaFraction_;
289  }
290 
292  double getStretchFactor( ) const
293  {
294  return stretchFactor_;
295  }
296 
299 
302  void constructRoadmap(const base::PlannerTerminationCondition &ptc, bool stopOnMaxFail);
303 
317 
322  void clearQuery(void);
323 
324  virtual void clear(void);
325 
327  template<template<typename T> class NN>
329  {
330  nn_.reset(new NN< Vertex >());
331  if (isSetup())
332  setup();
333  }
334 
335  virtual void setup(void);
336 
338  const Graph& getRoadmap(void) const
339  {
340  return g_;
341  }
342 
344  unsigned int milestoneCount(void) const
345  {
346  return boost::num_vertices(g_);
347  }
348 
350  long unsigned int getIterations(void) const
351  {
352  return iterations_;
353  }
354 
355  virtual void getPlannerData(base::PlannerData &data) const;
356 
357  protected:
358 
360  void freeMemory(void);
361 
364 
366  bool checkAddCoverage(const base::State *qNew, std::vector<Vertex> &visibleNeighborhood);
367 
369  bool checkAddConnectivity(const base::State *qNew, std::vector<Vertex> &visibleNeighborhood);
370 
372  bool checkAddInterface(const base::State *qNew, std::vector<Vertex> &graphNeighborhood, std::vector<Vertex> &visibleNeighborhood);
373 
375  bool checkAddPath( Vertex v );
376 
378  void resetFailures(void);
379 
381  void findGraphNeighbors(base::State* st, std::vector<Vertex> &graphNeighborhood, std::vector<Vertex> &visibleNeighborhood);
382 
384  void approachGraph( Vertex v );
385 
388 
390  void findCloseRepresentatives(base::State *workArea, const base::State *qNew, Vertex qRep,
391  std::map<Vertex, base::State*> &closeRepresentatives, const base::PlannerTerminationCondition &ptc);
392 
394  void updatePairPoints(Vertex rep, const base::State *q, Vertex r, const base::State *s);
395 
397  void computeVPP(Vertex v, Vertex vp, std::vector<Vertex> &VPPs);
398 
400  void computeX(Vertex v, Vertex vp, Vertex vpp, std::vector<Vertex> &Xs);
401 
403  VertexPair index( Vertex vp, Vertex vpp );
404 
406  InterfaceData& getData( Vertex v, Vertex vp, Vertex vpp );
407 
409  void distanceCheck(Vertex rep, const base::State *q, Vertex r, const base::State *s, Vertex rp);
410 
412  void abandonLists(base::State* st);
413 
415  Vertex addGuard(base::State *state, GuardType type);
416 
418  void connectGuards( Vertex v, Vertex vp );
419 
421  bool haveSolution(const std::vector<Vertex> &start, const std::vector<Vertex> &goal, base::PathPtr &solution);
422 
425 
427  bool reachedTerminationCriterion(void) const;
428 
430  bool reachedFailureLimit (void) const;
431 
433  base::PathPtr constructSolution(const Vertex start, const Vertex goal) const;
434 
436  bool sameComponent(Vertex m1, Vertex m2);
437 
439  double distanceFunction(const Vertex a, const Vertex b) const
440  {
441  return si_->distance(stateProperty_[a], stateProperty_[b]);
442  }
443 
446 
449 
451  boost::shared_ptr< NearestNeighbors<Vertex> > nn_;
452 
455 
457  std::vector<Vertex> startM_;
458 
460  std::vector<Vertex> goalM_;
461 
464 
467 
470 
473 
475  unsigned int maxFailures_;
476 
478  unsigned int nearSamplePoints_;
479 
481  boost::property_map<Graph, vertex_state_t>::type stateProperty_;
482 
485 
487  boost::property_map<Graph, boost::edge_weight_t>::type weightProperty_;
488 
490  boost::property_map<Graph, vertex_color_t>::type colorProperty_;
491 
493  boost::property_map<Graph, vertex_interface_data_t>::type interfaceDataProperty_;
494 
496  boost::disjoint_sets<
497  boost::property_map<Graph, boost::vertex_rank_t>::type,
498  boost::property_map<Graph, boost::vertex_predecessor_t>::type >
502 
505 
507  unsigned int consecutiveFailures_;
508 
510  long unsigned int iterations_;
511 
513  double sparseDelta_;
514 
516  double denseDelta_;
517 
519  mutable boost::mutex graphMutex_;
520 
521  };
522 
523  }
524 }
525 
526 #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:163
double sparseDeltaFraction_
Maximum visibility range for nodes in the graph as a fraction of maximum extent.
Definition: SPARStwo.h:469
virtual ~SPARStwo(void)
Destructor.
Definition: SPARStwo.cpp:83
Graph g_
Connectivity graph.
Definition: SPARStwo.h:454
base::State * pointA_
States which lie inside the visibility region of a vertex and support an interface.
Definition: SPARStwo.h:104
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
Definition: PlannerData.h:164
base::ValidStateSamplerPtr sampler_
Sampler user for generating valid samples in the state space.
Definition: SPARStwo.h:445
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:143
A boost 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:439
void setDenseDeltaFraction(double d)
Sets interface support tolerance as a fraction of max. extent.
Definition: SPARStwo.h:260
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:554
A boost shared pointer wrapper for ompl::base::ValidStateSampler.
void findGraphNeighbors(base::State *st, std::vector< Vertex > &graphNeighborhood, std::vector< Vertex > &visibleNeighborhood)
Finds visible nodes in the graph near st.
Definition: SPARStwo.cpp:509
unsigned long int VertexIndexType
The type used internally for representing vertex IDs.
Definition: SPARStwo.h:95
A boost 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:472
long unsigned int iterations_
A counter for the number of iterations of the algorithm.
Definition: SPARStwo.h:510
void setStretchFactor(double t)
Sets the stretch factor.
Definition: SPARStwo.h:246
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:651
SPARStwo(const base::SpaceInformationPtr &si)
Constructor.
Definition: SPARStwo.cpp:52
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:536
boost::property_map< Graph, boost::edge_weight_t >::type weightProperty_
Access to the weights of each Edge.
Definition: SPARStwo.h:487
std::vector< Vertex > startM_
Array of start milestones.
Definition: SPARStwo.h:457
bool isSetup(void) const
Check if setup() was called for this planner.
Definition: Planner.cpp:107
bool reachedFailureLimit(void) const
Returns whether we have reached the iteration failures limit, maxFailures_.
Definition: SPARStwo.cpp:168
long unsigned int getIterations(void) const
Get the number of iterations the algorithm performed.
Definition: SPARStwo.h:350
double getDenseDeltaFraction() const
Retrieve the dense graph interface support delta.
Definition: SPARStwo.h:280
std::vector< Vertex > goalM_
Array of goal milestones.
Definition: SPARStwo.h:460
unsigned int milestoneCount(void) const
Get the number of vertices in the sparse roadmap.
Definition: SPARStwo.h:344
void setSparseDeltaFraction(double D)
Sets vertex visibility range as a fraction of max. extent.
Definition: SPARStwo.h:252
void setNearestNeighbors(void)
Set a different nearest neighbors datastructure.
Definition: SPARStwo.h:328
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:255
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:774
double getStretchFactor() const
Retrieve the spanner's set stretch factor.
Definition: SPARStwo.h:292
base::State * sigmaA_
States which lie just outside the visibility region of a vertex and support an interface.
Definition: SPARStwo.h:108
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:341
unsigned int consecutiveFailures_
A counter for the number of consecutive failed iterations of the algorithm.
Definition: SPARStwo.h:507
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:99
void resetFailures(void)
A reset function for resetting the failures count.
Definition: SPARStwo.cpp:504
double denseDelta_
Maximum range for allowing two samples to support an interface.
Definition: SPARStwo.h:516
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, InterfaceHashStruct > > > > >, boost::property< boost::edge_weight_t, double > > Graph
The underlying roadmap graph.
Definition: SPARStwo.h:229
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:350
std::pair< VertexIndexType, VertexIndexType > VertexPair
Pair of vertices which support an interface.
Definition: SPARStwo.h:98
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:613
unsigned int getMaxFailures() const
Retrieve the maximum consecutive failure limit.
Definition: SPARStwo.h:274
bool addedSolution_
A flag indicating that a solution has been added during solve()
Definition: SPARStwo.h:504
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:166
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:713
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition: RandomNumbers.h:54
void constructRoadmap(const base::PlannerTerminationCondition &ptc)
While the termination condition permits, construct the spanner graph.
Definition: SPARStwo.cpp:191
const Graph & getRoadmap(void) const
Retrieve the computed roadmap.
Definition: SPARStwo.h:338
Base class for a planner.
Definition: Planner.h:227
virtual void setup(void)
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Definition: SPARStwo.cpp:88
SPArse Roadmap Spanner Version 2.0
Definition: SPARStwo.h:79
Interface information storage class, which does bookkeeping for criterion four.
Definition: SPARStwo.h:101
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:743
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:499
double sparseDelta_
Maximum visibility range for nodes in the graph.
Definition: SPARStwo.h:513
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:383
void approachGraph(Vertex v)
Approaches the graph from a given vertex.
Definition: SPARStwo.cpp:522
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:48
A boost shared pointer wrapper for ompl::base::SpaceInformation.
void clear(const base::SpaceInformationPtr &si)
Clears the given interface data.
Definition: SPARStwo.h:125
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:484
void setMaxFailures(unsigned int m)
Sets the maximum failures until termination.
Definition: SPARStwo.h:268
bool reachedTerminationCriterion(void) const
Returns true if we have reached the iteration failures limit, maxFailures_ or if a solution was added...
Definition: SPARStwo.cpp:173
unsigned int maxFailures_
The number of consecutive failures to add to the graph before termination.
Definition: SPARStwo.h:475
A boost shared pointer wrapper for ompl::geometric::PathSimplifier.
void checkQueryStateInitialization(void)
Check that the query vertex is initialized (used for internal nearest neighbor searches) ...
Definition: SPARStwo.cpp:245
boost::graph_traits< Graph >::edge_descriptor Edge
Edge in Graph.
Definition: SPARStwo.h:235
InterfaceData & getData(Vertex v, Vertex vp, Vertex vpp)
Retrieves the Vertex data associated with v,vp,vpp.
Definition: SPARStwo.cpp:646
boost::unordered_map< VertexPair, InterfaceData, boost::hash< VertexPair > > InterfaceHash
the hash which maps pairs of neighbor points to pairs of states
Definition: SPARStwo.h:182
GuardType
Enumeration which specifies the reason a guard is added to the spanner.
Definition: SPARStwo.h:84
base::StateSamplerPtr simpleSampler_
Sampler user for generating random in the state space.
Definition: SPARStwo.h:448
void connectGuards(Vertex v, Vertex vp)
Connect two guards in the roadmap.
Definition: SPARStwo.cpp:731
boost::property_map< Graph, vertex_color_t >::type colorProperty_
Access to the colors for the vertices.
Definition: SPARStwo.h:490
void checkForSolution(const base::PlannerTerminationCondition &ptc, base::PathPtr &solution)
Definition: SPARStwo.cpp:320
boost::graph_traits< Graph >::vertex_descriptor Vertex
Vertex in Graph.
Definition: SPARStwo.h:232
void freeMemory(void)
Free all the memory allocated by the planner.
Definition: SPARStwo.cpp:123
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:601
double d_
Last known distance between the two interfaces supported by points_ and sigmas.
Definition: SPARStwo.h:112
double stretchFactor_
Stretch Factor as per graph spanner literature (multiplicative bound on path quality) ...
Definition: SPARStwo.h:466
void clearQuery(void)
Clear the query previously loaded from the ProblemDefinition. Subsequent calls to solve() will reuse ...
Definition: SPARStwo.cpp:105
bool checkAddPath(Vertex v)
Checks vertex v for short paths through its region and adds when appropriate.
Definition: SPARStwo.cpp:414
SpaceInformationPtr si_
The space information for which planning is done.
Definition: Planner.h:392
virtual void clear(void)
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition: SPARStwo.cpp:112
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:696
boost::property_map< Graph, vertex_state_t >::type stateProperty_
Access to the internal base::state at each Vertex.
Definition: SPARStwo.h:481
boost::mutex graphMutex_
Mutex to guard access to the Graph member (g_)
Definition: SPARStwo.h:519
VertexPair index(Vertex vp, Vertex vpp)
Rectifies indexing order for accessing the vertex data.
Definition: SPARStwo.cpp:636
Vertex queryVertex_
Vertex for performing nearest neighbor queries.
Definition: SPARStwo.h:463
RNG rng_
Random number generator.
Definition: SPARStwo.h:501
boost::property_map< Graph, vertex_interface_data_t >::type interfaceDataProperty_
Access to the interface pair information for the vertices.
Definition: SPARStwo.h:493
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:622
double getSparseDeltaFraction() const
Retrieve the sparse graph visibility range delta.
Definition: SPARStwo.h:286
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:151
unsigned int nearSamplePoints_
Number of sample points to use when trying to detect interfaces.
Definition: SPARStwo.h:478
A boost shared pointer wrapper for ompl::base::Path.
boost::shared_ptr< NearestNeighbors< Vertex > > nn_
Nearest neighbors data structure.
Definition: SPARStwo.h:451