From: Mark M. <mm...@ri...> - 2020-06-11 19:09:52
|
Hadar, If you don’t need the retrieve/repair capability of Thunder, then you can just use regular PRM as your planner. When you are constructing the planner instance, you can pass in a PlannerData object containing a roadmap/tree from a previous planning attempt. The PlannerData can be stored on disk using the PlannerDataStorage class. Also, if you repeatedly call PRM::solve without calling clear, it will also reuse the previous constructed roadmap. Best, Mark > On Jun 11, 2020, at 4:00 AM, hadar sinvani <had...@gm...> wrote: > > Hi, > > How can I save the PRM RoadMap graph, load it again in an attempt of solving a new query? > > I would like to use the constructed road map, find a path from scratch without using retrieve-repair module and past solutions. > > I tried to use the Thunder framework: > > ot::Thunder expPlanner(setup.getSpaceInformation()); > expPlanner.setFilePath("thunder.db"); > > //attempt to solve the problem > if (setup.solve(20)) > { > ... > } > expPlanner.doPostProcessing(); > (setup.getPlanner()->as<og::PRM>())->clearQuery(); > > // create new start and goal > ob::ScopedState<> start(setup.getStateSpace()); > start[0]=... > start[1]=... > ob::ScopedState<> goal(setup.getStateSpace()); > goal[0]=... > goal[1]=... > > expPlanner.setStartAndGoalStates(start, goal); > expPlanner.setPlanner(std::make_shared<og::PRM>(setup.getSpaceInformation())); > //plan from SCRATCH and disable using previous plan > expPlanner.enablePlanningFromRecall(false); > expPlanner.solve(5); > > > > As can be seen, I disabled PlanningFromRecal but when running the program, RRTconnect is still being used. Is there anything missing in my program? > > Also, is it possible to save prm graph (to a file maybe...), load it again in a different program and use it to solve a new query? > > Best, Hadar. > > > > > > _______________________________________________ > ompl-users mailing list > omp...@li... > https://lists.sourceforge.net/lists/listinfo/ompl-users |