LaValle1998::LaValle1998(RRTNode *init, RRTNode *goal):
RRTBase(init, goal),
- nn(NN),
steer(ST)
{
srand(static_cast<unsigned>(time(0)));
rs = this->sample();
#endif
this->samples().push_back(rs);
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, '0');
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, &this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
RRTNode *pn = nn;
bool en_add = true;
for (auto ns: this->steer(nn, rs)) {
Kuwata2008::Kuwata2008(RRTNode *init, RRTNode *goal):
RRTBase(init, goal),
- nn(NN),
steer(ST)
{
srand(static_cast<unsigned>(time(0)));
else
{}//this->cost = &KUWATA2008_DCOST;
}
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, '0');
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
RRTNode *pn = nn;
std::vector<RRTNode *> newly_added;
bool en_add = true;
Karaman2011::Karaman2011(RRTNode *init, RRTNode *goal):
RRTBase(init, goal),
- nn(NN),
nv(NV),
steer(ST)
{
rs = this->sample();
#endif
this->samples().push_back(rs);
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, '0');
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
RRTNode *pn = nn;
std::vector<RRTNode *> nvs;
bool en_add = true;
T1::T1(RRTNode *init, RRTNode *goal):
RRTBase(init, goal),
- nn(NN),
nv(NV),
steer(ST)
{
else
rs = this->sample();
this->samples().push_back(rs);
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, '0');
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
RRTNode *pn = nn;
std::vector<RRTNode *> nvs;
bool connected;
rs = this->sample();
#endif
this->samples().push_back(rs);
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, '0');
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
if (!nn)
return false;
RRTNode *pn = nn;
Klemm2015::Klemm2015(RRTNode *init, RRTNode *goal):
Karaman2011(init, goal),
- nn(NN),
nv(NV),
steer(ST),
orig_root_(init),
// std::cerr << std::endl;
// }
//}
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, tree);
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
//std::cerr << " - nn: " << nn->x() << ", " << nn->y() << std::endl;
std::vector<RRTNode *> nvs;
std::vector<RRTNode *> steered = this->steer(nn, rs);
//std::cerr << "extend*C" << std::endl;
//std::cerr << "- tree is " << tree << std::endl;
//std::cerr << " - rs: " << rs->x() << ", " << rs->y() << std::endl;
-#if NNVERSION>2
- RRTNode *nn = this->nn(this->iy_, rs, this->cost, tree);
-#elif NNVERSION>1
- RRTNode *nn = this->nn(this->iy_, rs, this->cost);
-#else
- RRTNode *nn = this->nn(this->nodes(), rs, this->cost);
-#endif
+ RRTNode *nn = this->nn(rs);
RRTNode *pn = nn;
std::vector<RRTNode *> nvs;
bool en_add = true;
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 *)
-#if NNVERSION>2
- , char tree
-#endif
- );
std::vector<RRTNode *> (*steer)(
RRTNode *init,
RRTNode *goal);
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 *)
-#if NNVERSION>2
- , char tree
-#endif
- );
std::vector<RRTNode *> (*steer)(
RRTNode *init,
RRTNode *goal);
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 *)
-#if NNVERSION>2
- , char tree
-#endif
- );
std::vector<RRTNode *> (*nv)(
#if NVVERSION>1
std::vector<RRTNode *> (&nodes)[IYSIZE],
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 *)
-#if NNVERSION>2
- , char tree
-#endif
- );
std::vector<RRTNode *> (*nv)(
#if NVVERSION>1
std::vector<RRTNode *> (&nodes)[IYSIZE],
Klemm2015(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 *)
-#if NNVERSION>2
- , char tree
-#endif
- );
std::vector<RRTNode *> (*nv)(
#if NVVERSION>1
std::vector<RRTNode *> (&nodes)[IYSIZE],