ompl::base::PlannerInputStates Class Reference

Helper class to extract valid start & goal states. Usually used internally by planners. More...

#include <ompl/base/Planner.h>

Public Member Functions

 PlannerInputStates (const PlannerPtr &planner)
 Default constructor. No work is performed.
 
 PlannerInputStates (const Planner *planner)
 Default constructor. No work is performed.
 
 PlannerInputStates ()
 Default constructor. No work is performed. A call to use() needs to be made, before making any calls to nextStart() or nextGoal().
 
 ~PlannerInputStates ()
 Destructor. Clear allocated memory.
 
void clear ()
 Clear all stored information.
 
void restart ()
 Forget how many states were returned by nextStart() and nextGoal() and return all states again.
 
bool update ()
 Set the space information and problem definition this class operates on, based on the available planner instance. Returns true if changes were found (different problem definition) and clear() was called.
 
bool use (const ProblemDefinitionPtr &pdef)
 Set the problem definition this class operates on. If a planner is not set in the constructor argument, a call to this function is needed before any calls to nextStart() or nextGoal() are made. Returns true if changes were found (different problem definition) and clear() was called.
 
void checkValidity () const
 Check if the problem definition was set, start state are available and goal was set.
 
const StatenextStart ()
 Return the next valid start state or nullptr if no more valid start states are available.
 
const StatenextGoal (const PlannerTerminationCondition &ptc)
 Return the next valid goal state or nullptr if no more valid goal states are available. Because sampling of goal states may also produce invalid goals, this function takes an argument that specifies whether a termination condition has been reached. If the termination condition evaluates to true the function terminates even if no valid goal has been found.
 
const StatenextGoal ()
 Same as above but only one attempt is made to find a valid goal.
 
bool haveMoreStartStates () const
 Check if there are more potential start states.
 
bool haveMoreGoalStates () const
 Check if there are more potential goal states.
 
unsigned int getSeenStartStatesCount () const
 Get the number of start states from the problem definition that were already seen, including invalid ones.
 
unsigned int getSampledGoalsCount () const
 Get the number of sampled goal states, including invalid ones.
 

Detailed Description

Helper class to extract valid start & goal states. Usually used internally by planners.

This class is meant to behave correctly if the user updates the problem definition between subsequent calls to ompl::base::Planner::solve() without calling ompl::base::Planner::clear() in between. Only allowed changes to the problem definition are accounted for: adding of starring states or adding of goal states for instances inherited from ompl::base::GoalSampleableRegion.

Definition at line 141 of file Planner.h.


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