Procedure `connect` is called form the `next` procedure only. Also, just
before `connect`, the collision is checked for the all of the `steered`
nodes. Therefore, there is no collision when `connect` is called.
// RRT* procedures
bool RRTS::connect()
{
- bool conn = false;
RRTNode *t = &this->steered().front();
RRTNode *f = this->nn(this->samples().back());
double cost = this->cost_search(*f, *t);
t = &this->nodes().back();
t->p(f);
t->c(this->cost_build(*f, *t));
- conn = true;
- return conn;
+ return true;
}
void RRTS::rewire()