public:
//using RRTBase::RRTBase;
LaValle1998(RRTNode *init, RRTNode *goal);
-
- // RRT framework
- RRTNode *(*nn)(
-#if NNVERSION>1
- std::vector<RRTNode *> (&nodes)[IYSIZE],
-#else
- std::vector<RRTNode *> &nodes,
-#endif
- RRTNode *node,
- float (*cost)(RRTNode *, RRTNode *));
- RRTNode *(*sample)();
- std::vector<RRTNode *> (*steer)(
- RRTNode *init,
- RRTNode *goal);
- float (*cost)(RRTNode *init, RRTNode *goal);
bool next();
};
class Kuwata2008: public RRTBase {
public:
Kuwata2008(RRTNode *init, RRTNode *goal);
-
- // RRT framework
- RRTNode *(*nn)(
-#if NNVERSION>1
- std::vector<RRTNode *> (&nodes)[IYSIZE],
-#else
- std::vector<RRTNode *> &nodes,
-#endif
- RRTNode *node,
- float (*cost)(RRTNode *, RRTNode *));
- RRTNode *(*sample)();
- std::vector<RRTNode *> (*steer)(
- RRTNode *init,
- RRTNode *goal);
- float (*cost)(RRTNode *init, RRTNode *goal);
bool next();
};
std::vector<RRTNode *> nvs);
bool rewire(std::vector<RRTNode *> nvs, RRTNode *ns);
public:
+ Karaman2011();
Karaman2011(RRTNode *init, RRTNode *goal);
-
- // RRT framework
- RRTNode *(*nn)(
-#if NNVERSION>1
- std::vector<RRTNode *> (&nodes)[IYSIZE],
-#else
- std::vector<RRTNode *> &nodes,
-#endif
- RRTNode *node,
- float (*cost)(RRTNode *, RRTNode *));
- std::vector<RRTNode *> (*nv)(
-#if NVVERSION>1
- std::vector<RRTNode *> (&nodes)[IYSIZE],
-#else
- RRTNode *root,
-#endif
- RRTNode *node,
- float (*cost)(RRTNode *, RRTNode *),
- float dist);
- RRTNode *(*sample)();
- std::vector<RRTNode *> (*steer)(
- RRTNode *init,
- RRTNode *goal);
- float (*cost)(RRTNode *init, RRTNode *goal);
bool next();
};
class T1: public RRTBase {
public:
T1(RRTNode *init, RRTNode *goal);
-
- // RRT framework
- RRTNode *(*nn)(
-#if NNVERSION>1
- std::vector<RRTNode *> (&nodes)[IYSIZE],
-#else
- std::vector<RRTNode *> &nodes,
-#endif
- RRTNode *node,
- float (*cost)(RRTNode *, RRTNode *));
- std::vector<RRTNode *> (*nv)(
-#if NVVERSION>1
- std::vector<RRTNode *> (&nodes)[IYSIZE],
-#else
- RRTNode *root,
-#endif
- RRTNode *node,
- float (*cost)(RRTNode *, RRTNode *),
- float dist);
- RRTNode *(*sample)();
- std::vector<RRTNode *> (*steer)(
- RRTNode *init,
- RRTNode *goal);
- float (*cost)(RRTNode *init, RRTNode *goal);
bool next();
};
class T2: public Karaman2011 {
public:
using Karaman2011::Karaman2011;
-
bool next();
float goal_cost();
};
class T3: public RRTBase {
protected:
+ public:
T2 p_root_;
T2 p_goal_;
- public:
+ ~T3();
+ T3();
T3(RRTNode *init, RRTNode *goal);
bool next();
bool link_obstacles(
bool overlaptrees(RRTNode **ron, RRTNode **gon);
};
+class Klemm2015: public Karaman2011 {
+ private:
+ RRTNode *orig_root_ = nullptr;
+ RRTNode *orig_goal_ = nullptr;
+ protected:
+ int extendstar1(RRTNode *rs, RRTNode **xn);
+ int extendstarC(RRTNode *rs);
+ int connectstar(RRTNode *x);
+ void swap();
+ public:
+ Klemm2015(RRTNode *init, RRTNode *goal);
+ bool next();
+};
+
#endif