Class ExperienceSetup
Defined in File ExperienceSetup.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ompl::geometric::SimpleSetup
(Class SimpleSetup)
Derived Types
public ompl::tools::Lightning
(Class Lightning)public ompl::tools::Thunder
(Class Thunder)
Class Documentation
-
class ExperienceSetup : public ompl::geometric::SimpleSetup
Create the set of classes typically needed to solve a geometric problem.
Subclassed by ompl::tools::Lightning, ompl::tools::Thunder
Public Functions
-
explicit ExperienceSetup(const base::SpaceInformationPtr &si)
Constructor needs the state space used for planning.
-
explicit ExperienceSetup(const base::StateSpacePtr &space)
Constructor needs the state space used for planning.
-
void logInitialize()
Load the header (first row) of the csv file.
-
void convertLogToString(const ExperienceLog &log)
Move data to string format and put in buffer.
-
virtual void printResultsInfo(std::ostream &out = std::cout) const = 0
Display debug data about potential available solutions.
-
virtual void printLogs(std::ostream &out = std::cout) const = 0
Display debug data about overall results since being loaded.
-
virtual void saveDataLog(std::ostream &out = std::cout)
Save debug data about overall results since being loaded.
-
virtual void setRepairPlanner(const base::PlannerPtr &planner) = 0
Set the planner to use for repairing experience paths inside the RetrieveRepair planner. If the planner is not set, a default planner is set.
-
virtual bool save() = 0
Save the experience database to file.
-
virtual bool saveIfChanged() = 0
Save the experience database to file if there has been a change.
-
void enablePlanningFromRecall(bool enable)
Optionally disable the ability to use previous plans in solutions (but will still save them)
-
void enablePlanningFromScratch(bool enable)
Optionally disable the ability to plan from scratch Note: Lightning can still save modified experiences if they are different enough.
-
virtual void getAllPlannerDatas(std::vector<ompl::base::PlannerDataPtr> &plannerDatas) const = 0
Get a vector of all the planning data in the database.
-
virtual std::size_t getExperiencesCount() const = 0
Get the total number of paths stored in the database.
-
virtual const std::string &getFilePath() const
After setFile() is called, access the generated file path for loading and saving the experience database.
-
virtual bool setFilePath(const std::string &filePath)
Set the database file to load. Actual loading occurs when setup() is called.
- Parameters:
filePath – - full absolute path to a experience database to load
-
inline const ExperienceStats &getStats() const
Getter for logging data.
-
inline virtual bool doPostProcessing()
Allow accumlated experiences to be processed.
Protected Attributes
-
bool recallEnabled_ = {true}
Flag indicating whether recalled plans should be used to find solutions. Enabled by default.
-
bool scratchEnabled_ = {true}
Flag indicating whether planning from scratch should be used to find solutions. Enabled by default.
-
std::string filePath_
File location of database.
-
std::stringstream csvDataLogStream_
-
ExperienceStats stats_
States data for display to console
-
struct ExperienceLog
Single entry for the csv data logging file.
Public Functions
-
ExperienceLog() = default
Public Members
-
double planning_time = {0.0}
-
double insertion_time = {0.0}
-
std::string planner = {"NA"}
-
std::string result = {"NA"}
-
std::string is_saved = {"NA"}
-
bool approximate = {false}
-
bool too_short = {false}
-
bool insertion_failed = {false}
-
double score = {0.0}
-
std::size_t num_vertices = {0}
-
std::size_t num_edges = {0}
-
std::size_t num_connected_components = {0}
-
ExperienceLog() = default
-
struct ExperienceStats
Simple logging functionality encapsled in a struct.
Public Functions
-
ExperienceStats() = default
-
inline double getAveragePlanningTime() const
-
inline double getAverageInsertionTime() const
Public Members
-
double numSolutionsFromRecall_ = {0.}
-
double numSolutionsFromRecallSaved_ = {0.}
-
double numSolutionsFromScratch_ = {0.}
-
double numSolutionsFailed_ = {0.}
-
double numSolutionsTimedout_ = {0.}
-
double numSolutionsApproximate_ = {0.}
-
double numSolutionsTooShort_ = {0.}
-
double numProblems_ = {0.}
-
double totalPlanningTime_ = {0.}
-
double totalInsertionTime_ = {0.}
-
ExperienceStats() = default
-
explicit ExperienceSetup(const base::SpaceInformationPtr &si)