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/>.
48 std::vector<std::vector<RRTNode *>> cusp_;
49 std::vector<RRTNode *> goals_;
50 PolygonObstacle slot_;
59 /** Get slot entry point */
60 std::vector<RRTNode *> &goals();
62 std::vector<std::vector<RRTNode *>> &cusp();
64 PolygonObstacle &slot();
75 /** BFS to _Find Init Pose_. */
78 std::vector<CircleObstacle>& co,
79 std::vector<SegmentObstacle>& so
83 std::vector<CircleObstacle>& co,
84 std::vector<SegmentObstacle>& so
85 ); // perpendicular forward parking
86 /** _Find Last Not Colliding_ BicycleCar pose
92 std::vector<CircleObstacle>& co,
93 std::vector<SegmentObstacle>& so
95 /** _Find Init Pose by Reverse_ approach, see Vorobieva2015
97 @param B Last pose of vehicle when it is parked.
99 void fipr(RRTNode *n);
100 void fipr(BicycleCar *B);
101 /** _Find Last Not Colliding for Reverse_ BicycleCar pose
105 BicycleCar *flncr(BicycleCar *B);
106 RRTNode *fposecenter();
107 /** Recursive function to find out the moves */
112 std::vector<RRTNode *> &cusp
114 /** Test possible init poses */
116 /** Return start pose for fip method */
118 /** Return center of rotation for start pose for fip method */
119 BicycleCar *getEPC();
120 /** Return start pose for fipr method */
122 BicycleCar *getFPf(); // parked forward, only for perpendicular
123 /** In slot perpendicular pose getter
125 This method returns a pose of perpendicular parking slot from
126 where it is possible to get out of the slot with full steer to
127 farther corner side (i.e. right corner for the RIGHT side).
129 @param B The pose to start from.
131 BicycleCar *getISPP(BicycleCar *B);
132 BicycleCar *getISPPf(BicycleCar *B); // perp. forward parking
133 /** Return true if car is inside slot */
134 bool isInside(BicycleCar *c);
135 /** Return values to set sampling function of RRT */
136 struct SamplingInfo getSamplingInfo();