Class GoalStates

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class GoalStates : public ompl::base::GoalSampleableRegion

Definition of a set of goal states.

Subclassed by ompl::base::GoalLazySamples

Public Functions

inline GoalStates(const SpaceInformationPtr &si)

Create a goal representation that is in fact a set of states

~GoalStates() override
virtual void sampleGoal(State *st) const override

Sample a state in the goal region.

virtual unsigned int maxSampleCount() const override

Return the maximum number of samples that can be asked for before repeating.

virtual double distanceGoal(const State *st) const override

Compute the distance to the goal (heuristic). This function is the one used in computing the distance to the goal in a call to isSatisfied()

virtual void print(std::ostream &out = std::cout) const override

Print information about the goal data structure to a stream.

virtual void addState(const State *st)

Add a goal state.

void addState(const ScopedState<> &st)

Add a goal state (calls the previous definition of addState())

virtual void clear()

Clear all goal states.

virtual bool hasStates() const

Check if there are any states in this goal region.

virtual const State *getState(unsigned int index) const

Return a pointer to the indexth state in the state list.

virtual std::size_t getStateCount() const

Return the number of valid goal states.

Protected Attributes

std::vector<State*> states_

The goal states. Only ones that are valid are considered by the motion planner.