Definition of a set of goal states. More...
#include <GoalStates.h>
Public Member Functions | |
GoalStates (const SpaceInformationPtr &si) | |
Create a goal representation that is in fact a set of states. | |
virtual void | sampleGoal (State *st) const |
Sample a state in the goal region. | |
virtual unsigned int | maxSampleCount (void) const |
Return the maximum number of samples that can be asked for before repeating. | |
virtual double | distanceGoal (const State *st) const |
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 |
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 (void) |
Clear all goal states. | |
virtual bool | hasStates (void) 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 (void) const |
Return the number of valid goal states. | |
![]() | |
GoalSampleableRegion (const SpaceInformationPtr &si) | |
Create a goal region that can be sampled. | |
bool | canSample (void) const |
Return true if maxSampleCount() > 0, since in this case samples can certainly be produced. | |
virtual bool | couldSample (void) 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. | |
![]() | |
GoalRegion (const SpaceInformationPtr &si) | |
Create a goal region. | |
virtual bool | isSatisfied (const State *st) const |
Equivalent to calling isSatisfied(const State *, double *) with a NULL second argument. | |
virtual bool | isSatisfied (const State *st, double *distance) const |
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 (void) const |
Get the distance to the goal that is allowed for a state to be considered in the goal region. | |
![]() | |
Goal (const SpaceInformationPtr &si) | |
Constructor. The goal must always know the space information it is part of. | |
virtual | ~Goal (void) |
Destructor. | |
template<class T > | |
T * | as (void) |
Cast this instance to a desired type. | |
template<class T > | |
const T * | as (void) const |
Cast this instance to a desired type. | |
GoalType | getType (void) const |
Return the goal type. | |
bool | hasType (GoalType type) const |
Check if this goal can be cast to a particular goal type. | |
const SpaceInformationPtr & | getSpaceInformation (void) const |
Get the space information this goal is for. | |
bool | isSatisfied (const State *st, double pathLength, double *distance) const |
Return true if the state satisfies the goal constraints and the path length is less than the desired maximum length. This call also computes the distance between the state given as argument and the goal. | |
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. | |
double | getMaximumPathLength (void) const |
Get the maximum length allowed for a solution path. | |
void | setMaximumPathLength (double maximumPathLength) |
Set the maximum length allowed for a solution path. This value is checked only in the version of isSatisfied() that takes the path length as argument or by isPathLengthSatisfied(). The default maximal path length is infinity. | |
bool | isPathLengthSatisfied (double pathLength) const |
Check if pathLength is smaller than the value returned by getMaximumPathLength() |
Protected Attributes | |
std::vector< State * > | states_ |
The goal states. Only ones that are valid are considered by the motion planner. |
Definition of a set of goal states.
Definition at line 50 of file GoalStates.h.