ompl::control::OpenDESimpleSetup Class Reference

Create the set of classes typically needed to solve a control problem when forward propagation is computed with OpenDE. More...

#include <ompl/extensions/ode/OpenDESimpleSetup.h>

Inheritance diagram for ompl::control::OpenDESimpleSetup:

Public Member Functions

 OpenDESimpleSetup (const ControlSpacePtr &space)
 Constructor needs the control space needed for planning.
 
 OpenDESimpleSetup (const base::StateSpacePtr &space)
 The control space is assumed to be OpenDEControlSpace. Constructor only needs the state space.
 
 OpenDESimpleSetup (const OpenDEEnvironmentPtr &env)
 The control space is assumed to be OpenDEControlSpace. The state space is assumed to be OpenDEStateSpace. Constructor only needs the OpenDE environment.
 
const OpenDEEnvironmentPtrgetEnvironment () const
 Get the OpenDE environment associated to the state and control spaces.
 
base::ScopedState< OpenDEStateSpacegetCurrentState () const
 Get the current OpenDE state (read parameters from OpenDE bodies)
 
void setCurrentState (const base::ScopedState<> &state)
 Set the current OpenDE state (set parameters for OpenDE bodies)
 
void setCurrentState (const base::State *state)
 Set the current OpenDE state (set parameters for OpenDE bodies)
 
void setVolumeBounds (const base::RealVectorBounds &bounds)
 Set the bounds for the planning volume.
 
void setLinearVelocityBounds (const base::RealVectorBounds &bounds)
 Set the bounds for the linear velocity.
 
void setAngularVelocityBounds (const base::RealVectorBounds &bounds)
 Set the bounds for the angular velocity.
 
void playPath (const base::PathPtr &path, double timeFactor=1.0) const
 Set the OpenDE world to the states that are contained in a given path, sequentially. Using timeFactor, the speed at which this sequence is iterated through is altered.
 
void playSolutionPath (double timeFactor=1.0) const
 Call playPath() on the solution path, if one is available.
 
base::PathPtr simulateControl (const double *control, unsigned int steps) const
 Simulate the OpenDE environment forward for steps simulation steps, using the control control. Construct a path representing this action.
 
base::PathPtr simulateControl (const Control *control, unsigned int steps) const
 Simulate the OpenDE environment forward for steps simulation steps, using the control control. Construct a path representing this action.
 
base::PathPtr simulate (unsigned int steps) const
 Simulate the OpenDE environment forward for steps simulation steps, using the null control (ompl::control::ControlSpace::nullControl()). Construct a path representing this action.
 
void setup () override
 This method will create the necessary classes for planning. The solve() method will call this function automatically.
 
- Public Member Functions inherited from ompl::control::SimpleSetup
 SimpleSetup (const SpaceInformationPtr &si)
 Constructor needs the control space used for planning.
 
 SimpleSetup (const ControlSpacePtr &space)
 Constructor needs the control space used for planning.
 
const SpaceInformationPtrgetSpaceInformation () const
 Get the current instance of the space information.
 
const base::ProblemDefinitionPtr & getProblemDefinition () const
 Get the current instance of the problem definition.
 
base::ProblemDefinitionPtr & getProblemDefinition ()
 Get the current instance of the problem definition.
 
const base::StateSpacePtr & getStateSpace () const
 Get the current instance of the state space.
 
const ControlSpacePtrgetControlSpace () const
 Get the current instance of the control space.
 
const base::StateValidityCheckerPtr & getStateValidityChecker () const
 Get the current instance of the state validity checker.
 
const StatePropagatorPtrgetStatePropagator () const
 Get the instance of the state propagator being used.
 
const base::GoalPtr & getGoal () const
 Get the current goal definition.
 
const base::PlannerPtr & getPlanner () const
 Get the current planner.
 
const base::PlannerAllocatorgetPlannerAllocator () const
 Get the planner allocator.
 
bool haveExactSolutionPath () const
 Return true if a solution path is available (previous call to solve() was successful) and the solution is exact (not approximate)
 
bool haveSolutionPath () const
 Return true if a solution path is available (previous call to solve() was successful). The solution may be approximate.
 
PathControlgetSolutionPath () const
 Get the solution path. Throw an exception if no solution is available.
 
void getPlannerData (base::PlannerData &pd) const
 Get information about the exploration data structure the motion planner used.
 
void setStateValidityChecker (const base::StateValidityCheckerPtr &svc)
 Set the state validity checker to use.
 
void setStateValidityChecker (const base::StateValidityCheckerFn &svc)
 Set the state validity checker to use.
 
void setStatePropagator (const StatePropagatorFn &sp)
 Set the function that performs state propagation.
 
void setStatePropagator (const StatePropagatorPtr &sp)
 Set the instance of StatePropagator to perform state propagation.
 
void setOptimizationObjective (const base::OptimizationObjectivePtr &optimizationObjective)
 Set the optimization objective to use.
 
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.
 
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.
 
void addStartState (const base::ScopedState<> &state)
 Add a starting state for planning. This call is not needed if setStartAndGoalStates() has been called.
 
void clearStartStates ()
 Clear the currently set starting states.
 
void setStartState (const base::ScopedState<> &state)
 Clear the currently set starting states and add state as the starting state.
 
void setGoal (const base::GoalPtr &goal)
 Set the goal for planning. This call is not needed if setStartAndGoalStates() has been called.
 
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.
 
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.
 
virtual base::PlannerStatus solve (double time=1.0)
 Run the planner for a specified amount of time (default is 1 second)
 
virtual base::PlannerStatus solve (const base::PlannerTerminationCondition &ptc)
 Run the planner until ptc becomes true (at most)
 
base::PlannerStatus getLastPlannerStatus () const
 Return the status of the last planning attempt.
 
double getLastPlanComputationTime () const
 Get the amount of time (in seconds) spent during the last planning step.
 
virtual void clear ()
 Clear all planning data. This only includes data generated by motion plan computation. Planner settings, start & goal states are not affected.
 
virtual void print (std::ostream &out=std::cout) const
 Print information about the current setup.
 

Additional Inherited Members

- Protected Attributes inherited from ompl::control::SimpleSetup
SpaceInformationPtr si_
 The created space information.
 
base::ProblemDefinitionPtr pdef_
 The created problem definition.
 
base::PlannerPtr planner_
 The maintained planner instance.
 
base::PlannerAllocator pa_
 The optional planner allocator.
 
bool configured_
 Flag indicating whether the classes needed for planning are set up.
 
double planTime_
 The amount of time the last planning step took.
 
base::PlannerStatus last_status_
 The status of the last planning request.
 

Detailed Description

Create the set of classes typically needed to solve a control problem when forward propagation is computed with OpenDE.

Definition at line 115 of file OpenDESimpleSetup.h.


The documentation for this class was generated from the following files: