Class Goal
Defined in File Goal.h
Inheritance Relationships
Derived Type
public ompl::base::GoalRegion
(Class GoalRegion)
Class Documentation
-
class Goal
Abstract definition of goals.
Subclassed by ompl::base::GoalRegion
Public Functions
-
Goal(SpaceInformationPtr si)
Constructor. The goal must always know the space information it is part of.
-
virtual ~Goal() = default
Destructor.
-
inline const SpaceInformationPtr &getSpaceInformation() const
Get the space information this goal is for.
-
virtual bool isSatisfied(const State *st) const = 0
Return true if the state satisfies the goal constraints.
-
virtual bool isSatisfied(const State *st, double *distance) const
Return true if the state satisfies the goal constraints and compute the distance between the state given as argument and the goal (even if the goal is not satisfied). This distance can be an approximation. It can even be set to a constant, if such a computation is not possible.
Note
The default implementation sets the distance to a constant.
Note
If this function returns true, isStartGoalPairValid() need not be called.
- Parameters:
st – the state to check for validity
distance – location at which distance to goal will be stored
-
inline 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.
-
virtual void print(std::ostream &out = std::cout) const
Print information about the goal.
Protected Attributes
-
SpaceInformationPtr si_
The space information for this goal.
-
Goal(SpaceInformationPtr si)