37 #ifndef OMPL_BASE_GOAL_
38 #define OMPL_BASE_GOAL_
40 #include "ompl/base/State.h"
41 #include "ompl/base/SpaceInformation.h"
42 #include "ompl/util/ClassForward.h"
43 #include "ompl/base/GoalTypes.h"
46 #include <boost/noncopyable.hpp>
47 #include <boost/concept_check.hpp>
56 OMPL_CLASS_FORWARD(Goal);
63 class Goal :
private boost::noncopyable
80 BOOST_CONCEPT_ASSERT((boost::Convertible<T*, Goal*>));
82 return static_cast<T*
>(
this);
87 const T*
as(
void)
const
90 BOOST_CONCEPT_ASSERT((boost::Convertible<T*, Goal*>));
92 return static_cast<const T*
>(
this);
104 return (
type_ & type) == type;
142 virtual void print(std::ostream &out = std::cout)
const;
Goal(const SpaceInformationPtr &si)
Constructor. The goal must always know the space information it is part of.
virtual void print(std::ostream &out=std::cout) const
Print information about the goal.
GoalType getType(void) const
Return the goal type.
Abstract definition of goals.
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.
virtual bool isStartGoalPairValid(const State *, const State *) const
Since there can be multiple starting states (and multiple goal states) it is possible certain pairs a...
Definition of an abstract state.
virtual bool isSatisfied(const State *st) const =0
Return true if the state satisfies the goal constraints.
SpaceInformationPtr si_
The space information for this goal.
GoalType
The type of goal.
virtual ~Goal(void)
Destructor.
const T * as(void) const
Cast this instance to a desired type.
T * as(void)
Cast this instance to a desired type.