2 This file is part of I am car.
4 I am car is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 I am car is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with I am car. If not, see <http://www.gnu.org/licenses/>.
37 extern SDL_Window* gw;
38 extern SDL_GLContext gc;
43 pthread_mutex_init(&this->m_, NULL);
48 pthread_mutex_lock(&this->m_);
49 bool ret = this->changed_;
50 pthread_mutex_unlock(&this->m_);
54 std::vector<RRTNode *> Cell::nodes()
56 pthread_mutex_lock(&this->m_);
57 std::vector<RRTNode *> ret(this->nodes_);
58 pthread_mutex_unlock(&this->m_);
62 void Cell::add_node(RRTNode *n)
64 pthread_mutex_lock(&this->m_);
65 this->nodes_.push_back(n);
66 this->changed_ = true;
67 pthread_mutex_unlock(&this->m_);
72 // Fix heap-use-after-free error when T3 planner is used. If only T2 is used,
73 // please uncommend the following code:
75 for (auto n: this->nodes_)
78 for (auto n: this->dnodes_)
79 if (n != this->root_ && n != this->goal_)
81 for (auto s: this->samples_)
84 for (auto edges: this->rlog_)
92 : root_(new RRTNode())
93 , goal_(new RRTNode())
94 , gen_(std::random_device{}())
96 this->nodes_.reserve(NOFNODES);
97 this->nodes_.push_back(this->root_);
98 this->add_iy(this->root_);
99 this->add_ixy(this->root_);
100 float hcenter = (this->HMAX - this->HMIN) / 2 + this->HMIN;
101 float hrange = (this->HMAX - this->HMIN) / 2;
102 float vcenter = (this->VMAX - this->VMIN) / 2 + this->VMIN;
103 float vrange = (this->VMAX - this->VMIN) / 2;
104 this->ndx_ = std::normal_distribution<float>(hcenter, hrange);
105 this->ndy_ = std::normal_distribution<float>(vcenter, vrange);
106 this->ndh_ = std::normal_distribution<float>(0, 2 * M_PI);
109 RRTBase::RRTBase(RRTNode *init, RRTNode *goal)
112 , gen_(std::random_device{}())
114 this->nodes_.reserve(NOFNODES);
115 this->nodes_.push_back(init);
118 float hcenter = (this->HMAX - this->HMIN) / 2 + this->HMIN;
119 float hrange = (this->HMAX - this->HMIN) / 2;
120 float vcenter = (this->VMAX - this->VMIN) / 2 + this->VMIN;
121 float vrange = (this->VMAX - this->VMIN) / 2;
122 this->ndx_ = std::normal_distribution<float>(hcenter, hrange);
123 this->ndy_ = std::normal_distribution<float>(vcenter, vrange);
124 this->ndh_ = std::normal_distribution<float>(0, 2 * M_PI);
128 RRTNode *RRTBase::root()
133 RRTNode *RRTBase::goal()
138 std::vector<RRTNode *> &RRTBase::goals()
143 std::vector<RRTNode *> &RRTBase::nodes()
148 std::vector<RRTNode *> &RRTBase::dnodes()
150 return this->dnodes_;
153 std::queue<RRTNode *> &RRTBase::firsts()
155 return this->firsts_;
158 PolygonObstacle &RRTBase::frame()
163 std::vector<RRTNode *> &RRTBase::samples()
165 return this->samples_;
168 std::vector<CircleObstacle> *RRTBase::co()
170 return this->cobstacles_;
173 std::vector<SegmentObstacle> *RRTBase::so()
175 return this->sobstacles_;
178 std::vector<float> &RRTBase::clog()
183 std::vector<float> &RRTBase::nlog()
188 std::vector<std::vector<RRTEdge *>> &RRTBase::rlog()
193 std::vector<float> &RRTBase::slog()
198 std::vector<std::vector<RRTNode *>> &RRTBase::tlog()
203 std::vector<RRTNode *> &RRTBase::slot_cusp()
205 return this->slot_cusp_;
208 bool RRTBase::goal_found()
210 return this->goal_found_;
213 float RRTBase::elapsed()
215 std::chrono::duration<float> dt;
216 dt = std::chrono::duration_cast<std::chrono::duration<float>>(
217 this->tend_ - this->tstart_);
221 std::vector<RRTNode *> RRTBase::traj_cusp()
223 std::vector<RRTNode *> tmp_cusps;
224 for (auto n: this->tlog().back()) {
225 if (sgn(n->s()) == 0) {
226 tmp_cusps.push_back(n);
227 } else if (n->parent() &&
228 sgn(n->s()) != sgn(n->parent()->s())) {
229 tmp_cusps.push_back(n);
230 tmp_cusps.push_back(n->parent());
233 std::vector<RRTNode *> cusps;
234 for (unsigned int i = 0; i < tmp_cusps.size(); i++) {
235 if (tmp_cusps[i] != tmp_cusps[(i + 1) % tmp_cusps.size()])
236 cusps.push_back(tmp_cusps[i]);
242 void RRTBase::root(RRTNode *node)
247 void RRTBase::goal(RRTNode *node)
252 void RRTBase::goals(std::vector<RRTNode *> g)
255 std::reverse(this->goals_.begin(), this->goals_.end());
256 RRTNode *pn = this->goals_.front();
257 for (auto n: this->goals_) {
259 pn->add_child(n, this->cost(pn ,n));
265 bool RRTBase::logr(RRTNode *root)
267 std::vector<RRTEdge *> e; // Edges to log
268 std::vector<RRTNode *> s; // DFS stack
269 std::vector<RRTNode *> r; // reset visited_
272 while (s.size() > 0) {
277 for (auto ch: tmp->children()) {
279 e.push_back(new RRTEdge(tmp, ch));
285 this->rlog_.push_back(e);
289 float RRTBase::ocost(RRTNode *n)
292 for (auto o: *this->cobstacles_)
293 if (o.dist_to(n) < dist)
295 for (auto o: *this->sobstacles_)
296 if (o.dist_to(n) < dist)
298 return n->ocost(dist);
301 bool RRTBase::tlog(std::vector<RRTNode *> t)
304 this->slog_.push_back(this->elapsed());
305 this->clog_.push_back(t.front()->ccost() - t.back()->ccost());
306 this->nlog_.push_back(this->nodes_.size());
307 this->tlog_.push_back(t);
314 void RRTBase::tstart()
316 this->tstart_ = std::chrono::high_resolution_clock::now();
321 this->tend_ = std::chrono::high_resolution_clock::now();
324 bool RRTBase::link_obstacles(
325 std::vector<CircleObstacle> *cobstacles,
326 std::vector<SegmentObstacle> *sobstacles)
328 this->cobstacles_ = cobstacles;
329 this->sobstacles_ = sobstacles;
330 if (!this->cobstacles_ || !this->sobstacles_) {
336 bool RRTBase::add_iy(RRTNode *n)
343 this->iy_[i].push_back(n);
347 bool RRTBase::add_ixy(RRTNode *n)
349 int ix = this->XI(n);
354 int iy = this->YI(n);
359 this->ixy_[ix][iy].add_node(n);
363 bool RRTBase::goal_found(bool f)
365 this->goal_found_ = f;
369 void RRTBase::slot_cusp(std::vector<RRTNode *> sc)
371 for (unsigned int i = 0; i < sc.size() - 1; i++)
372 sc[i]->add_child(sc[i + 1], this->cost(sc[i], sc[i + 1]));
373 sc[0]->parent(this->goal());
374 this->slot_cusp_ = sc;
378 bool RRTBase::glplot()
381 float glplwscale = 1.0 / ((this->VMAX) - (this->VMIN));
382 float glplhscale = 1.0 / ((this->HMAX) - (this->HMIN));
383 glClear(GL_COLOR_BUFFER_BIT);
388 for (auto o: *this->sobstacles_) {
390 glVertex2f(GLVERTEX(o.init()));
391 glVertex2f(GLVERTEX(o.goal()));
398 glVertex2f(GLVERTEX(this->root_));
399 glVertex2f(GLVERTEX(this->goal_));
402 if (this->samples_.size() > 0) {
406 glVertex2f(GLVERTEX(this->samples_.back()));
409 // Plot nodes (position, orientation
410 std::vector<RRTNode *> s; // DFS stack
411 std::vector<RRTNode *> r; // reset visited_
414 s.push_back(this->root_);
415 while (s.size() > 0) {
420 for (auto ch: tmp->children()) {
422 glColor3f(0.5, 0.5, 0.5);
423 BicycleCar bc(tmp->x(), tmp->y(), tmp->h());
425 bc.lfx() * glplwscale,
426 bc.lfy() * glplhscale
429 bc.lrx() * glplwscale,
430 bc.lry() * glplhscale
433 bc.lrx() * glplwscale,
434 bc.lry() * glplhscale
437 bc.rrx() * glplwscale,
438 bc.rry() * glplhscale
441 bc.rrx() * glplwscale,
442 bc.rry() * glplhscale
445 bc.rfx() * glplwscale,
446 bc.rfy() * glplhscale
454 s.push_back(this->root_);
455 while (s.size() > 0) {
460 for (auto ch: tmp->children()) {
462 glColor3f(0.5, 0.5, 0.5);
463 glVertex2f(GLVERTEX(tmp));
464 glVertex2f(GLVERTEX(ch));
469 // Plot nodes (from goal)
471 s.push_back(this->goal_);
472 while (s.size() > 0) {
477 for (auto ch: tmp->children()) {
479 glColor3f(0.5, 0.5, 0.5);
480 glVertex2f(GLVERTEX(tmp));
481 glVertex2f(GLVERTEX(ch));
486 std::vector<RRTNode *> cusps;
487 // Plot last trajectory
488 if (this->tlog().size() > 0) {
491 for (auto n: this->tlog().back()) {
494 glVertex2f(GLVERTEX(n));
495 glVertex2f(GLVERTEX(n->parent()));
496 if (sgn(n->s()) != sgn(n->parent()->s()))
505 for (auto n: cusps) {
507 glVertex2f(GLVERTEX(n));
510 SDL_GL_SwapWindow(gw);
517 bool RRTBase::goal_found(
519 float (*cost)(RRTNode *, RRTNode* ))
521 if (GOAL_IS_NEAR(node, this->goal_)) {
522 if (this->goal_found_) {
523 if (node->ccost() + this->cost(node, this->goal_) <
524 this->goal_->ccost()) {
525 RRTNode *op; // old parent
526 float oc; // old cumulative cost
527 float od; // old direct cost
528 op = this->goal_->parent();
529 oc = this->goal_->ccost();
530 od = this->goal_->dcost();
531 node->add_child(this->goal_,
532 this->cost(node, this->goal_));
533 if (this->collide(node, this->goal_)) {
534 node->children().pop_back();
535 this->goal_->parent(op);
536 this->goal_->ccost(oc);
537 this->goal_->dcost(od);
539 op->rem_child(this->goal_);
548 this->cost(node, this->goal_));
549 if (this->collide(node, this->goal_)) {
550 node->children().pop_back();
551 this->goal_->remove_parent();
554 this->goal_found_ = true;
555 // Update ccost of goal's parents
556 if (this->goals().size() > 0) {
557 RRTNode *ch = this->goals().back();
558 RRTNode *pn = this->goals().back()->parent();
574 bool RRTBase::goal_found(
579 if (GOAL_IS_NEAR(node, goal)) {
580 if (this->goal_found_) {
583 && node->ccost() + this->cost(node, goal)
586 RRTNode *op; // old parent
587 float oc; // old cumulative cost
588 float od; // old direct cost
592 node->add_child(goal,
593 this->cost(node, goal));
594 if (this->collide(node, goal)) {
595 node->children().pop_back();
609 this->cost(node, goal)
611 if (this->collide(node, goal)) {
612 node->children().pop_back();
613 goal->remove_parent();
616 this->goal_found_ = true;
617 // Update ccost of goal's children
618 goal->update_ccost();
619 // Update ccost of goals
620 for (auto g: this->goals()) {
631 bool RRTBase::collide(RRTNode *init, RRTNode *goal)
633 std::vector<RRTEdge *> edges;
635 volatile bool col = false;
637 while (tmp != init) {
638 BicycleCar bc(tmp->x(), tmp->y(), tmp->h());
639 std::vector<RRTEdge *> bcframe = bc.frame();
640 #pragma omp parallel for reduction(|: col)
641 for (i = 0; i < (*this->cobstacles_).size(); i++) {
642 if ((*this->cobstacles_)[i].collide(tmp)) {
645 for (auto &e: bcframe) {
646 if ((*this->cobstacles_)[i].collide(e)) {
652 for (auto e: bcframe) {
657 for (auto e: edges) {
662 #pragma omp parallel for reduction(|: col)
663 for (i = 0; i < (*this->sobstacles_).size(); i++) {
664 for (auto &e: bcframe) {
665 if ((*this->sobstacles_)[i].collide(e)) {
671 for (auto e: bcframe) {
676 for (auto e: edges) {
681 if (!tmp->parent()) {
684 edges.push_back(new RRTEdge(tmp, tmp->parent()));
686 for (auto e: bcframe) {
692 for (auto &e: edges) {
693 #pragma omp parallel for reduction(|: col)
694 for (i = 0; i < (*this->cobstacles_).size(); i++) {
695 if ((*this->cobstacles_)[i].collide(e)) {
700 for (auto e: edges) {
705 #pragma omp parallel for reduction(|: col)
706 for (i = 0; i < (*this->sobstacles_).size(); i++) {
707 if ((*this->sobstacles_)[i].collide(e)) {
712 for (auto e: edges) {
718 for (auto e: edges) {
724 class RRTNodeDijkstra {
726 RRTNodeDijkstra(int i):
732 RRTNodeDijkstra(int i, float c):
738 RRTNodeDijkstra(int i, int p, float c):
757 class RRTNodeDijkstraComparator {
760 const RRTNodeDijkstra& n1,
761 const RRTNodeDijkstra& n2)
767 bool RRTBase::optp_dijkstra(
768 std::vector<RRTNode *> &cusps,
769 std::vector<int> &npi)
771 std::vector<RRTNodeDijkstra> dnodes;
772 for (unsigned int i = 0; i < cusps.size(); i++)
774 dnodes.push_back(RRTNodeDijkstra(
779 dnodes.push_back(RRTNodeDijkstra(
785 std::vector<RRTNodeDijkstra>,
786 RRTNodeDijkstraComparator> pq;
787 RRTNodeDijkstra tmp = dnodes[0];
789 float ch_cost = 9999;
790 std::vector<RRTNode *> steered;
791 while (!pq.empty()) {
794 for (unsigned int i = tmp.ni + 1; i < cusps.size(); i++) {
795 ch_cost = dnodes[tmp.ni].c +
796 this->cost(cusps[tmp.ni], cusps[i]);
797 steered = this->steer(cusps[tmp.ni], cusps[i]);
798 if (steered.size() <= 0)
800 for (unsigned int j = 0; j < steered.size() - 1; j++)
801 steered[j]->add_child(steered[j + 1], 1);
804 steered[steered.size() - 1])) {
805 for (auto n: steered)
809 if (ch_cost < dnodes[i].c) {
810 dnodes[i].c = ch_cost;
811 dnodes[i].pi = tmp.ni;
815 for (auto n: steered)
819 unsigned int tmpi = 0;
820 for (auto n: dnodes) {
821 if (n.v && n.ni > tmpi)
826 tmpi = dnodes[tmpi].pi;
829 std::reverse(npi.begin(), npi.end());
833 bool RRTBase::optp_rrp(
834 std::vector<RRTNode *> &cusps,
835 std::vector<int> &npi)
837 std::vector<RRTNode *> steered;
838 std::vector<int> candidates;
839 RRTNode *x_j = nullptr;
840 RRTNode *x_i = nullptr;
841 int j = cusps.size() - 1;
855 for (int i = 0; i < j; i++) {
856 steered = this->steer(cusps[i], x_j);
857 for (unsigned int k = 0; k < steered.size() - 1; k++)
858 steered[k]->add_child(steered[k + 1], 1);
861 steered[steered.size() - 1]))
862 candidates.push_back(i);
864 if (candidates.size() <= 0)
866 i_min = candidates[0];
869 for (auto c: candidates) {
871 dx = x_j->x() - x_i->x();
872 dy = x_j->y() - x_i->y();
873 ed = EDIST(x_i, x_j);
874 th_i = (cos(x_i->h()) * dx + sin(x_i->h()) * dy) / ed;
875 th_j = (cos(x_j->h()) * dx + sin(x_j->h()) * dy) / ed;
886 std::reverse(npi.begin(), npi.end());
890 bool RRTBase::optp_smart(
891 std::vector<RRTNode *> &cusps,
892 std::vector<int> &npi)
894 std::vector<RRTNode *> steered;
895 int li = cusps.size() - 1;
899 steered = this->steer(cusps[ai - 1], cusps[li]);
900 for (unsigned int j = 0; j < steered.size() - 1; j++)
901 steered[j]->add_child(steered[j + 1], 1);
902 if (this->collide(steered[0], steered[steered.size() - 1])) {
907 for (auto n: steered)
911 std::reverse(npi.begin(), npi.end());
915 bool RRTBase::opt_path()
917 if (this->tlog().size() == 0)
919 float oc = this->tlog().back().front()->ccost();
920 std::vector<RRTNode *> tmp_cusps;
921 for (auto n: this->tlog().back()) {
922 if (sgn(n->s()) == 0) {
923 tmp_cusps.push_back(n);
924 } else if (n->parent() &&
925 sgn(n->s()) != sgn(n->parent()->s())) {
926 tmp_cusps.push_back(n);
927 tmp_cusps.push_back(n->parent());
929 //tmp_cusps.push_back(n);
931 if (tmp_cusps.size() < 2)
933 std::vector<RRTNode *> cusps;
934 for (unsigned int i = 0; i < tmp_cusps.size(); i++) {
937 tmp_cusps[(i + 1) % tmp_cusps.size()]
939 cusps.push_back(tmp_cusps[i]);
941 std::reverse(cusps.begin(), cusps.end());
942 std::vector<int> npi; // new path indexes
943 if (!this->optp_dijkstra(cusps, npi))
945 RRTNode *pn = cusps[npi[0]];
946 RRTNode *tmp = nullptr;
948 for (unsigned int i = 0; i < npi.size() - 1; i++) {
950 for (auto ns: this->steer(cusps[npi[i]], cusps[npi[i + 1]])) {
953 } else if (IS_NEAR(cusps[npi[i]], ns)) {
955 while (tmp && tmp != cusps[npi[i]]) {
961 } else if (IS_NEAR(ns, cusps[npi[i + 1]])) {
963 cusps[npi[i + 1]]->parent()->rem_child(
967 this->cost(pn, cusps[npi[i + 1]]));
969 } else if (IS_NEAR(pn, ns)) {
972 this->nodes().push_back(ns);
975 pn->add_child(ns, this->cost(pn, ns));
980 this->root()->update_ccost();
981 if (this->tlog().back().front()->ccost() < oc)
986 bool RRTBase::rebase(RRTNode *nr)
988 if (!nr || this->goal_ == nr || this->root_ == nr)
990 std::vector<RRTNode *> s; // DFS stack
993 unsigned int to_del = 0;
995 s.push_back(this->root_);
996 while (s.size() > 0) {
999 for (auto ch: tmp->children()) {
1003 to_del = this->nodes_.size();
1004 #pragma omp parallel for reduction(min: to_del)
1005 for (i = 0; i < this->nodes_.size(); i++) {
1006 if (this->nodes_[i] == tmp)
1009 if (to_del < this->nodes_.size())
1010 this->nodes_.erase(this->nodes_.begin() + to_del);
1012 to_del = this->iy_[iy].size();
1013 #pragma omp parallel for reduction(min: to_del)
1014 for (i = 0; i < this->iy_[iy].size(); i++) {
1015 if (this->iy_[iy][i] == tmp)
1018 if (to_del < this->iy_[iy].size())
1019 this->iy_[iy].erase(this->iy_[iy].begin() + to_del);
1020 this->dnodes().push_back(tmp);
1023 this->root_->remove_parent();
1027 std::vector<RRTNode *> RRTBase::findt()
1029 return this->findt(this->goal_);
1032 std::vector<RRTNode *> RRTBase::findt(RRTNode *n)
1034 std::vector<RRTNode *> nodes;
1035 if (!n || !n->parent())
1044 int RRTBase::XI(RRTNode *n)
1046 float step = (this->HMAX - this->HMIN) / IXSIZE;
1047 float index = (int) (floor(n->x() - this->HMIN) / step);
1048 if (index < 0) index = 0;
1049 if (index >= IXSIZE) index = IXSIZE - 1;
1053 int RRTBase::YI(RRTNode *n)
1055 float step = (this->VMAX - this->VMIN) / IYSIZE;
1056 float index = (int) (floor(n->y() - this->VMIN) / step);
1057 if (index < 0) index = 0;
1058 if (index >= IYSIZE) index = IYSIZE - 1;
1063 void RRTBase::defaultSamplingInfo()
1065 float hcenter = (this->HMAX - this->HMIN) / 2 + this->HMIN;
1066 float hrange = (this->HMAX - this->HMIN) / 2;
1067 float vcenter = (this->VMAX - this->VMIN) / 2 + this->VMIN;
1068 float vrange = (this->VMAX - this->VMIN) / 2;
1069 this->ndx_ = std::normal_distribution<float>(hcenter, hrange);
1070 this->ndy_ = std::normal_distribution<float>(vcenter, vrange);
1071 this->ndh_ = std::normal_distribution<float>(0, 2 * M_PI);
1074 void RRTBase::setSamplingInfo(SamplingInfo si)
1076 this->ndx_ = std::normal_distribution<float>(si.x0, si.x);
1077 this->ndy_ = std::normal_distribution<float>(si.y0, si.y);
1078 this->ndh_ = std::normal_distribution<float>(si.h0, si.h);
1081 RRTNode *RRTBase::sample()
1083 float x = this->ndx_(this->gen_);
1084 float y = this->ndy_(this->gen_);
1085 float h = this->ndh_(this->gen_);
1086 return new RRTNode(x, y, h);
1089 float RRTBase::cost(RRTNode *init, RRTNode *goal)
1091 return co2(init, goal);
1094 RRTNode *RRTBase::nn(RRTNode *rs)
1096 int iy = this->YI(rs);
1097 float iy_step = (this->VMAX - this->VMIN) / IYSIZE;
1101 unsigned int i = 0; // vector step
1102 unsigned int j = 0; // array step
1104 while (nn.mc > j * iy_step) {
1105 iyj = (int) (iy + j);
1108 #pragma omp parallel for reduction(minn: nn)
1109 for (i = 0; i < this->iy_[iyj].size(); i++) {
1110 if (EDIST(this->iy_[iyj][i], rs) < nn.mc) {
1111 nn.mc = EDIST(this->iy_[iyj][i], rs);
1112 nn.nn = this->iy_[iyj][i];
1116 iyj = (int) (iy - j);
1119 #pragma omp parallel for reduction(minn: nn)
1120 for (i = 0; i < this->iy_[iyj].size(); i++) {
1121 if (EDIST(this->iy_[iyj][i], rs) < nn.mc) {
1122 nn.mc = EDIST(this->iy_[iyj][i], rs);
1123 nn.nn = this->iy_[iyj][i];
1132 std::vector<RRTNode *> RRTBase::nv(RRTNode *node, float dist)
1134 std::vector<RRTNode *> nvs;
1135 unsigned int iy = this->YI(node);
1136 float iy_step = (this->VMAX - this->VMIN) / IYSIZE;
1137 unsigned int iy_dist = floor(dist / iy_step) + 1;
1138 unsigned int i = 0; // vector index
1139 unsigned int j = 0; // array index
1140 unsigned int jmin = 0; // minimal j index
1141 unsigned int jmax = 0; // maximal j index
1142 jmin = iy - iy_dist;
1143 jmin = (jmin > 0) ? jmin : 0;
1144 jmax = iy + iy_dist + 1;
1145 jmax = (jmax < IYSIZE) ? jmax : IYSIZE;
1146 #pragma omp parallel for reduction(merge: nvs)
1147 for (j = jmin; j < jmax; j++) {
1148 #pragma omp parallel for reduction(merge: nvs)
1149 for (i = 0; i < this->iy_[j].size(); i++) {
1150 if (this->cost(this->iy_[j][i], node) < dist) {
1151 nvs.push_back(this->iy_[j][i]);
1158 std::vector<RRTNode *> RRTBase::steer(RRTNode *init, RRTNode *goal)
1160 return st3(init, goal);
1163 std::vector<RRTNode *> RRTBase::steer(RRTNode *init, RRTNode *goal, float step)
1165 return st3(init, goal, step);