37 #ifndef OMPL_CONTROL_PLANNERS_EST_EST_
38 #define OMPL_CONTROL_PLANNERS_EST_EST_
40 #include "ompl/datastructures/Grid.h"
41 #include "ompl/control/planners/PlannerIncludes.h"
42 #include "ompl/base/ProjectionEvaluator.h"
43 #include "ompl/datastructures/PDF.h"
44 #include <boost/unordered_map.hpp>
85 virtual void clear(
void);
141 virtual void setup(
void);
192 Motion* operator[](
unsigned int i)
196 const Motion* operator[](
unsigned int i)
const
202 motions_.push_back(m);
204 unsigned int size(
void)
const
206 return motions_.size();
208 bool empty(
void)
const
210 return motions_.empty();
212 std::vector<Motion*> motions_;
213 CellPDF::Element* elem_;
Motion(const SpaceInformation *si)
Constructor that allocates memory for the state and the control.
double getGoalBias(void) const
Get the goal bias the planner is using.
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
const base::ProjectionEvaluatorPtr & getProjectionEvaluator(void) const
Get the projection evaluator.
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...
void addMotion(Motion *motion)
Add a motion to the exploration tree.
Representation of a simple grid.
base::ProjectionEvaluatorPtr projectionEvaluator_
This algorithm uses a discretization (a grid) to guide the exploration. The exploration is imposed on...
void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)
Set the projection evaluator. This class is able to compute the projection of a given state...
Control * control
The control contained by the motion.
A boost shared pointer wrapper for ompl::base::ValidStateSampler.
Definition of an abstract control.
DirectedControlSamplerPtr controlSampler_
Directed control sampler.
CellPDF pdf_
The PDF used for selecting a cell from which to sample a motion.
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
virtual void getPlannerData(base::PlannerData &data) const
Get information about the current run of the motion planner. Repeated calls to this function will upd...
Motion * lastGoalMotion_
The most recent goal motion. Used for PlannerData computation.
A struct containing an array of motions and a corresponding PDF element.
double getRange(void) const
Get the range the planner is using.
base::ValidStateSamplerPtr sampler_
Valid state sampler.
double goalBias_
The fraction of time the goal is picked as the state to expand towards (if such a state is available)...
TreeData tree_
The exploration tree constructed by this algorithm.
void freeMemory(void)
Free the memory allocated by this planner.
The data contained by a tree of exploration.
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
unsigned int steps
The number of steps the control is applied for.
Base class for a planner.
A boost shared pointer wrapper for ompl::control::DirectedControlSampler.
virtual void clear(void)
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Motion * parent
The parent motion in the exploration tree.
virtual void setup(void)
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
unsigned int size
The total number of motions in the grid.
A boost shared pointer wrapper for ompl::base::ProjectionEvaluator.
A class to store the exit status of Planner::solve()
Definition of an abstract state.
Representation of a motion.
Definition of a cell in this grid.
RNG rng_
The random number generator.
void setRange(double distance)
Set the range the planner is supposed to use.
base::State * state
The state contained by the 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.
Motion * selectMotion(void)
Select a motion to continue the expansion of the tree from.
PDF< GridCell * > CellPDF
A PDF of grid cells.
double maxDistance_
The maximum length of a motion to be added to a tree.
SpaceInformationPtr si_
The space information for which planning is done.
Grid< MotionInfo >::Cell GridCell
A grid cell.
void setProjectionEvaluator(const std::string &name)
Set the projection evaluator (select one from the ones registered with the state space).
const SpaceInformation * siC_
The base::SpaceInformation cast as control::SpaceInformation, for convenience.
Grid< MotionInfo > grid
A grid where each cell contains an array of motions.
EST(const SpaceInformationPtr &si)
Constructor.