std::vector<RRTNode *> nv(RRTNode &t);
};
-/*! \brief Reeds and Shepp cost for building and search.
-*/
+/*! \brief Reeds & Shepp (build, search).
+ *
+ * Use Reeds & Shepp path length for building tree data structure as well as for
+ * searching it.
+ *
+ * \ingroup ext-cost
+ */
class RRTExt6 : public virtual RRTS {
- public:
- /*! \brief Reeds and Shepp path length.
- */
- double cost_build(RRTNode &f, RRTNode &t);
- /*! \brief Reeds and Shepp path length.
- */
- double cost_search(RRTNode &f, RRTNode &t);
+private:
+ double cost_build(RRTNode const& f, RRTNode const& t) const;
+ double cost_search(RRTNode const& f, RRTNode const& t) const;
};
/*! \brief Different costs extension.
-#include "rrtext.h"
+#include "rrtext.hh"
#include "reeds_shepp.h"
-double RRTExt6::cost_build(RRTNode &f, RRTNode &t)
+namespace rrts {
+
+double
+RRTExt6::cost_build(RRTNode const& f, RRTNode const& t) const
{
double q0[] = {f.x(), f.y(), f.h()};
double q1[] = {t.x(), t.y(), t.h()};
- ReedsSheppStateSpace rsss(this->bc.mtr());
+ ReedsSheppStateSpace rsss(this->bc_.mtr());
return rsss.distance(q0, q1);
}
-double RRTExt6::cost_search(RRTNode &f, RRTNode &t)
+double
+RRTExt6::cost_search(RRTNode const& f, RRTNode const& t) const
{
- double q0[] = {f.x(), f.y(), f.h()};
- double q1[] = {t.x(), t.y(), t.h()};
- ReedsSheppStateSpace rsss(this->bc.mtr());
- return rsss.distance(q0, q1);
+ return this->cost_build(f, t);
}
+
+} // namespace rrts