48 namespace ompl
84 base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override;
85 void clear() override;
86 void setup() override;
89 void getPlannerData(base::PlannerData &data) const override;
94 projectionEvaluator_ = projectionEvaluator;
106 return projectionEvaluator_;
118 goalBias_ = goalBias;
123 return goalBias_;
127 struct Cell;
128 struct Motion;
175 Motion *ancestor() const
179 m = m->parent_;
229 while (containingCell->left_ != nullptr)
232 containingCell = containingCell->left_;
234 containingCell = containingCell->right_;
242 motion->cell_ = this;
275 if (motion->heapElement_)
290 RNG rng_;
ompl::base::State * endState_
The state reached by this motion.
ompl::BinaryHeap< Motion *, MotionCompare > priorityQueue_
Priority queue of motions.
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.
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 shared pointer wrapper for ompl::base::StateSampler.
Projection evaluator for the problem.
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.
When an element is added to the heap, an instance of Element* is created. This instance contains the ...
Cell * right_
The right child cell (nullptr for a leaf cell)
Cell * left_
The left child cell (nullptr for a leaf cell)
void addMotion(Motion *motion, Cell *cell, base::State *, base::EuclideanProjection &)
Inserts the motion into the appropriate cell.
std::vector< Motion * > motions_
The motions contained in this cell. Motions are stored only in leaf nodes.
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
void update(Element *element)
Update an element in the heap.
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...
double getGoalBias() const
Get the goal bias the planner is using */.
unsigned int splitDimension_
Dimension along which the cell is split into smaller cells.
The midpoint between the bounds_ at the splitDimension_.
void getPlannerData(base::PlannerData &data) const override
Extracts the planner data from the priority queue into data.
A shared pointer wrapper for ompl::base::ProjectionEvaluator.
boost::numeric::ublas::vector< double > EuclideanProjection
The datatype for state projections. This class contains a real vector.
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 nullptr if no valid motion ...
void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)
Set the projection evaluator. This class is able to compute the projection of a given state...
double score() const
The score is used to order motions in a priority queue.
void updateHeapElement(Motion *motion)
Either update heap after motion's priority has changed or insert motion into heap.
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
The lower and upper bounds for an Rn space.
constructor for start states
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.
const base::ProjectionEvaluatorPtr & getProjectionEvaluator() const
Get the projection evaluator.
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.
bool operator()(Motion *p1, Motion *p2) const
returns true if m1 is lower priority than m2
Cell * cell_
pointer to the cell that contains this path
Cell * stab(const ompl::base::EuclideanProjection &projection) const
Locates the cell that this motion begins in.
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...
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.