Loading...
Searching...
No Matches
Lightning.cpp
44ompl::tools::Lightning::Lightning(const base::SpaceInformationPtr &si) : ompl::tools::ExperienceSetup(si)
49ompl::tools::Lightning::Lightning(const base::StateSpacePtr &space) : ompl::tools::ExperienceSetup(space)
114 throw Exception("Both planning from scratch and experience have been disabled, unable to plan");
155// we provide a duplicate implementation here to allow the planner to choose how the time is turned into a planner
157ompl::base::PlannerStatus ompl::tools::Lightning::solve(const base::PlannerTerminationCondition &ptc)
197 OMPL_ERROR("Lightning Solve: Unknown failure, planner status: %s", lastStatus_.asString().c_str());
213 OMPL_INFORM("Solution path has %d states and was generated from planner %s", solutionPath.getStateCount(),
258 ob::PlannerDataPtr chosenRecallPathData = getLightningRetrieveRepairPlanner().getChosenRecallPath();
270 OMPL_INFORM("NOT saving to database because best solution was from database and is too similar "
431void ompl::tools::Lightning::getAllPlannerDatas(std::vector<ob::PlannerDataPtr> &plannerDatas) const
436void ompl::tools::Lightning::convertPlannerData(const ob::PlannerDataPtr &plannerData, og::PathGeometric &path)
443bool ompl::tools::Lightning::reversePathIfNecessary(og::PathGeometric &path1, og::PathGeometric &path2)
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition PlannerTerminationCondition.h:64
std::size_t getStateCount() const
Get the number of states (way-points) that make up this path.
Definition PathGeometric.h:255
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition PathGeometric.h:243
Create the set of classes typically needed to solve a geometric problem.
Definition ExperienceSetup.h:57
std::size_t getExperiencesCount() const override
Get the total number of paths stored in the database.
Definition Lightning.cpp:426
void clear() override
Clear all planning data. This only includes data generated by motion plan computation....
Definition Lightning.cpp:141
void printLogs(std::ostream &out=std::cout) const override
Display debug data about overall results from Lightning since being loaded.
Definition Lightning.cpp:403
bool saveIfChanged() override
Save the experience database to file if there has been a change.
Definition Lightning.cpp:362
void getAllPlannerDatas(std::vector< ompl::base::PlannerDataPtr > &plannerDatas) const override
Get a vector of all the planning data in the database.
Definition Lightning.cpp:431
void printResultsInfo(std::ostream &out=std::cout) const override
Display debug data about potential available solutions.
Definition Lightning.cpp:372
bool reversePathIfNecessary(ompl::geometric::PathGeometric &path1, ompl::geometric::PathGeometric &path2)
If path1 and path2 have a better start/goal match when reverse, then reverse path2.
Definition Lightning.cpp:443
void setup() override
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition Lightning.cpp:68
void convertPlannerData(const ompl::base::PlannerDataPtr &plannerData, ompl::geometric::PathGeometric &path)
Convert PlannerData to PathGeometric. Assume ordering of verticies is order of path.
Definition Lightning.cpp:436
base::PlannerStatus solve(double time=1.0) override
Run the planner for up to a specified amount of time (default is 1 second)
Definition Lightning.cpp:346
void print(std::ostream &out=std::cout) const override
Print information about the current setup.
Definition Lightning.cpp:382
Lightning(const base::SpaceInformationPtr &si)
Constructor needs the state space used for planning.
Definition Lightning.cpp:44
static base::PlannerPtr getDefaultPlanner(const base::GoalPtr &goal)
Given a goal specification, decide on a planner for that goal.
Definition SelfConfig.cpp:243
This namespace contains sampling based planning routines shared by both planning under geometric cons...
Definition ConstrainedSpaceInformation.h:55
PlannerTerminationCondition timedPlannerTerminationCondition(double duration)
Return a termination condition that will become true duration seconds in the future (wall-time)
Definition PlannerTerminationCondition.cpp:215
This namespace contains code that is specific to planning under geometric constraints.
Definition GeneticSearch.h:48
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Definition Time.h:64
Includes various tools such as self config, benchmarking, etc.
Definition LightningRetrieveRepair.h:48
A class to store the exit status of Planner::solve()
Definition PlannerStatus.h:49
Single entry for the csv data logging file.
Definition ExperienceSetup.h:102