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/>.
27 class LaValle1998: public RRTBase {
29 //using RRTBase::RRTBase;
30 LaValle1998(RRTNode *init, RRTNode *goal);
35 std::vector<RRTNode *> (&nodes)[IYSIZE],
37 std::vector<RRTNode *> &nodes,
40 float (*cost)(RRTNode *, RRTNode *)
46 std::vector<RRTNode *> (*steer)(
49 float (*cost)(RRTNode *init, RRTNode *goal);
53 class Kuwata2008: public RRTBase {
55 Kuwata2008(RRTNode *init, RRTNode *goal);
60 std::vector<RRTNode *> (&nodes)[IYSIZE],
62 std::vector<RRTNode *> &nodes,
65 float (*cost)(RRTNode *, RRTNode *)
71 std::vector<RRTNode *> (*steer)(
74 float (*cost)(RRTNode *init, RRTNode *goal);
78 class Karaman2011: public RRTBase {
83 std::vector<RRTNode *> nvs);
84 bool rewire(std::vector<RRTNode *> nvs, RRTNode *ns);
86 Karaman2011(RRTNode *init, RRTNode *goal);
91 std::vector<RRTNode *> (&nodes)[IYSIZE],
93 std::vector<RRTNode *> &nodes,
96 float (*cost)(RRTNode *, RRTNode *)
101 std::vector<RRTNode *> (*nv)(
103 std::vector<RRTNode *> (&nodes)[IYSIZE],
108 float (*cost)(RRTNode *, RRTNode *),
114 RRTNode *(*sample)();
115 std::vector<RRTNode *> (*steer)(
118 float (*cost)(RRTNode *init, RRTNode *goal);
122 class T1: public RRTBase {
124 T1(RRTNode *init, RRTNode *goal);
129 std::vector<RRTNode *> (&nodes)[IYSIZE],
131 std::vector<RRTNode *> &nodes,
134 float (*cost)(RRTNode *, RRTNode *)
139 std::vector<RRTNode *> (*nv)(
141 std::vector<RRTNode *> (&nodes)[IYSIZE],
146 float (*cost)(RRTNode *, RRTNode *),
152 RRTNode *(*sample)();
153 std::vector<RRTNode *> (*steer)(
156 float (*cost)(RRTNode *init, RRTNode *goal);
160 class T2: public Karaman2011 {
162 using Karaman2011::Karaman2011;
168 class T3: public RRTBase {
173 T3(RRTNode *init, RRTNode *goal);
176 std::vector<CircleObstacle> *cobstacles,
177 std::vector<SegmentObstacle> *sobstacles);
178 bool connecttrees(RRTNode *rn, RRTNode *gn);
179 bool overlaptrees(RRTNode **ron, RRTNode **gon);
182 class Klemm2015: public Karaman2011 {
184 RRTNode *orig_root_ = nullptr;
185 RRTNode *orig_goal_ = nullptr;
191 Klemm2015(RRTNode *init, RRTNode *goal);
196 std::vector<RRTNode *> (&nodes)[IYSIZE],
198 std::vector<RRTNode *> &nodes,
201 float (*cost)(RRTNode *, RRTNode *)
206 std::vector<RRTNode *> (*nv)(
208 std::vector<RRTNode *> (&nodes)[IYSIZE],
213 float (*cost)(RRTNode *, RRTNode *),
219 RRTNode *(*sample)();
220 std::vector<RRTNode *> (*steer)(
223 float (*cost)(RRTNode *init, RRTNode *goal);