Go to the documentation of this file.
41 #include <boost/exception/diagnostic_information.hpp>
49 const std::string &name,
51 const TFPtr &tf_listener_ptr,
52 const MoveBaseFlexConfig &config) :
54 behavior_(recovery_ptr), tf_listener_ptr_(tf_listener_ptr), state_(INITIALIZED)
67 boost::lock_guard<boost::mutex> guard(
conf_mtx_);
79 boost::lock_guard<boost::mutex> guard(
state_mtx_);
86 boost::lock_guard<boost::mutex> guard(
state_mtx_);
96 ROS_WARN_STREAM(
"Cancel recovery behavior \"" <<
name_ <<
"\" failed or is not supported by the plugin. "
97 <<
"Wait until the current recovery behavior finished!");
105 boost::lock_guard<boost::mutex> guard1(
conf_mtx_);
106 boost::lock_guard<boost::mutex> guard2(
time_mtx_);
131 catch (boost::thread_interrupted &ex)
138 ROS_FATAL_STREAM(
"Unknown error occurred in recovery behavior \"" <<
name_ <<
"\": " << boost::current_exception_diagnostic_information());
RecoveryState state_
current internal state
@ INTERNAL_ERROR
An internal error occurred.
bool cancel_
flag for canceling controlling
#define ROS_FATAL_STREAM(args)
mbf_abstract_core::AbstractRecovery::Ptr behavior_
the current loaded recovery behavior
uint32_t outcome_
the last received plugin execution outcome
@ CANCELED
The recovery execution was canceled.
ros::Duration patience_
recovery behavior allowed time
ros::Time start_time_
recovery behavior start time
boost::mutex state_mtx_
mutex to handle safe thread communication for the current state
void setState(RecoveryState state)
Sets the current internal state. This method is thread communication safe.
#define ROS_DEBUG_STREAM(args)
@ RECOVERING
The recovery behavior plugin is running.
#define ROS_WARN_STREAM(args)
boost::condition_variable condition_
condition variable to wake up control thread
bool isPatienceExceeded()
Checks whether the patience was exceeded.
void reconfigure(const MoveBaseFlexConfig &config)
Reconfigures the current configuration and reloads all parameters. This method is called from a dynam...
boost::mutex conf_mtx_
dynamic reconfigure and start time mutexes to mutually exclude read/write configuration
@ RECOVERY_DONE
The recovery behavior execution is done.
AbstractRecoveryExecution::RecoveryState getState()
Returns the current state, thread-safe communication.
virtual ~AbstractRecoveryExecution()
Destructor.
std::string message_
the last received plugin execution message
@ STOPPED
The recovery execution has been stopped.
AbstractRecoveryExecution(const std::string &name, const mbf_abstract_core::AbstractRecovery::Ptr &recovery_ptr, const TFPtr &tf_listener_ptr, const MoveBaseFlexConfig &config)
Constructor.
Base class for running concurrent navigation tasks.
RecoveryState
internal state.
virtual void run()
Main execution method which will be executed by the recovery execution thread_.
std::string name_
the plugin name; not the plugin type!
virtual bool cancel()
Cancel the planner execution. This calls the cancel method of the planner plugin. This could be usefu...
mbf_abstract_nav
Author(s): Sebastian Pütz
autogenerated on Wed Mar 2 2022 00:33:47