Fawkes API Fawkes Development Version
|
Estimate the execution time for the skill goto by querying the distance from the navgraph. More...
Public Member Functions | |
NavGraphEstimator (LockPtr< NavGraph > navgraph, Configuration *config, const std::string &cfg_prefix) | |
Constructor. More... | |
float | get_execution_time (const Skill &skill) override |
Get the estimated execution time for the given skill string. More... | |
bool | can_provide_exec_time (const Skill &skill) const override |
Check if this estimator can give an estimate for a given skill. More... | |
std::pair< SkillerInterface::SkillStatusEnum, std::string > | execute (const Skill &skill) override |
Let the estimator know that we are executing this skill, so it can apply possible side effects. More... | |
![]() | |
ExecutionTimeEstimator (Configuration *config, const ::std::string &cfg_prefix) | |
Constructor. More... | |
virtual | ~ExecutionTimeEstimator ()=default |
Destructor. More... | |
virtual float | get_execution_time (const Skill &skill)=0 |
Get the estimated execution time for the given skill string. More... | |
virtual bool | can_execute (const Skill &skill) |
Check if this estimator is both allowed and able to give an estimate for a given skill. More... | |
virtual std::pair< SkillerInterface::SkillStatusEnum, std::string > | execute (const Skill &skill) |
Let the estimator know that we are executing this skill, so it can apply possible side effects. More... | |
Additional Inherited Members | |
![]() | |
std::map< std::string, Skill > | get_skills_from_config (const std::string &path) const |
Load skill descriptions from a yaml config. More... | |
virtual bool | can_provide_exec_time (const Skill &skill) const =0 |
Check if this estimator can give an estimate for a given skill. More... | |
template<typename T > | |
T | get_property (const Property< T > &property) const |
Get the current property value for active_whitelist_entry_. More... | |
![]() | |
Configuration *const | config_ |
Config to obtain common configurables. More... | |
const std::string | cfg_prefix_ |
Config prefix of the estimator. More... | |
const float | speed_ |
Config estimator-specific speedup factor. More... | |
std::map< std::string, Skill >::const_iterator | active_whitelist_entry_ |
Points to the whitelist entry that matches the skill to execute. More... | |
const std::map< std::string, Skill > | whitelist_ |
Whitelist of skills that the estimator is allowed to process. More... | |
const std::map< std::string, Skill > | blacklist_ |
Blacklist of skills that the estimator must not process. More... | |
Estimate the execution time for the skill goto by querying the distance from the navgraph.
Definition at line 33 of file navgraph_estimator.h.
fawkes::NavGraphEstimator::NavGraphEstimator | ( | LockPtr< NavGraph > | navgraph, |
Configuration * | config, | ||
const std::string & | cfg_prefix | ||
) |
Constructor.
navgraph | The navgraph to read the node positions from |
config | The config to read the initial position from |
cfg_prefix | The config prefix to use for config parameters |
Definition at line 35 of file navgraph_estimator.cpp.
References fawkes::Configuration::get_float_or_default().
|
overridevirtual |
Check if this estimator can give an estimate for a given skill.
skill | The skill object to check. |
Implements fawkes::ExecutionTimeEstimator.
Definition at line 48 of file navgraph_estimator.cpp.
References fawkes::ExecutionTimeEstimator::get_property(), and fawkes::ExecutionTimeEstimator::Skill::skill_args.
|
overridevirtual |
Let the estimator know that we are executing this skill, so it can apply possible side effects.
skill | The skill to execute |
Reimplemented from fawkes::ExecutionTimeEstimator.
Definition at line 73 of file navgraph_estimator.cpp.
References fawkes::ExecutionTimeEstimator::Skill::skill_args.
|
overridevirtual |
Get the estimated execution time for the given skill string.
skill | The skill object to compute the execution time for. |
Implements fawkes::ExecutionTimeEstimator.
Definition at line 55 of file navgraph_estimator.cpp.
References fawkes::ExecutionTimeEstimator::get_property(), fawkes::ExecutionTimeEstimator::Skill::skill_args, and fawkes::ExecutionTimeEstimator::speed_.