{
if (this->tlog().size() == 0)
return false;
- float oc = this->goal()->ccost();
+ float oc = this->tlog().back().front()->ccost();
std::vector<RRTNode *> tmp_cusps;
for (auto n: this->tlog().back()) {
if (n->parent() && sgn(n->s()) != sgn(n->parent()->s())) {
}
cusps.push_back(this->root());
std::reverse(cusps.begin(), cusps.end());
- cusps.push_back(this->goal());
+ cusps.push_back(this->tlog().back().front());
// Begin of Dijkstra
std::vector<RRTNodeDijkstra> dnodes;
for (unsigned int i = 0; i < cusps.size(); i++)
pn = ns;
}
}
- pn->add_child(this->goal(), this->cost(pn, this->goal()));
+ pn->add_child(
+ this->tlog().back().front(),
+ this->cost(pn, this->tlog().back().front()));
// End of Dijkstra
- if (this->goal()->ccost() < oc)
+ if (this->tlog().back().front()->ccost() < oc)
return true;
return false;
}