ompl::base::GoalState Class Reference

Definition of a goal state. More...

#include <ompl/base/goals/GoalState.h>

Inheritance diagram for ompl::base::GoalState:

Public Member Functions

 GoalState (const SpaceInformationPtr &si)
 Create a goal representation that is in fact a state

 
void sampleGoal (State *st) const override
 Sample a state in the goal region.
 
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)
 
void print (std::ostream &out=std::cout) const override
 Print information about the goal data structure to a stream.
 
void setState (const State *st)
 Set the goal state.
 
void setState (const ScopedState<> &st)
 Set the goal state.
 
const StategetState () const
 Get the goal state.
 
StategetState ()
 Get the goal state.
 
- Public Member Functions inherited from ompl::base::GoalSampleableRegion
 GoalSampleableRegion (const SpaceInformationPtr &si)
 Create a goal region that can be sampled.
 
bool canSample () const
 Return true if maxSampleCount() > 0, since in this case samples can certainly be produced.
 
virtual bool couldSample () const
 Return true if samples could be generated by this sampler at some point in the future. By default this is equivalent to canSample(), but for GoalLazySamples, this call also reflects the fact that a sampling thread is active and although no samples are produced yet, some may become available at some point in the future.
 
- Public Member Functions inherited from ompl::base::GoalRegion
 GoalRegion (const SpaceInformationPtr &si)
 Create a goal region.
 
bool isSatisfied (const State *st) const override
 Equivalent to calling isSatisfied(const State *, double *) with a nullptr second argument.
 
bool isSatisfied (const State *st, double *distance) const override
 Decide whether a given state is part of the goal region. Returns true if the distance to goal is less than the threshold (using distanceGoal())
 
void setThreshold (double threshold)
 Set the distance to the goal that is allowed for a state to be considered in the goal region.
 
double getThreshold () const
 Get the distance to the goal that is allowed for a state to be considered in the goal region.
 
- Public Member Functions inherited from ompl::base::Goal
 Goal (const Goal &)=delete
 
Goaloperator= (const Goal &)=delete
 
 Goal (SpaceInformationPtr si)
 Constructor. The goal must always know the space information it is part of.
 
virtual ~Goal ()=default
 Destructor.
 
template<class T >
T * as ()
 Cast this instance to a desired type. More...
 
template<class T >
const T * as () const
 Cast this instance to a desired type. More...
 
GoalType getType () const
 Return the goal type.
 
bool hasType (GoalType type) const
 Check if this goal can be cast to a particular goal type.
 
const SpaceInformationPtrgetSpaceInformation () const
 Get the space information this goal is for.
 
virtual bool isStartGoalPairValid (const State *, const State *) const
 Since there can be multiple starting states (and multiple goal states) it is possible certain pairs are not to be allowed. By default we however assume all such pairs are allowed. Note: if this function returns true, isSatisfied() need not be called.
 

Protected Attributes

Statestate_
 The goal state.
 
- Protected Attributes inherited from ompl::base::GoalRegion
double threshold_
 The maximum distance that is allowed to the goal. By default, this is initialized to the minimum epsilon value a double can represent.
 
- Protected Attributes inherited from ompl::base::Goal
GoalType type_
 Goal type.
 
SpaceInformationPtr si_
 The space information for this goal.
 

Detailed Description

Definition of a goal state.

Definition at line 112 of file GoalState.h.


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