48 namespace ompl
87 base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override;
88 void clear() override;
89 void setup() override;
92 void getPlannerData(base::PlannerData &data) const override;
97 projectionEvaluator_ = projectionEvaluator;
109 return projectionEvaluator_;
121 goalBias_ = goalBias;
126 return goalBias_;
130 struct Cell;
131 struct Motion;
148 Motion(base::State *startState, base::State *endState, Control *control, unsigned int controlDuration,
149 double priority, Motion *parent)
234 while (containingCell->left_ != nullptr)
237 containingCell = containingCell->left_;
239 containingCell = containingCell->right_;
247 motion->cell_ = this;
277 void addMotion(Motion *motion, Cell *cell, base::State *, base::State *, base::EuclideanProjection &,
278 base::EuclideanProjection &);
282 if (motion->heapElement_)
298 Motion *&ancestor) const;
309 RNG rng_;
A bounding box for this cell.
unsigned int controlDuration_
The duration that the control was applied to arrive at this state from the parent.
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
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 ...
unsigned int iteration_
Iteration number and priority of the next Motion that will be generated.
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...
Directed control sampler.
const SpaceInformation * siC_
SpaceInformation convenience pointer.
A shared pointer wrapper for ompl::base::StateSampler.
BinaryHeap< Motion *, MotionCompare > priorityQueue_
Priority queue of motions.
void setProjectionEvaluator(const std::string &name)
Set the projection evaluator (select one from the ones registered with the state space).
Class representing the tree of motions exploring the state space.
base::State * startState_
The starting point of this motion.
The midpoint between the bounds_ at the splitDimension_.
Cell * stab(const base::EuclideanProjection &projection) const
Locates the cell that this motion begins in.
base::GoalSampleableRegion * goalSampler_
Objected used to sample the goal.
base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override
Function that can solve the motion planning problem. This function can be called multiple times on th...
double getGoalBias() const
Get the goal bias the planner is using */.
constructor for start states
BinaryHeap< Motion *, MotionCompare >::Element * heapElement_
Handle to the element of the priority queue for this Motion.
void update(Element *element)
Update an element in the heap.
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 (nullptr for a leaf cell)
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
A shared pointer wrapper for ompl::control::DirectedControlSampler.
Cell * cell_
Pointer to the cell that contains this path.
void updateHeapElement(Motion *motion)
Either update heap after motion's priority has changed or insert motion into heap.
const base::ProjectionEvaluatorPtr & getProjectionEvaluator() const
Get the projection evaluator.
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 shared pointer wrapper for ompl::base::ProjectionEvaluator.
std::vector< Motion * > motions_
The motions contained in this cell. Motions are stored only in leaf nodes.
boost::numeric::ublas::vector< double > EuclideanProjection
The datatype for state projections. This class contains a real vector.
void addMotion(Motion *motion)
Add a motion.
bool operator()(Motion *p1, Motion *p2) const
returns true if m1 is lower priority than m2
control::Control * control_
The control that was applied to arrive at this state from the parent.
The lower and upper bounds for an Rn space.
std::vector< Motion * > startMotions_
Vector holding all of the start states supplied for the problem Each start motion is the root of its ...
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 ...
Comparator used to order motions in the priority queue.
Projection evaluator for the problem.
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
The space information for which planning is done.
void getPlannerData(base::PlannerData &data) const override
Extracts the planner data from the priority queue into data.
Cell * left_
The left child cell (nullptr for a leaf cell)
Space information containing necessary information for planning with controls. setup() needs to be ca...
unsigned int splitDimension_
Dimension along which the cell is split into smaller cells.
Element * insert(const _T &data)
Add a new element.
Motion * parent_
Parent motion from which this one started.
double score() const
The score is used to order motions in a priority queue.
Number between 0 and 1 specifying the probability with which the goal should be sampled.
base::State * endState_
The state reached by this motion.
*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.