37 #ifndef OMPL_GEOMETRIC_PLANNERS_STRIDE_STRIDE_
38 #define OMPL_GEOMETRIC_PLANNERS_STRIDE_STRIDE_
40 #include "ompl/datastructures/Grid.h"
41 #include "ompl/geometric/planners/PlannerIncludes.h"
42 #include "ompl/base/ProjectionEvaluator.h"
43 #include "ompl/datastructures/PDF.h"
44 #include <boost/unordered_map.hpp>
45 #include <boost/scoped_ptr.hpp>
52 class NearestNeighborsGNAT;
86 unsigned int degree = 16,
unsigned int minDegree = 12,
unsigned int maxDegree = 18,
87 unsigned int maxNumPtsPerLeaf = 6,
double estimatedDimension = 0.0);
90 virtual void setup(
void);
94 virtual void clear(
void);
285 return boost::numeric::ublas::norm_2(aproj - bproj);
301 boost::scoped_ptr<NearestNeighborsGNAT<Motion*> >
Search Tree with Resolution Independent Density Estimation.
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
void setProjectionEvaluator(const std::string &name)
Set the projection evaluator (select one from the ones registered with the state space).
bool getUseProjectedDistance(void) const
Return whether nearest neighbors are computed based on distances in a projection of the state rather ...
base::ProjectionEvaluatorPtr projectionEvaluator_
This algorithm can optionally use a projection to guide the exploration.
A boost shared pointer wrapper for ompl::base::ValidStateSampler.
Motion * parent
The parent motion in the exploration tree.
The definition of a motion.
double estimatedDimension_
Estimate of the local dimensionality of the free space around a state.
void setMinDegree(unsigned int minDegree)
Set minimum degree of a node in the GNAT.
void setEstimatedDimension(double estimatedDimension)
Set estimated dimension of the free space, which is needed to compute the sampling weight for a node ...
const base::ProjectionEvaluatorPtr & getProjectionEvaluator(void) const
Get the projection evaluator.
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
unsigned int minDegree_
Minimum degree of an internal node in the GNAT.
bool useProjectedDistance_
Whether to use distance in the projection (instead of distance in the state space) for the GNAT...
unsigned int getDegree(void) const
Get desired degree of a node in the GNAT.
unsigned int getMaxNumPtsPerLeaf(void) const
Get maximum number of elements stored in a leaf node of the GNAT.
virtual void setup(void)
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
unsigned int maxDegree_
Maximum degree of an internal node in the GNAT.
base::ValidStateSamplerPtr sampler_
Valid state sampler.
double minValidPathFraction_
When extending a motion, the planner can decide to keep the first valid part of it, even if invalid states are found, as long as the valid part represents a sufficiently large fraction from the original motion. This is used only when extendWhileValid_ is true.
unsigned int getMinDegree(void) const
Get minimum degree of a node in the GNAT.
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Motion(const base::SpaceInformationPtr &si)
Constructor that allocates memory for the state.
void setDegree(unsigned int degree)
Set desired degree of a node in the GNAT.
void setMaxNumPtsPerLeaf(unsigned int maxNumPtsPerLeaf)
Set maximum number of elements stored in a leaf node of the GNAT.
double maxDistance_
The maximum length of a motion to be added to a tree.
Base class for a planner.
boost::scoped_ptr< NearestNeighborsGNAT< Motion * > > tree_
The exploration tree constructed by this algorithm.
A boost shared pointer wrapper for ompl::base::ProjectionEvaluator.
A class to store the exit status of Planner::solve()
boost::numeric::ublas::vector< double > EuclideanProjection
The datatype for state projections. This class contains a real vector.
Definition of an abstract state.
void setRange(double distance)
Set the range the planner is supposed to use.
double getMinValidPathFraction(void) const
Get the value of the fraction set by setMinValidPathFraction()
unsigned int degree_
Desired degree of an internal node in the GNAT.
STRIDE(const base::SpaceInformationPtr &si, bool useProjectedDistance=false, unsigned int degree=16, unsigned int minDegree=12, unsigned int maxDegree=18, unsigned int maxNumPtsPerLeaf=6, double estimatedDimension=0.0)
Constructor.
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...
double projectedDistanceFunction(const Motion *a, const Motion *b) const
Compute distance between motions (actually distance between projections of contained states) ...
double goalBias_
The fraction of time the goal is picked as the state to expand towards (if such a state is available)...
Motion * selectMotion(void)
Select a motion to continue the expansion of the tree from.
virtual void clear(void)
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
unsigned int getMaxDegree(void) const
Set maximum degree of a node in the GNAT.
void setupTree(void)
Initialize GNAT data structure.
void freeMemory(void)
Free the memory allocated by this planner.
SpaceInformationPtr si_
The space information for which planning is done.
void setMinValidPathFraction(double fraction)
When extending a motion, the planner can decide to keep the first valid part of it, even if invalid states are found, as long as the valid part represents a sufficiently large fraction from the original motion. This function sets the minimum acceptable fraction (between 0 and 1).
double getGoalBias(void) const
Get the goal bias the planner is using.
double getRange(void) const
Get the range the planner is using.
base::State * state
The state contained by the motion.
double getEstimatedDimension(void) const
Get estimated dimension of the free space, which is needed to compute the sampling weight for a node ...
virtual void getPlannerData(base::PlannerData &data) const
Get information about the current run of the motion planner. Repeated calls to this function will upd...
unsigned int maxNumPtsPerLeaf_
Maximum number of points stored in a leaf node in the GNAT.
void setUseProjectedDistance(bool useProjectedDistance)
Set whether nearest neighbors are computed based on distances in a projection of the state rather dis...
void setMaxDegree(unsigned int maxDegree)
Set maximum degree of a node in the GNAT.
void setGoalBias(double goalBias)
In the process of randomly selecting states in the state space to attempt to go towards, the algorithm may in fact choose the actual goal state, if it knows it, with some probability. This probability is a real number between 0.0 and 1.0; its value should usually be around 0.05 and should not be too large. It is probably a good idea to use the default value.
void addMotion(Motion *motion)
Add a motion to the exploration tree.
double distanceFunction(const Motion *a, const Motion *b) const
Compute distance between motions (actually distance between contained states)
void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)
Set the projection evaluator. This class is able to compute the projection of a given state...
RNG rng_
The random number generator.