ThunderDB.cpp
112 OMPL_INFORM("ThunderDB: Loaded planner data with \n %d vertices\n %d edges\n %d start states\n %d goal states",
113 plannerData->numVertices(), plannerData->numEdges(), plannerData->numStartVertices(), plannerData->numGoalVertices());
130 bool ompl::tools::ThunderDB::addPath(ompl::geometric::PathGeometric& solutionPath, double &insertionTime)
149 ompl::base::PlannerTerminationCondition ptc = ompl::base::timedPlannerTerminationCondition( seconds, 0.1 );
210 OMPL_INFORM("Get planner data from SPARS2 with \n %d vertices\n %d edges\n %d start states\n %d goal states",
224 OMPL_INFORM("Saving experience %d with %d verticies and %d edges", i, pd.numVertices(), pd.numEdges());
244 OMPL_INFORM("Saved database to file in %f sec with %d planner datas", loadTime, plannerDatas.size());
264 void ompl::tools::ThunderDB::getAllPlannerDatas(std::vector<ompl::base::PlannerDataPtr> &plannerDatas) const
276 //OMPL_DEBUG("ThunderDB::getAllPlannerDatas: Number of planner databases found: %d", plannerDatas.size());
279 bool ompl::tools::ThunderDB::findNearestStartGoal(int nearestK, const base::State* start, const base::State* goal,
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
Definition: PlannerData.h:163
A shared pointer wrapper for ompl::base::StateSpace.
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:66
Struct for passing around partially solved solutions.
Definition: SPARSdb.h:240
bool findNearestStartGoal(int nearestK, const base::State *start, const base::State *goal, ompl::geometric::SPARSdb::CandidateSolution &candidateSolution, const base::PlannerTerminationCondition &ptc)
Find the k nearest paths to our queries one.
Definition: ThunderDB.cpp:279
virtual void load(const char *filename, PlannerData &pd)
Load the PlannerData structure from the given stream. The StateSpace that was used to store the data ...
Definition: PlannerDataStorage.cpp:91
Base class for a vertex in the PlannerData structure. All derived classes must implement the clone an...
Definition: PlannerData.h:59
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Definition: Time.h:78
PlannerTerminationCondition timedPlannerTerminationCondition(double duration)
Return a termination condition that will become true duration seconds in the future (wall-time) ...
Definition: PlannerTerminationCondition.cpp:222
bool addPath(ompl::geometric::PathGeometric &solutionPath, double &insertionTime)
Add a new solution path to our database. Des not actually save to file so experience will be lost if ...
Definition: ThunderDB.cpp:130
void getAllPlannerDatas(std::vector< ompl::base::PlannerDataPtr > &plannerDatas) const
Get a vector of all the planner datas in the database.
Definition: ThunderDB.cpp:264
unsigned int numEdges() const
Retrieve the number of edges in this structure.
Definition: PlannerData.cpp:203
unsigned int numVertices() const
Retrieve the number of vertices in this structure.
Definition: PlannerData.cpp:198
ompl::base::PlannerDataStorage plannerDataStorage_
Helper class for storing each plannerData instance.
Definition: ThunderDB.h:166
const PlannerDataVertex & getVertex(unsigned int index) const
Retrieve a reference to the vertex object with the given index. If this vertex does not exist...
Definition: PlannerData.cpp:208
The base class for space information. This contains all the information about the space planning is d...
Definition: SpaceInformation.h:83
ThunderDB(const base::StateSpacePtr &space)
Constructor needs the state space used for planning.
Definition: ThunderDB.cpp:48
void setSPARSdb(ompl::tools::SPARSdbPtr &prm)
Create the database structure for saving experiences.
Definition: ThunderDB.cpp:251
void debugVertex(const ompl::base::PlannerDataVertex &vertex)
Print info to screen.
Definition: ThunderDB.cpp:297
bool saveIfChanged(const std::string &fileName)
Save loaded database to file, except skips saving if no paths have been added.
Definition: ThunderDB.cpp:166
std::shared_ptr< ompl::geometric::SPARSdb > SPARSdbPtr
Definition: ThunderDB.h:65
virtual const State * getState() const
Retrieve the state associated with this vertex.
Definition: PlannerData.h:73
A shared pointer wrapper for ompl::base::PlannerData.
virtual void store(const PlannerData &pd, const char *filename)
Store (serialize) the PlannerData structure to the given filename.
Definition: PlannerDataStorage.cpp:50