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/>.
25 #define EDIST(a, b) ({ __typeof__ (a) _a = (a); \
26 __typeof__ (b) _b = (b); \
27 pow(pow((_b)->x() - (_a)->x(), 2) + \
28 pow((_b)->y() - (_a)->y(), 2), 0.5); })
50 std::vector<std::vector<RRTNode *>> cusp_;
51 PolygonObstacle slot_;
58 std::vector<std::vector<RRTNode *>> &cusp();
60 PolygonObstacle &slot();
69 /** BFS to _Find Init Pose_. */
71 /** _Find Init Pose by Reverse_ approach, see Vorobieva2015
73 @param B Last pose of vehicle when it is parked.
75 void fipr(BicycleCar *B);
76 /** _Find Last Not Colliding for Reverse_ BicycleCar pose
80 BicycleCar *flncr(BicycleCar *B);
81 /** _Find Last Not Colliding_ BicycleCar pose
85 BicycleCar *flnc(BicycleCar *B);
86 RRTNode *fposecenter();
87 /** Recursive function to find out the moves */
92 std::vector<RRTNode *> &cusp
94 /** Test possible init poses */
96 /** Return values to set sampling function of RRT */
97 struct SamplingInfo getSamplingInfo();