All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Lightning.cpp
100 planner_ = tools::SelfConfig::getDefaultPlanner(pdef_->getGoal()); // we could use the repairProblemDef_ here but that isn't setup yet
119 throw Exception("Both planning from scratch and experience have been disabled, unable to plan");
161 // we provide a duplicate implementation here to allow the planner to choose how the time is turned into a planner termination condition
162 ompl::base::PlannerStatus ompl::tools::Lightning::solve(const base::PlannerTerminationCondition &ptc)
202 OMPL_ERROR("Lightning Solve: Unknown failure, planner status: %s", lastStatus_.asString().c_str());
218 OMPL_INFORM("Solution path has %d states and was generated from planner %s", solutionPath.getStateCount(), getSolutionPlannerName().c_str());
262 ob::PlannerDataPtr chosenRecallPathData = getLightningRetrieveRepairPlanner().getChosenRecallPath();
274 OMPL_INFORM("NOT saving to database because best solution was from database and is too similar (score %f)", score);
282 OMPL_INFORM("Adding path to database because repaired path is different enough from original recalled path (score %f)", score);
409 out << " Solved from scratch: " << stats_.numSolutionsFromScratch_ << " (" << stats_.numSolutionsFromScratch_/stats_.numProblems_*100.0 << "%)" << std::endl;
410 out << " Solved from recall: " << stats_.numSolutionsFromRecall_ << " (" << stats_.numSolutionsFromRecall_/stats_.numProblems_*100.0 << "%)" << std::endl;
412 out << " That were discarded: " << stats_.numSolutionsFromRecall_ - stats_.numSolutionsFromRecallSaved_ << std::endl;
430 void ompl::tools::Lightning::getAllPlannerDatas(std::vector<ob::PlannerDataPtr> &plannerDatas) const
435 void ompl::tools::Lightning::convertPlannerData(const ob::PlannerDataPtr plannerData, og::PathGeometric &path)
442 bool ompl::tools::Lightning::reversePathIfNecessary(og::PathGeometric &path1, og::PathGeometric &path2)
This is a utility that allows executing multiple planners in parallel, until one or more find a solut...
Definition: ParallelPlan.h:66
Single entry for the csv data logging file.
Definition: ExperienceSetup.h:116
void log(const char *file, int line, LogLevel level, const char *m,...)
Root level logging function. This should not be invoked directly, but rather used via a logging macro...
Definition: Console.cpp:120
The planner failed to find a solution.
Definition: PlannerStatus.h:62
A shared pointer wrapper for ompl::base::StateSpace.
bool saveIfChanged()
Save the experience database to file if there has been a change.
Definition: Lightning.cpp:362
virtual void print(std::ostream &out=std::cout) const
Print information about the current setup.
Definition: Lightning.cpp:384
virtual void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: Lightning.cpp:74
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:66
void getAllPlannerDatas(std::vector< ompl::base::PlannerDataPtr > &plannerDatas) const
Get a vector of all the planning data in the database.
Definition: Lightning.cpp:430
void printResultsInfo(std::ostream &out=std::cout) const
Display debug data about potential available solutions.
Definition: Lightning.cpp:372
std::size_t getExperiencesCount() const
Get the total number of paths stored in the database.
Definition: Lightning.cpp:425
void append(const base::State *state)
Append state to the end of this path. The memory for state is copied.
Definition: PathGeometric.cpp:436
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathGeometric.h:225
std::size_t getStateCount() const
Get the number of states (way-points) that make up this path.
Definition: PathGeometric.h:237
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:442
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Definition: Time.h:78
A shared pointer wrapper for ompl::base::Planner.
Definition: DynamicTimeWarp.h:61
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:435
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:48
A shared pointer wrapper for ompl::base::SpaceInformation.
The Lightning Framework's Retrieve-Repair component.
Definition: LightningRetrieveRepair.h:77
static base::PlannerPtr getDefaultPlanner(const base::GoalPtr &goal)
Given a goal specification, decide on a planner for that goal.
Definition: SelfConfig.cpp:248
virtual void clear()
Clear all planning data. This only includes data generated by motion plan computation. Planner settings, start & goal states are not affected.
Definition: Lightning.cpp:147
void printLogs(std::ostream &out=std::cout) const
Display debug data about overall results from Lightning since being loaded.
Definition: Lightning.cpp:405
virtual base::PlannerStatus solve(double time=1.0)
Run the planner for up to a specified amount of time (default is 1 second)
Definition: Lightning.cpp:346
A shared pointer wrapper for ompl::base::PlannerData.
Lightning(const base::SpaceInformationPtr &si)
Constructor needs the state space used for planning.
Definition: Lightning.cpp:45
Create the set of classes typically needed to solve a geometric problem.
Definition: ExperienceSetup.h:58