]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blob - incl/rrtplanner.h
Add RRT testing planner `T1`
[hubacji1/iamcar.git] / incl / rrtplanner.h
1 /*
2 This file is part of I am car.
3
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.
8
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.
13
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/>.
16 */
17
18 #ifndef RRTPLANNER_H
19 #define RRTPLANNER_H
20
21 #include <vector>
22 #include "rrtbase.h"
23 #include "rrtnode.h"
24
25 class LaValle1998: public RRTBase {
26         public:
27                 //using RRTBase::RRTBase;
28                 LaValle1998(RRTNode *init, RRTNode *goal);
29
30                 // RRT framework
31                 RRTNode *(*nn)(
32                                 RRTNode *root,
33                                 RRTNode *node,
34                                 float (*cost)(RRTNode *, RRTNode *));
35                 RRTNode *(*sample)();
36                 std::vector<RRTNode *> (*steer)(
37                                 RRTNode *init,
38                                 RRTNode *goal);
39                 float (*cost)(RRTNode *init, RRTNode *goal);
40                 bool next();
41 };
42
43 class Kuwata2008: public RRTBase {
44         public:
45                 Kuwata2008(RRTNode *init, RRTNode *goal);
46
47                 // RRT framework
48                 RRTNode *(*nn)(
49                                 RRTNode *root,
50                                 RRTNode *node,
51                                 float (*cost)(RRTNode *, RRTNode *));
52                 RRTNode *(*sample)();
53                 std::vector<RRTNode *> (*steer)(
54                                 RRTNode *init,
55                                 RRTNode *goal);
56                 float (*cost)(RRTNode *init, RRTNode *goal);
57                 bool next();
58 };
59
60 class Karaman2011: public RRTBase {
61         public:
62                 Karaman2011(RRTNode *init, RRTNode *goal);
63
64                 // RRT framework
65                 RRTNode *(*nn)(
66                                 RRTNode *root,
67                                 RRTNode *node,
68                                 float (*cost)(RRTNode *, RRTNode *));
69                 std::vector<RRTNode *> (*nv)(
70                                 RRTNode *root,
71                                 RRTNode *node,
72                                 float (*cost)(RRTNode *, RRTNode *),
73                                 float dist);
74                 RRTNode *(*sample)();
75                 std::vector<RRTNode *> (*steer)(
76                                 RRTNode *init,
77                                 RRTNode *goal);
78                 float (*cost)(RRTNode *init, RRTNode *goal);
79                 bool next();
80 };
81
82 class T1: public RRTBase {
83         public:
84                 T1(RRTNode *init, RRTNode *goal);
85
86                 // RRT framework
87                 RRTNode *(*nn)(
88                                 RRTNode *root,
89                                 RRTNode *node,
90                                 float (*cost)(RRTNode *, RRTNode *));
91                 std::vector<RRTNode *> (*nv)(
92                                 RRTNode *root,
93                                 RRTNode *node,
94                                 float (*cost)(RRTNode *, RRTNode *),
95                                 float dist);
96                 RRTNode *(*sample)();
97                 std::vector<RRTNode *> (*steer)(
98                                 RRTNode *init,
99                                 RRTNode *goal);
100                 float (*cost)(RRTNode *init, RRTNode *goal);
101                 bool next();
102 };
103
104 #endif