All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
LightningDB.cpp
56 nn_->setDistanceFunction(std::bind(&ompl::tools::LightningDB::distanceFunction, this, std::placeholders::_1, std::placeholders::_2));
122 void ompl::tools::LightningDB::addPath(ompl::geometric::PathGeometric& solutionPath, double &insertionTime)
145 // Deep copy the states in the vertices so that when the planner goes out of scope, all data remains intact
209 void ompl::tools::LightningDB::getAllPlannerDatas(std::vector<ompl::base::PlannerDataPtr> &plannerDatas) const
222 // Fill in our pre-made PlannerData instance with the new start and goal states to be searched for
241 double ompl::tools::LightningDB::distanceFunction(const ompl::base::PlannerDataPtr a, const ompl::base::PlannerDataPtr b) const
247 si_->distance(a->getVertex(a->numVertices()-1).getState(), b->getVertex(b->numVertices()-1).getState()),
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
Definition: PlannerData.h:163
std::size_t getExperiencesCount() const
Get the total number of paths stored in the database.
Definition: LightningDB.cpp:253
A shared pointer wrapper for ompl::base::StateSpace.
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
A nearest neighbors datastructure that uses linear search. The linear search is done over sqrt(n) ele...
Definition: NearestNeighborsSqrtApprox.h:57
void addPath(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: LightningDB.cpp:122
LightningDB(const base::StateSpacePtr &space)
Constructor needs the state space used for planning.
Definition: LightningDB.cpp:47
std::vector< base::State * > & getStates()
Get the states that make up the path (as a reference, so it can be modified, hence the function is no...
Definition: PathGeometric.h:219
std::vector< ompl::base::PlannerDataPtr > findNearestStartGoal(int nearestK, const base::State *start, const base::State *goal)
Find the k nearest paths to our queries one.
Definition: LightningDB.cpp:219
The base class for space information. This contains all the information about the space planning is d...
Definition: SpaceInformation.h:83
std::size_t getStatesCount() const
Get the total number of states stored in the database, across all paths.
Definition: LightningDB.cpp:258
void getAllPlannerDatas(std::vector< ompl::base::PlannerDataPtr > &plannerDatas) const
Get a vector of all the paths in the nearest neighbor tree.
Definition: LightningDB.cpp:209
bool saveIfChanged(const std::string &fileName)
Save loaded database to file, except skips saving if no paths have been added.
Definition: LightningDB.cpp:154
A shared pointer wrapper for ompl::base::PlannerData.