Class PDST
Defined in File PDST.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ompl::base::Planner
(Class Planner)
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. Because of this, it is recommended to increase the min. and max. control duration using ompl::control::SpaceInformation::setMinMaxControlDuration. 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 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 *cell, base::State*, base::State*, Eigen::Ref<Eigen::VectorXd>, Eigen::Ref<Eigen::VectorXd>)
Inserts the motion into the appropriate cells, splitting the motion as necessary. motion is assumed to be fully contained within 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.
-
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 state. This means that “ancestor” motions with the same control_ are also considered. A pointer to the oldest ancestor with the same control_ is returned. Upon return applying the control ancestor->control_ for duration steps starting from the state ancestor->startState_ should result in the state state.
-
void freeMemory()
Protected Attributes
-
base::StateSamplerPtr sampler_
State sampler.
-
DirectedControlSamplerPtr controlSampler_
Directed control sampler.
-
const SpaceInformation *siC_
SpaceInformation convenience pointer.
-
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.
-
BinaryHeap<Motion*, MotionCompare> priorityQueue_
Priority queue of motions.
-
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.
-
base::GoalSampleableRegion *goalSampler_ = {nullptr}
Objected used to sample the goal.
-
struct Cell
Cell is a Binary Space Partition.
Public Functions
-
inline Cell(double volume, 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 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_.
-
base::RealVectorBounds bounds_
A bounding box for this cell.
-
inline Cell(double volume, base::RealVectorBounds bounds, unsigned int splitDimension = 0)
-
struct Motion
Class representing the tree of motions exploring the state space.
Public Functions
-
inline Motion(base::State *startState, base::State *endState, Control *control, unsigned int controlDuration, double priority, Motion *parent)
-
inline double score() const
The score is used to order motions in a priority queue.
-
inline void updatePriority()
Public Members
-
unsigned int controlDuration_
The duration that the control was applied to arrive at this state from the parent.
-
double priority_
Priority for selecting this path to extend from in the future.
-
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_ and control_ should not be freed.
-
inline Motion(base::State *startState, base::State *endState, Control *control, unsigned int controlDuration, double priority, Motion *parent)
-
struct MotionCompare
Comparator used to order motions in the priority queue.