SimpleSetup.h
208 void setGoalState(const base::ScopedState<> &goal, const double threshold = std::numeric_limits<double>::epsilon())
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
Definition: PlannerData.h:164
const base::StateSpacePtr & getStateSpace() const
Get the current instance of the state space.
Definition: SimpleSetup.h:94
void setStartAndGoalStates(const base::ScopedState<> &start, const base::ScopedState<> &goal, const double threshold=std::numeric_limits< double >::epsilon())
Set the start and goal states to use.
Definition: SimpleSetup.h:178
void setOptimizationObjective(const base::OptimizationObjectivePtr &optimizationObjective)
Set the optimization objective to use.
Definition: SimpleSetup.h:172
const std::string getSolutionPlannerName(void) const
Get the best solution's planer name. Throw an exception if no solution is available.
Definition: SimpleSetup.cpp:164
const PathSimplifierPtr & getPathSimplifier() const
Get the path simplifier.
Definition: SimpleSetup.h:124
double simplifyTime_
The amount of time the last path simplification step took.
Definition: SimpleSetup.h:310
A boost shared pointer wrapper for ompl::base::ProblemDefinition.
PathGeometric & getSolutionPath() const
Get the solution path. Throw an exception if no solution is available.
Definition: SimpleSetup.cpp:178
void getPlannerData(base::PlannerData &pd) const
Get information about the exploration data structure the motion planner used.
Definition: SimpleSetup.cpp:194
double getLastSimplificationTime() const
Get the amount of time (in seconds) spend during the last path simplification step.
Definition: SimpleSetup.h:261
A boost shared pointer wrapper for ompl::base::StateSpace.
const base::StateValidityCheckerPtr & getStateValidityChecker() const
Get the current instance of the state validity checker.
Definition: SimpleSetup.h:100
bool haveSolutionPath() const
Return true if a solution path is available (previous call to solve() was successful). The solution may be approximate.
Definition: SimpleSetup.h:145
base::PlannerStatus getLastPlannerStatus() const
Return the status of the last planning attempt.
Definition: SimpleSetup.h:249
boost::function< PlannerPtr(const SpaceInformationPtr &)> PlannerAllocator
Definition of a function that can allocate a planner.
Definition: Planner.h:422
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:64
void setGoal(const base::GoalPtr &goal)
Set the goal for planning. This call is not needed if setStartAndGoalStates() has been called...
Definition: SimpleSetup.h:215
void setPlanner(const base::PlannerPtr &planner)
Set the planner to use. If the planner is not set, an attempt is made to use the planner allocator...
Definition: SimpleSetup.h:224
const base::ProblemDefinitionPtr & getProblemDefinition() const
Get the current instance of the problem definition.
Definition: SimpleSetup.h:88
boost::function< bool(const State *)> StateValidityCheckerFn
If no state validity checking class is specified (StateValidityChecker), a boost function can be spec...
Definition: SpaceInformation.h:80
A boost shared pointer wrapper for ompl::base::StateValidityChecker.
Create the set of classes typically needed to solve a geometric problem.
Definition: SimpleSetup.h:65
A boost shared pointer wrapper for ompl::base::Planner.
const base::GoalPtr & getGoal() const
Get the current goal definition.
Definition: SimpleSetup.h:106
SimpleSetup(const base::SpaceInformationPtr &si)
Constructor needs the state space used for planning.
Definition: SimpleSetup.cpp:45
const base::PlannerAllocator & getPlannerAllocator() const
Get the planner allocator.
Definition: SimpleSetup.h:118
double getLastPlanComputationTime() const
Get the amount of time (in seconds) spent during the last planning step.
Definition: SimpleSetup.h:255
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:48
A boost shared pointer wrapper for ompl::base::SpaceInformation.
void setStateValidityChecker(const base::StateValidityCheckerPtr &svc)
Set the state validity checker to use.
Definition: SimpleSetup.h:160
const base::OptimizationObjectivePtr & getOptimizationObjective() const
Get the optimization objective to use.
Definition: SimpleSetup.h:136
void setPlannerAllocator(const base::PlannerAllocator &pa)
Set the planner allocator to use. This is only used if no planner has been set. This is optional – a...
Definition: SimpleSetup.h:235
bool haveExactSolutionPath() const
Return true if a solution path is available (previous call to solve() was successful) and the solutio...
Definition: SimpleSetup.cpp:189
A boost shared pointer wrapper for ompl::geometric::PathSimplifier.
virtual void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: SimpleSetup.cpp:61
void addStartState(const base::ScopedState<> &state)
Add a starting state for planning. This call is not needed if setStartAndGoalStates() has been called...
Definition: SimpleSetup.h:189
const base::SpaceInformationPtr & getSpaceInformation() const
Get the current instance of the space information.
Definition: SimpleSetup.h:82
base::PlannerStatus lastStatus_
The status of the last planning request.
Definition: SimpleSetup.h:313
A boost shared pointer wrapper for ompl::base::OptimizationObjective.
virtual base::PlannerStatus solve(double time=1.0)
Run the planner for up to a specified amount of time (default is 1 second)
Definition: SimpleSetup.cpp:93
bool configured_
Flag indicating whether the classes needed for planning are set up.
Definition: SimpleSetup.h:304
void setGoalState(const base::ScopedState<> &goal, const double threshold=std::numeric_limits< double >::epsilon())
A simple form of setGoal(). The goal will be an instance of ompl::base::GoalState.
Definition: SimpleSetup.h:208
void setStartState(const base::ScopedState<> &state)
Clear the currently set starting states and add state as the starting state.
Definition: SimpleSetup.h:201
void simplifySolution(double duration=0.0)
Attempt to simplify the current solution path. Spent at most duration seconds in the simplification p...
Definition: SimpleSetup.cpp:141
A boost shared pointer wrapper for ompl::base::Goal.
virtual void print(std::ostream &out=std::cout) const
Print information about the current setup.
Definition: SimpleSetup.cpp:201
void setStateValidityChecker(const base::StateValidityCheckerFn &svc)
Set the state validity checker to use.
Definition: SimpleSetup.h:166
OMPL_DEPRECATED base::PlannerPtr getDefaultPlanner(const base::GoalPtr &goal)
Given a goal specification, decide on a planner for that goal.
Definition: SimpleSetup.cpp:40
virtual void clear()
Clear all planning data. This only includes data generated by motion plan computation. Planner settings, start & goal states are not affected.
Definition: SimpleSetup.cpp:84