37 #ifndef OMPL_BASE_PATH_
38 #define OMPL_BASE_PATH_
40 #include "ompl/util/ClassForward.h"
41 #include "ompl/base/Cost.h"
43 #include <boost/concept_check.hpp>
51 OMPL_CLASS_FORWARD(SpaceInformation);
55 OMPL_CLASS_FORWARD(OptimizationObjective);
60 OMPL_CLASS_FORWARD(Path);
72 Path& operator=(
const Path&) =
delete;
95 BOOST_CONCEPT_ASSERT((boost::Convertible<T*, Path*>));
97 return static_cast<const T*
>(
this);
105 BOOST_CONCEPT_ASSERT((boost::Convertible<T*, Path*>));
107 return static_cast<T*
>(
this);
111 virtual double length()
const = 0;
118 virtual bool check()
const = 0;
121 virtual void print(std::ostream &out)
const = 0;
Path(const SpaceInformationPtr &si)
Constructor. A path must always know the space information it is part of.
SpaceInformationPtr si_
The space information this path is part of.
virtual bool check() const =0
Check if the path is valid.
const SpaceInformationPtr & getSpaceInformation() const
Get the space information associated to this class.
virtual ~Path()
Destructor.
Abstract definition of a path.
virtual double length() const =0
Return the length of a path.
virtual Cost cost(const OptimizationObjectivePtr &obj) const =0
Return the cost of the path with respect to a specified optimization objective.
virtual void print(std::ostream &out) const =0
Print the path to a stream.
A shared pointer wrapper for ompl::base::OptimizationObjective.
const T * as() const
Cast this instance to a desired type.
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
T * as()
Cast this instance to a desired type.