39 #ifndef MBF_ABSTRACT_NAV__ABSTRACT_EXECUTION_BASE_H_ 40 #define MBF_ABSTRACT_NAV__ABSTRACT_EXECUTION_BASE_H_ 42 #include <mbf_abstract_nav/MoveBaseFlexConfig.h> 43 #include <boost/thread.hpp> 44 #include <boost/chrono/duration.hpp> 45 #include <boost/chrono/thread_clock.hpp> 55 boost::function<
void()> setup_fn,
56 boost::function<
void()> cleanup_fn);
99 virtual void run() = 0;
boost::condition_variable condition_
condition variable to wake up control thread
boost::function< void()> setup_fn_
Implementation-specific setup function called right before execution; empty on abstract server...
std::string name_
the plugin name; not the plugin type!
boost::function< void()> cleanup_fn_
Implementation-specific cleanup function called right after execution; empty on abstract server...
std::string getMessage()
Gets the current plugin execution message.
std::string getName()
Returns the name of the corresponding plugin.
bool cancel_
flag for canceling controlling
std::string message_
the last received plugin execution message
AbstractExecutionBase(std::string name, boost::function< void()> setup_fn, boost::function< void()> cleanup_fn)
void waitForStateUpdate(boost::chrono::microseconds const &duration)
virtual bool cancel()=0
Cancel the plugin execution.
uint32_t outcome_
the last received plugin execution outcome
boost::thread thread_
the controlling thread object
uint32_t getOutcome()
Gets the current plugin execution outcome.