]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blob - incl/slotplanner.h
Fix flast, fpose of ParallelParking
[hubacji1/iamcar.git] / incl / slotplanner.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 SLOTPLANNER_H
19 #define SLOTPLANNER_H
20
21 #include <vector>
22 #include "obstacle.h"
23
24 class ParallelSlot {
25         private:
26                 float DH_ = 0.01;
27                 std::vector<std::vector<RRTNode *>> cusp_;
28                 PolygonObstacle slot_;
29         public:
30                 ParallelSlot();
31
32                 // getter
33                 std::vector<std::vector<RRTNode *>> &cusp();
34                 float DH() const;
35                 PolygonObstacle &slot();
36
37                 // setter
38                 void DH(float dh);
39
40                 // other
41                 RRTNode *fposecenter();
42                 /** Recursive function to find out the moves */
43                 bool flast(
44                         RRTNode *P,
45                         bool right,
46                         int il,
47                         std::vector<RRTNode *> &cusp
48                 );
49                 /** Test possible init poses */
50                 void fpose();
51 };
52
53 #endif