Class PDST

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class PDST : public ompl::base::Planner

Path-Directed Subdivision Tree.

Short description

PDST is a tree-based motion planner that attempts to detect the less explored area of the space through the use of a binary space partition of a projection of the state space. Exploration is biased towards large cells with few path segments. Unlike most tree-based planners which expand from a randomly select endpoint of a path segment, PDST expands from a randomly selected point along a deterministically selected path segment. It is important to set the projection the algorithm uses (setProjectionEvaluator() function). If no projection is set, the planner will attempt to use the default projection associated to the state space. An exception is thrown if no default projection is available either.

External documentation

A.M. Ladd and L.E. Kavraki, Motion planning in the presence of drift, underactuation and discrete system changes, in Robotics: Science and Systems I, pp. 233–241, MIT Press, June 2005. [PDF]

Public Functions

PDST(const base::SpaceInformationPtr &si)
~PDST() override
virtual base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override

Function that can solve the motion planning problem. This function can be called multiple times on the same problem, without calling clear() in between. This allows the planner to continue work for more time on an unsolved problem, for example. If this option is used, it is assumed the problem definition is not changed (unpredictable results otherwise). The only change in the problem definition that is accounted for is the addition of starting or goal states (but not changing previously added start/goal states). If clearQuery() is called, the planner may retain prior datastructures generated from a previous query on a new problem definition. The function terminates if the call to ptc returns true.

virtual void clear() override

Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() will ignore all previous work.

virtual void setup() override

Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceInformation::setup() if needed. This must be called before solving.

virtual void getPlannerData(base::PlannerData &data) const override

Extracts the planner data from the priority queue into data.

inline void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)

Set the projection evaluator. This class is able to compute the projection of a given state.

inline void setProjectionEvaluator(const std::string &name)

Set the projection evaluator (select one from the ones registered with the state space).

inline const base::ProjectionEvaluatorPtr &getProjectionEvaluator() const

Get the projection evaluator.

inline 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. */.

inline double getGoalBias() const

Get the goal bias the planner is using */.

Protected Functions

void addMotion(Motion *motion, Cell *bsp, base::State*, Eigen::Ref<Eigen::VectorXd>)

Inserts the motion into the appropriate cell.

inline void updateHeapElement(Motion *motion)

Either update heap after motion’s priority has changed or insert motion into heap.

Motion *propagateFrom(Motion *motion, base::State*, base::State*)

Select a state along motion and propagate a new motion from there. Return nullptr if no valid motion could be generated starting at the selected state.

void freeMemory()

Protected Attributes

ompl::base::StateSamplerPtr sampler_

State sampler.

RNG rng_
std::vector<Motion*> startMotions_

Vector holding all of the start states supplied for the problem Each start motion is the root of its own tree of motions.

ompl::BinaryHeap<Motion*, MotionCompare> priorityQueue_

Priority queue of motions.

Cell *bsp_ = {nullptr}

Binary Space Partition.

ompl::base::ProjectionEvaluatorPtr projectionEvaluator_

Projection evaluator for the problem.

double goalBias_ = {0.05}

Number between 0 and 1 specifying the probability with which the goal should be sampled.

ompl::base::GoalSampleableRegion *goalSampler_ = {nullptr}

Objected used to sample the goal.

unsigned int iteration_ = {1}

Iteration number and priority of the next Motion that will be generated.

Motion *lastGoalMotion_ = {nullptr}

Closest motion to the goal.

struct Cell

Cell is a Binary Space Partition.

Public Functions

inline Cell(double volume, ompl::base::RealVectorBounds bounds, unsigned int splitDimension = 0)
inline ~Cell()
void subdivide(unsigned int spaceDimension)

Subdivides this cell.

inline Cell *stab(const Eigen::Ref<Eigen::VectorXd> &projection) const

Locates the cell that this motion begins in.

inline void addMotion(Motion *motion)

Add a motion.

inline unsigned int size() const

Number of cells.

Public Members

double volume_

Volume of the cell.

unsigned int splitDimension_

Dimension along which the cell is split into smaller cells.

double splitValue_

The midpoint between the bounds_ at the splitDimension_.

Cell *left_

The left child cell (nullptr for a leaf cell)

Cell *right_

The right child cell (nullptr for a leaf cell)

ompl::base::RealVectorBounds bounds_

A bounding box for this cell.

std::vector<Motion*> motions_

The motions contained in this cell. Motions are stored only in leaf nodes.

struct Motion

Class representing the tree of motions exploring the state space.

Public Functions

inline Motion(base::State *startState, base::State *endState, double priority, Motion *parent)
inline Motion(base::State *state)

constructor for start states

inline double score() const

The score is used to order motions in a priority queue.

inline void updatePriority()
inline Motion *ancestor() const

Public Members

ompl::base::State *startState_

The starting point of this motion.

ompl::base::State *endState_

The state reached by this motion.

double priority_

Priority for selecting this path to extend from in the future.

Motion *parent_

Parent motion from which this one started.

Cell *cell_

pointer to the cell that contains this path

ompl::BinaryHeap<Motion*, MotionCompare>::Element *heapElement_

Handle to the element of the priority queue for this Motion.

bool isSplit_

Whether this motion is the result of a split operation, in which case its endState_ should not be freed.

struct MotionCompare

Comparator used to order motions in the priority queue.

Public Functions

inline bool operator()(Motion *p1, Motion *p2) const

returns true if m1 is lower priority than m2