38 #ifndef OMPL_CONTROL_PLANNERS_PDST_PDST_
39 #define OMPL_CONTROL_PLANNERS_PDST_PDST_
41 #include "ompl/base/Planner.h"
42 #include "ompl/base/goals/GoalSampleableRegion.h"
43 #include "ompl/control/PathControl.h"
44 #include "ompl/control/PlannerData.h"
45 #include "ompl/datastructures/BinaryHeap.h"
81 class PDST :
public base::Planner
86 PDST(
const SpaceInformationPtr &si);
90 virtual base::PlannerStatus
solve(
const base::PlannerTerminationCondition &ptc);
91 virtual void clear(
void);
92 virtual void setup(
void);
152 unsigned int controlDuration,
double priority,
Motion* parent)
169 void updatePriority(
void)
199 unsigned int splitDimension = 0)
215 void subdivide(
unsigned int spaceDimension);
220 Cell *containingCell =
const_cast<Cell*
>(
this);
221 while (containingCell->
left_ != NULL)
224 containingCell = containingCell->
left_;
226 containingCell = containingCell->
right_;
228 return containingCell;
234 motion->
cell_ =
this;
288 void freeMemory(
void);
unsigned int controlDuration_
The duration that the control was applied to arrive at this state from the parent.
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...
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.
void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)
Set the projection evaluator. This class is able to compute the projection of a given state...
Cell * bsp_
Binary Space Partition.
DirectedControlSamplerPtr controlSampler_
Directed control sampler.
const base::ProjectionEvaluatorPtr & getProjectionEvaluator(void) const
Get the projection evaluator.
virtual void clear(void)
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition of an abstract control.
const SpaceInformation * siC_
SpaceInformation convenience pointer.
A boost shared pointer wrapper for ompl::base::StateSampler.
void setProjectionEvaluator(const std::string &name)
Set the projection evaluator (select one from the ones registered with the state space).
unsigned int size() const
Number of cells.
Class representing the tree of motions exploring the state space.
When an element is added to the heap, an instance of Element* is created. This instance contains the ...
double splitValue_
The midpoint between the bounds_ at the splitDimension_.
ompl::BinaryHeap< Motion *, MotionCompare > priorityQueue_
Priority queue of motions.
bool operator()(Motion *p1, Motion *p2) const
returns true if m1 is lower priority than m2
Motion(base::State *state)
constructor for start states
virtual void getPlannerData(base::PlannerData &data) const
Extracts the planner data from the priority queue into data.
ompl::base::StateSamplerPtr sampler_
State sampler.
ompl::base::State * startState_
The starting point of this motion.
Motion * lastGoalMotion_
Closest motion to the goal.
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.
Cell * right_
The right child cell (NULL for a leaf cell)
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
double volume_
Volume of the cell.
ompl::base::ProjectionEvaluatorPtr projectionEvaluator_
Projection evaluator for the problem.
A boost shared pointer wrapper for ompl::control::DirectedControlSampler.
Cell * cell_
Pointer to the cell that contains this path.
ompl::control::Control * control_
The control that was applied to arrive at this state from the parent.
void updateHeapElement(Motion *motion)
Either update heap after motion's priority has changed or insert motion into heap.
void addMotion(Motion *motion, Cell *cell, base::State *, base::State *, base::EuclideanProjection &, base::EuclideanProjection &)
Inserts the motion into the appropriate cells, splitting the motion as necessary. motion is assumed t...
A boost shared pointer wrapper for ompl::base::ProjectionEvaluator.
ompl::base::RealVectorBounds bounds_
A bounding box for this cell.
boost::numeric::ublas::vector< double > EuclideanProjection
The datatype for state projections. This class contains a real vector.
Definition of an abstract state.
void addMotion(Motion *motion)
Add a motion.
unsigned int findDurationAndAncestor(Motion *motion, base::State *state, base::State *scratch, Motion *&ancestor) const
Find the max. duration that the control_ in motion can be applied s.t. the trajectory passes through ...
std::vector< Motion * > motions_
The motions contained in this cell. Motions are stored only in leaf nodes.
void subdivide(unsigned int spaceDimension)
Subdivides this cell.
Cell is a Binary Space Partition.
The lower and upper bounds for an Rn space.
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 */.
std::vector< Motion * > startMotions_
Vector holding all of the start states supplied for the problem Each start motion is the root of its ...
ompl::base::GoalSampleableRegion * goalSampler_
Objected used to sample the goal.
Comparator used to order motions in the priority queue.
Cell * stab(const ompl::base::EuclideanProjection &projection) const
Locates the cell that this motion begins in.
double score(void) const
The score is used to order motions in a priority queue.
virtual void setup(void)
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
SpaceInformationPtr si_
The space information for which planning is done.
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...
Cell * left_
The left child cell (NULL for a leaf cell)
unsigned int splitDimension_
Dimension along which the cell is split into smaller cells.
ompl::base::State * endState_
The state reached by this motion.
Motion * parent_
Parent motion from which this one started.
double goalBias_
Number between 0 and 1 specifying the probability with which the goal should be sampled.
*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.