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/>.
19 #include "iamcar/Park.h"
20 #include "obstacle_msgs/Obstacles.h"
24 #include "rrtplanner.h"
25 #include "slotplanner.h"
28 //#define USE_SLOTPLANNER
31 iamcar::Park::Request &req,
32 iamcar::Park::Response &res
36 new RRTNode(), // TODO get req.init, req.goal
42 ParallelSlot ps = ParallelSlot();
43 ps.slot().add_bnode(new RRTNode()); // TODO req.slot
45 p.samplingInfo_ = ps.getSamplingInfo();
46 if (pi.x == pg.x && pi.y == pi.y && ps.slot().bnodes().size() > 0) {
50 if (ps.cusp().size() > 0) {
51 p.goal(ps.cusp().front().front());
52 p.slot_cusp(ps.cusp().front());
56 while (!p.goal_found() && p.elapsed() < TMAX) {
60 if (ps.cusp().size() > 0)
61 p.tlog(p.findt(p.slot_cusp().back()));
70 int main(int argc, char **argv)
72 ros::init(argc, argv, "iamcar");
74 ros::ServiceServer park_srv = nh.advertiseService("park", park);