39 #ifndef OMPL_GEOMETRIC_PLANNERS_PDST_PDST_
40 #define OMPL_GEOMETRIC_PLANNERS_PDST_PDST_
42 #include "ompl/base/Planner.h"
43 #include "ompl/base/goals/GoalSampleableRegion.h"
44 #include "ompl/geometric/PathGeometric.h"
45 #include "ompl/base/PlannerData.h"
46 #include "ompl/datastructures/BinaryHeap.h"
79 class PDST :
public base::Planner
84 PDST(
const base::SpaceInformationPtr &si);
88 virtual base::PlannerStatus
solve(
const base::PlannerTerminationCondition &ptc);
89 virtual void clear(
void);
90 virtual void setup(
void);
165 void updatePriority(
void)
169 Motion* ancestor()
const
171 Motion* m =
const_cast<Motion*
>(
this);
172 while (m->parent_ && m->parent_->endState_ == m->startState_)
198 unsigned int splitDimension = 0)
214 void subdivide(
unsigned int spaceDimension);
219 Cell *containingCell =
const_cast<Cell*
>(
this);
220 while (containingCell->
left_ != NULL)
223 containingCell = containingCell->
left_;
225 containingCell = containingCell->
right_;
227 return containingCell;
233 motion->
cell_ =
this;
277 void freeMemory(
void);
ompl::base::State * endState_
The state reached by this motion.
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...
Comparator used to order motions in the priority queue.
Motion * lastGoalMotion_
Closest motion to the goal.
Class representing the tree of motions exploring the state space.
virtual void setup(void)
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
ompl::base::RealVectorBounds bounds_
A bounding box for this cell.
Motion * parent_
Parent motion from which this one started.
std::vector< Motion * > startMotions_
Vector holding all of the start states supplied for the problem Each start motion is the root of its ...
A boost shared pointer wrapper for ompl::base::StateSampler.
ompl::base::ProjectionEvaluatorPtr projectionEvaluator_
Projection evaluator for the problem.
double goalBias_
Number between 0 and 1 specifying the probability with which the goal should be sampled.
ompl::base::State * startState_
The starting point of this motion.
std::vector< Motion * > motions_
The motions contained in this cell. Motions are stored only in leaf nodes.
When an element is added to the heap, an instance of Element* is created. This instance contains the ...
Cell * right_
The right child cell (NULL for a leaf cell)
Cell * left_
The left child cell (NULL for a leaf cell)
void addMotion(Motion *motion, Cell *cell, base::State *, base::EuclideanProjection &)
Inserts the motion into the appropriate cell.
virtual void clear(void)
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Cell is a Binary Space Partition.
const base::ProjectionEvaluatorPtr & getProjectionEvaluator(void) const
Get the projection evaluator.
double volume_
Volume of the cell.
This class provides an implementation of an updatable min-heap. Using it is a bit cumbersome...
Abstract definition of a goal region that can be sampled.
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
unsigned int splitDimension_
Dimension along which the cell is split into smaller cells.
double splitValue_
The midpoint between the bounds_ at the splitDimension_.
ompl::BinaryHeap< Motion *, MotionCompare > priorityQueue_
Priority queue of motions.
A boost shared pointer wrapper for ompl::base::ProjectionEvaluator.
boost::numeric::ublas::vector< double > EuclideanProjection
The datatype for state projections. This class contains a real vector.
Definition of an abstract state.
void subdivide(unsigned int spaceDimension)
Subdivides this cell.
void addMotion(Motion *motion)
Add a motion.
ompl::base::GoalSampleableRegion * goalSampler_
Objected used to sample the goal.
Motion * propagateFrom(Motion *motion, base::State *, base::State *)
Select a state along motion and propagate a new motion from there. Return NULL if no valid motion cou...
void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)
Set the projection evaluator. This class is able to compute the projection of a given state...
unsigned int size() const
Number of cells.
void updateHeapElement(Motion *motion)
Either update heap after motion's priority has changed or insert motion into heap.
Cell * bsp_
Binary Space Partition.
The lower and upper bounds for an Rn space.
Motion(base::State *state)
constructor for start states
bool operator()(Motion *p1, Motion *p2) const
returns true if m1 is lower priority than m2
double score(void) const
The score is used to order motions in a priority queue.
void setProjectionEvaluator(const std::string &name)
Set the projection evaluator (select one from the ones registered with the state space).
*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.
virtual void getPlannerData(base::PlannerData &data) const
Extracts the planner data from the priority queue into data.
ompl::base::StateSamplerPtr sampler_
State sampler.
Cell * stab(const ompl::base::EuclideanProjection &projection) const
Locates the cell that this motion begins in.
SpaceInformationPtr si_
The space information for which planning is done.
ompl::BinaryHeap< Motion *, MotionCompare >::Element * heapElement_
Handle to the element of the priority queue for this Motion.
double getGoalBias(void) const
Get the goal bias the planner is using */.
Cell * cell_
pointer to the cell that contains this path
unsigned int iteration_
Iteration number and priority of the next Motion that will be generated.
double priority_
Priority for selecting this path to extend from in the future.