Benchmark.h
192 Benchmark(geometric::SimpleSetup &setup, const std::string &name = std::string()) : gsetup_(&setup), csetup_(NULL)
198 Benchmark(control::SimpleSetup &setup, const std::string &name = std::string()) : gsetup_(NULL), csetup_(&setup)
231 planners_.push_back(pa(gsetup_ ? gsetup_->getSpaceInformation() : csetup_->getSpaceInformation()));
double maxTime
The maximum allowed time for planner computation during the experiment (seconds)
Definition: Benchmark.h:126
control::SimpleSetup * csetup_
The instance of the problem to benchmark (if planning with controls)
Definition: Benchmark.h:301
std::vector< base::PlannerPtr > planners_
The set of planners to be tested.
Definition: Benchmark.h:304
std::vector< std::string > progressPropertyNames
Definition: Benchmark.h:101
boost::uint32_t seed
The random seed that was used at the start of the benchmark program.
Definition: Benchmark.h:144
const std::string & getExperimentName() const
Get the name of the experiment.
Definition: Benchmark.h:214
double totalDuration
The amount of time spent to collect the information in this structure (seconds)
Definition: Benchmark.h:138
Create the set of classes typically needed to solve a control problem.
Definition: SimpleSetup.h:64
std::vector< PlannerExperiment > planners
The collected experimental data; each element of the array (an experiment) corresponds to a planner...
Definition: Benchmark.h:123
double maxMem
the maximum amount of memory a planner is allowed to use (MB); 4096.0 by default
Definition: Benchmark.h:173
double timeBetweenUpdates
When collecting time-varying data from a planner during its execution, the planner's progress will be...
Definition: Benchmark.h:179
boost::function< void(const base::PlannerPtr &, RunProperties &)> PostSetupEvent
Signature of function that can be called after a planner execution is completed.
Definition: Benchmark.h:88
boost::function< PlannerPtr(const SpaceInformationPtr &)> PlannerAllocator
Definition of a function that can allocate a planner.
Definition: Planner.h:422
bool saveResultsToFile() const
Save the results of the benchmark to a file. The name of the file is the current date and time...
Definition: Benchmark.cpp:251
std::map< std::string, std::string > RunProperties
The data collected from a run of a planner is stored as key-value pairs.
Definition: Benchmark.h:80
const CompleteExperiment & getRecordedExperimentData() const
Return all the experiment data that would be written to the results file. The data should not be chan...
Definition: Benchmark.h:281
void setExperimentName(const std::string &name)
Set the name of the experiment.
Definition: Benchmark.h:208
Benchmark(control::SimpleSetup &setup, const std::string &name=std::string())
Constructor needs the SimpleSetup instance needed for planning. Optionally, the experiment name (name...
Definition: Benchmark.h:198
bool displayProgress
flag indicating whether progress is to be displayed or not; true by default
Definition: Benchmark.h:182
unsigned int runCount
the number of times to run each planner; 100 by default
Definition: Benchmark.h:176
const SpaceInformationPtr & getSpaceInformation() const
Get the current instance of the space information.
Definition: SimpleSetup.h:81
bool saveConsoleOutput
flag indicating whether console output is saved (in an automatically generated filename); true by def...
Definition: Benchmark.h:185
bool useThreads
flag indicating whether planner runs should be run in a separate thread. It is advisable to set this ...
Definition: Benchmark.h:188
void addPlannerAllocator(const base::PlannerAllocator &pa)
Add a planner allocator to use.
Definition: Benchmark.h:229
geometric::SimpleSetup * gsetup_
The instance of the problem to benchmark (if geometric planning)
Definition: Benchmark.h:298
Create the set of classes typically needed to solve a geometric problem.
Definition: SimpleSetup.h:65
Benchmark(geometric::SimpleSetup &setup, const std::string &name=std::string())
Constructor needs the SimpleSetup instance needed for planning. Optionally, the experiment name (name...
Definition: Benchmark.h:192
A boost shared pointer wrapper for ompl::base::Planner.
const Status & getStatus() const
Get the status of the benchmarking code. This function can be called in a separate thread to check ho...
Definition: Benchmark.h:272
std::vector< RunProgressData > runsProgressData
Definition: Benchmark.h:105
double maxTime
the maximum amount of time a planner is allowed to run (seconds); 5.0 by default
Definition: Benchmark.h:170
This structure contains information about the activity of a benchmark instance. If the instance is ru...
Definition: Benchmark.h:56
double maxMem
The maximum allowed memory for planner computation during the experiment (MB)
Definition: Benchmark.h:129
void setPreRunEvent(const PreSetupEvent &event)
Set the event to be called before the run of a planner.
Definition: Benchmark.h:247
PreSetupEvent plannerSwitch_
Event to be called when the evaluated planner is switched.
Definition: Benchmark.h:313
The data collected after running a planner multiple times.
Definition: Benchmark.h:91
const base::SpaceInformationPtr & getSpaceInformation() const
Get the current instance of the space information.
Definition: SimpleSetup.h:82
Request(double maxTime=5.0, double maxMem=4096.0, unsigned int runCount=100, double timeBetweenUpdates=0.05, bool displayProgress=true, bool saveConsoleOutput=true, bool useThreads=true)
Constructor that provides default values for all members.
Definition: Benchmark.h:157
void setPlannerSwitchEvent(const PreSetupEvent &event)
Set the event to be called before any runs of a particular planner (when the planner is switched) ...
Definition: Benchmark.h:241
std::string host
Hostname that identifies the machine the benchmark ran on.
Definition: Benchmark.h:147
virtual bool saveResultsToStream(std::ostream &out=std::cout) const
Save the results of the benchmark to a stream.
Definition: Benchmark.cpp:257
std::string setupInfo
The output of SimpleSetup::print() before the experiment was started.
Definition: Benchmark.h:141
void setPostRunEvent(const PostSetupEvent &event)
Set the event to be called after the run of a planner.
Definition: Benchmark.h:253
CompleteExperiment exp_
The collected experimental data (for all planners)
Definition: Benchmark.h:307
This structure holds experimental data for a set of planners.
Definition: Benchmark.h:117
std::string cpuInfo
Information about the CPU of the machine the benchmark ran on.
Definition: Benchmark.h:150
boost::function< void(const base::PlannerPtr &)> PreSetupEvent
Signature of function that can be called before a planner execution is started.
Definition: Benchmark.h:85
virtual void benchmark(const Request &req)
Benchmark the added planners on the defined problem. Repeated calls clear previously gathered data...
Definition: Benchmark.cpp:387