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/concept_check.hpp>
55 OMPL_CLASS_FORWARD(Goal);
66 Goal(
const Goal &) =
delete;
67 Goal &operator=(
const Goal &) =
delete;
73 virtual ~Goal() =
default;
80 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, Goal *>));
82 return static_cast<T *
>(
this);
90 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, Goal *>));
92 return static_cast<const T *
>(
this);
104 return (
type_ & type) == type;
115 virtual bool isSatisfied(
const State *st)
const = 0;
128 virtual bool isSatisfied(
const State *st,
double *distance)
const;
142 virtual void print(std::ostream &out = std::cout)
const;
virtual void print(std::ostream &out=std::cout) const
Print information about the goal.
SpaceInformationPtr si_
The space information for this goal.
GoalType getType() const
Return the goal type.
T * as()
Cast this instance to a desired type.
virtual ~Goal()=default
Destructor.
const SpaceInformationPtr & getSpaceInformation() const
Get the space information this goal is for.
bool hasType(GoalType type) const
Check if this goal can be cast to a particular goal type.
virtual bool isSatisfied(const State *st) const =0
Return true if the state satisfies the goal constraints.
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...
GoalType
The type of goal.
Main namespace. Contains everything in this library.