RRTNode *just_added = &this->nodes().back();
while (scnt > 0) {
scnt--;
- for (auto &g: this->goals()) {
- this->steer(*just_added, g);
- if (std::get<0>(this->collide_steered_from(
- *just_added
- )))
- continue;
- this->join_steered(just_added);
- }
+ auto &g = this->goals().front();
+ this->steer(*just_added, g);
+ if (std::get<0>(this->collide_steered_from(
+ *just_added
+ )))
+ continue;
+ this->join_steered(just_added);
this->gf(this->goal_found(this->nodes().back()));
just_added = just_added->p();
}