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;
80 virtual ~Path() =
default;
93 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, Path *>));
95 return static_cast<const T *
>(
this);
103 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, Path *>));
105 return static_cast<T *
>(
this);
109 virtual double length()
const = 0;
116 virtual bool check()
const = 0;
119 virtual void print(std::ostream &out)
const = 0;
Path(SpaceInformationPtr si)
Constructor. A path must always know the space information it is part of.
const SpaceInformationPtr & getSpaceInformation() const
Get the space information associated to this class.
SpaceInformationPtr si_
The space information this path is part of.
virtual bool check() const =0
Check if the path is valid.
Main namespace. Contains everything in this library.
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.
const T * as() const
Cast this instance to a desired type.
virtual ~Path()=default
Destructor.
virtual void print(std::ostream &out) const =0
Print the path to a stream.
A shared pointer wrapper for ompl::base::OptimizationObjective.
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.