13 #include <ompl/control/planners/est/EST.h>
14 #include <ompl/control/planners/kpiece/KPIECE1.h>
15 #include <ompl/control/planners/pdst/PDST.h>
16 #include <ompl/control/planners/rrt/RRT.h>
17 #include <ompl/tools/benchmark/Benchmark.h>
18 #include <omplapp/apps/DynamicCarPlanning.h>
19 #include <omplapp/config.h>
26 base::StateSpacePtr stateSpace(setup.getStateSpace());
36 start[0] = start[1] = start[2] = start[3] = start[4] = 0.;
40 goal[0] = goal[1] = 8.;
42 goal[3] = goal[4] = 0.;
45 setup.setStartAndGoalStates(start, goal, .5);
52 std::vector<double> cs(2);
55 setup.getStateSpace()->getDefaultProjection()->setCellSizes(cs);
60 std::cout <<
"\n\n***** Planning for a " << setup.getName() <<
" *****\n" << std::endl;
69 path.printAsMatrix(std::cout);
70 if (!setup.haveExactSolutionPath())
72 std::cout <<
"Solution is approximate. Distance to actual goal is "
73 << setup.getProblemDefinition()->getSolutionDifference() << std::endl;
84 b.addPlanner(std::make_shared<control::RRT>(setup.getSpaceInformation()));
85 b.addPlanner(std::make_shared<control::KPIECE1>(setup.getSpaceInformation()));
87 b.saveResultsToFile();
90 int main(
int argc,
char ** )
99 dynamicCarBenchmark(car);