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/>.
39 float r; // max radi from [x, y] for random sample
40 float mr; // minimum r added to random r
41 float h; // max angle for random sample
42 float mh; // max angle for heading of random sample
43 float mmh; // minimum mh added to mh
44 float sh; // slot heading
45 float dh; // direction to compute random heading from slot heading
51 std::vector<std::vector<RRTNode *>> cusp_;
52 PolygonObstacle slot_;
60 std::vector<std::vector<RRTNode *>> &cusp();
62 PolygonObstacle &slot();
72 /** BFS to _Find Init Pose_. */
74 std::vector<CircleObstacle>& co,
75 std::vector<SegmentObstacle>& so
77 /** _Find Last Not Colliding_ BicycleCar pose
83 std::vector<CircleObstacle>& co,
84 std::vector<SegmentObstacle>& so
86 /** _Find Init Pose by Reverse_ approach, see Vorobieva2015
88 @param B Last pose of vehicle when it is parked.
90 void fipr(RRTNode *n);
91 void fipr(BicycleCar *B);
92 /** _Find Last Not Colliding for Reverse_ BicycleCar pose
96 BicycleCar *flncr(BicycleCar *B);
97 RRTNode *fposecenter();
98 /** Recursive function to find out the moves */
103 std::vector<RRTNode *> &cusp
105 /** Test possible init poses */
107 /** Return start pose for fip method */
109 /** Return center of rotation for start pose for fip method */
110 BicycleCar *getEPC();
111 /** Return start pose for fipr method */
113 /** Return true if car is inside slot */
114 bool isInside(BicycleCar *c);
115 /** Return values to set sampling function of RRT */
116 struct SamplingInfo getSamplingInfo();