Create the set of classes typically needed to solve a control problem. More...
#include <ompl/control/SimpleSetup.h>

Public Member Functions | |
SimpleSetup (const SpaceInformationPtr &si) | |
Constructor needs the control space used for planning. More... | |
SimpleSetup (const ControlSpacePtr &space) | |
Constructor needs the control space used for planning. More... | |
const SpaceInformationPtr & | getSpaceInformation () const |
Get the current instance of the space information. More... | |
const base::ProblemDefinitionPtr & | getProblemDefinition () const |
Get the current instance of the problem definition. More... | |
base::ProblemDefinitionPtr & | getProblemDefinition () |
Get the current instance of the problem definition. More... | |
const base::StateSpacePtr & | getStateSpace () const |
Get the current instance of the state space. More... | |
const ControlSpacePtr & | getControlSpace () const |
Get the current instance of the control space. More... | |
const base::StateValidityCheckerPtr & | getStateValidityChecker () const |
Get the current instance of the state validity checker. More... | |
const StatePropagatorPtr & | getStatePropagator () const |
Get the instance of the state propagator being used. More... | |
const base::GoalPtr & | getGoal () const |
Get the current goal definition. More... | |
const base::PlannerPtr & | getPlanner () const |
Get the current planner. More... | |
const base::PlannerAllocator & | getPlannerAllocator () const |
Get the planner allocator. More... | |
bool | haveExactSolutionPath () const |
Return true if a solution path is available (previous call to solve() was successful) and the solution is exact (not approximate) More... | |
bool | haveSolutionPath () const |
Return true if a solution path is available (previous call to solve() was successful). The solution may be approximate. More... | |
PathControl & | getSolutionPath () const |
Get the solution path. Throw an exception if no solution is available. More... | |
void | getPlannerData (base::PlannerData &pd) const |
Get information about the exploration data structure the motion planner used. More... | |
void | setStateValidityChecker (const base::StateValidityCheckerPtr &svc) |
Set the state validity checker to use. More... | |
void | setStateValidityChecker (const base::StateValidityCheckerFn &svc) |
Set the state validity checker to use. More... | |
void | setStatePropagator (const StatePropagatorFn &sp) |
Set the function that performs state propagation. More... | |
void | setStatePropagator (const StatePropagatorPtr &sp) |
Set the instance of StatePropagator to perform state propagation. More... | |
void | setOptimizationObjective (const base::OptimizationObjectivePtr &optimizationObjective) |
Set the optimization objective to use. More... | |
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. More... | |
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. More... | |
void | addStartState (const base::ScopedState<> &state) |
Add a starting state for planning. This call is not needed if setStartAndGoalStates() has been called. More... | |
void | clearStartStates () |
Clear the currently set starting states. More... | |
void | setStartState (const base::ScopedState<> &state) |
Clear the currently set starting states and add state as the starting state. More... | |
void | setGoal (const base::GoalPtr &goal) |
Set the goal for planning. This call is not needed if setStartAndGoalStates() has been called. More... | |
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. If no planner allocator is available either, a default planner is set. More... | |
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 default planner will be used if no planner is otherwise specified. More... | |
virtual base::PlannerStatus | solve (double time=1.0) |
Run the planner for a specified amount of time (default is 1 second) More... | |
virtual base::PlannerStatus | solve (const base::PlannerTerminationCondition &ptc) |
Run the planner until ptc becomes true (at most) More... | |
base::PlannerStatus | getLastPlannerStatus () const |
Return the status of the last planning attempt. More... | |
double | getLastPlanComputationTime () const |
Get the amount of time (in seconds) spent during the last planning step. More... | |
virtual void | clear () |
Clear all planning data. This only includes data generated by motion plan computation. Planner settings, start & goal states are not affected. More... | |
virtual void | print (std::ostream &out=std::cout) const |
Print information about the current setup. More... | |
virtual void | setup () |
This method will create the necessary classes for planning. The solve() method will call this function automatically. More... | |
Protected Attributes | |
SpaceInformationPtr | si_ |
The created space information. More... | |
base::ProblemDefinitionPtr | pdef_ |
The created problem definition. More... | |
base::PlannerPtr | planner_ |
The maintained planner instance. More... | |
base::PlannerAllocator | pa_ |
The optional planner allocator. More... | |
bool | configured_ |
Flag indicating whether the classes needed for planning are set up. More... | |
double | planTime_ |
The amount of time the last planning step took. More... | |
base::PlannerStatus | last_status_ |
The status of the last planning request. More... | |
Detailed Description
Create the set of classes typically needed to solve a control problem.
Definition at line 62 of file SimpleSetup.h.
Constructor & Destructor Documentation
◆ SimpleSetup() [1/2]
|
explicit |
Constructor needs the control space used for planning.
Definition at line 40 of file SimpleSetup.cpp.
◆ SimpleSetup() [2/2]
|
explicit |
Constructor needs the control space used for planning.
Definition at line 47 of file SimpleSetup.cpp.
Member Function Documentation
◆ addStartState()
|
inline |
Add a starting state for planning. This call is not needed if setStartAndGoalStates() has been called.
Definition at line 196 of file SimpleSetup.h.
◆ clear()
|
virtual |
Clear all planning data. This only includes data generated by motion plan computation. Planner settings, start & goal states are not affected.
Definition at line 78 of file SimpleSetup.cpp.
◆ clearStartStates()
|
inline |
Clear the currently set starting states.
Definition at line 202 of file SimpleSetup.h.
◆ getControlSpace()
|
inline |
Get the current instance of the control space.
Definition at line 98 of file SimpleSetup.h.
◆ getGoal()
|
inline |
Get the current goal definition.
Definition at line 116 of file SimpleSetup.h.
◆ getLastPlanComputationTime()
|
inline |
Get the amount of time (in seconds) spent during the last planning step.
Definition at line 256 of file SimpleSetup.h.
◆ getLastPlannerStatus()
|
inline |
Return the status of the last planning attempt.
Definition at line 250 of file SimpleSetup.h.
◆ getPlanner()
|
inline |
Get the current planner.
Definition at line 122 of file SimpleSetup.h.
◆ getPlannerAllocator()
|
inline |
Get the planner allocator.
Definition at line 128 of file SimpleSetup.h.
◆ getPlannerData()
void ompl::control::SimpleSetup::getPlannerData | ( | base::PlannerData & | pd | ) | const |
Get information about the exploration data structure the motion planner used.
Definition at line 133 of file SimpleSetup.cpp.
◆ getProblemDefinition() [1/2]
|
inline |
Get the current instance of the problem definition.
Definition at line 86 of file SimpleSetup.h.
◆ getProblemDefinition() [2/2]
|
inline |
Get the current instance of the problem definition.
Definition at line 80 of file SimpleSetup.h.
◆ getSolutionPath()
ompl::control::PathControl & ompl::control::SimpleSetup::getSolutionPath | ( | ) | const |
Get the solution path. Throw an exception if no solution is available.
Definition at line 116 of file SimpleSetup.cpp.
◆ getSpaceInformation()
|
inline |
Get the current instance of the space information.
Definition at line 74 of file SimpleSetup.h.
◆ getStatePropagator()
|
inline |
Get the instance of the state propagator being used.
Definition at line 110 of file SimpleSetup.h.
◆ getStateSpace()
|
inline |
Get the current instance of the state space.
Definition at line 92 of file SimpleSetup.h.
◆ getStateValidityChecker()
|
inline |
Get the current instance of the state validity checker.
Definition at line 104 of file SimpleSetup.h.
◆ haveExactSolutionPath()
bool ompl::control::SimpleSetup::haveExactSolutionPath | ( | ) | const |
Return true if a solution path is available (previous call to solve() was successful) and the solution is exact (not approximate)
Definition at line 127 of file SimpleSetup.cpp.
◆ haveSolutionPath()
|
inline |
Return true if a solution path is available (previous call to solve() was successful). The solution may be approximate.
Definition at line 139 of file SimpleSetup.h.
◆ print()
|
virtual |
Print information about the current setup.
Definition at line 140 of file SimpleSetup.cpp.
◆ setGoal()
|
inline |
Set the goal for planning. This call is not needed if setStartAndGoalStates() has been called.
Definition at line 216 of file SimpleSetup.h.
◆ setGoalState()
|
inline |
A simple form of setGoal(). The goal will be an instance of ompl::base::GoalState.
Definition at line 188 of file SimpleSetup.h.
◆ setOptimizationObjective()
|
inline |
Set the optimization objective to use.
Definition at line 175 of file SimpleSetup.h.
◆ setPlanner()
|
inline |
Set the planner to use. If the planner is not set, an attempt is made to use the planner allocator. If no planner allocator is available either, a default planner is set.
Definition at line 225 of file SimpleSetup.h.
◆ setPlannerAllocator()
|
inline |
Set the planner allocator to use. This is only used if no planner has been set. This is optional – a default planner will be used if no planner is otherwise specified.
Definition at line 236 of file SimpleSetup.h.
◆ setStartAndGoalStates()
|
inline |
Set the start and goal states to use.
Definition at line 181 of file SimpleSetup.h.
◆ setStartState()
|
inline |
Clear the currently set starting states and add state as the starting state.
Definition at line 208 of file SimpleSetup.h.
◆ setStatePropagator() [1/2]
|
inline |
Set the function that performs state propagation.
Definition at line 163 of file SimpleSetup.h.
◆ setStatePropagator() [2/2]
|
inline |
Set the instance of StatePropagator to perform state propagation.
Definition at line 169 of file SimpleSetup.h.
◆ setStateValidityChecker() [1/2]
|
inline |
Set the state validity checker to use.
Definition at line 157 of file SimpleSetup.h.
◆ setStateValidityChecker() [2/2]
|
inline |
Set the state validity checker to use.
Definition at line 151 of file SimpleSetup.h.
◆ setup()
|
virtual |
This method will create the necessary classes for planning. The solve() method will call this function automatically.
Reimplemented in ompl::control::MorseSimpleSetup, and ompl::control::OpenDESimpleSetup.
Definition at line 54 of file SimpleSetup.cpp.
◆ solve() [1/2]
|
virtual |
Run the planner until ptc becomes true (at most)
Definition at line 102 of file SimpleSetup.cpp.
◆ solve() [2/2]
|
virtual |
Run the planner for a specified amount of time (default is 1 second)
Definition at line 88 of file SimpleSetup.cpp.
Member Data Documentation
◆ configured_
|
protected |
Flag indicating whether the classes needed for planning are set up.
Definition at line 288 of file SimpleSetup.h.
◆ last_status_
|
protected |
The status of the last planning request.
Definition at line 294 of file SimpleSetup.h.
◆ pa_
|
protected |
The optional planner allocator.
Definition at line 285 of file SimpleSetup.h.
◆ pdef_
|
protected |
The created problem definition.
Definition at line 279 of file SimpleSetup.h.
◆ planner_
|
protected |
The maintained planner instance.
Definition at line 282 of file SimpleSetup.h.
◆ planTime_
|
protected |
The amount of time the last planning step took.
Definition at line 291 of file SimpleSetup.h.
◆ si_
|
protected |
The created space information.
Definition at line 276 of file SimpleSetup.h.
The documentation for this class was generated from the following files:
- ompl/control/SimpleSetup.h
- ompl/control/src/SimpleSetup.cpp