Go to the documentation of this file.
37 #ifndef ACTIONLIB__SERVER__SIMPLE_ACTION_SERVER_H_
38 #define ACTIONLIB__SERVER__SIMPLE_ACTION_SERVER_H_
40 #include <boost/thread/condition.hpp>
59 template<
class ActionSpec>
60 class SimpleActionServer
165 void setSucceeded(
const Result & result = Result(),
const std::string & text = std::string(
""));
172 void setAborted(
const Result & result = Result(),
const std::string & text = std::string(
""));
192 void setPreempted(
const Result & result = Result(),
const std::string & text = std::string(
""));
240 boost::recursive_mutex
lock_;
257 #endif // ACTIONLIB__SERVER__SIMPLE_ACTION_SERVER_H_
ExecuteCallback execute_callback_
void publishFeedback(const FeedbackConstPtr &feedback)
Publishes feedback for a given goal.
boost::function< void()> preempt_callback_
#define ACTION_DEFINITION(ActionSpec)
void start()
Explicitly start the action server, used it auto_start is set to false.
ActionServer< ActionSpec >::GoalHandle GoalHandle
boost::thread * execute_thread_
boost::function< void()> goal_callback_
void shutdown()
Explicitly shutdown the action server.
bool isPreemptRequested()
Allows polling implementations to query about preempt requests.
boost::function< void(const GoalConstPtr &)> ExecuteCallback
bool isNewGoalAvailable()
Allows polling implementations to query about the availability of a new goal.
void setSucceeded(const Result &result=Result(), const std::string &text=std::string(""))
Sets the status of the active goal to succeeded.
void goalCallback(GoalHandle goal)
Callback for when the ActionServer receives a new goal and passes it on.
void executeLoop()
Called from a separate thread to call blocking execute calls.
bool isActive()
Allows polling implementations to query about the status of the current goal.
boost::shared_ptr< ActionServer< ActionSpec > > as_
void registerPreemptCallback(boost::function< void()> cb)
Allows users to register a callback to be invoked when a new preempt request is available.
boost::condition execute_condition_
void setPreempted(const Result &result=Result(), const std::string &text=std::string(""))
Sets the status of the active goal to preempted.
ServerGoalHandle< ActionSpec > GoalHandle
void registerGoalCallback(boost::function< void()> cb)
Allows users to register a callback to be invoked when a new goal is available.
void setAborted(const Result &result=Result(), const std::string &text=std::string(""))
Sets the status of the active goal to aborted.
bool new_goal_preempt_request_
boost::shared_ptr< const Goal > acceptNewGoal()
Accepts a new goal when one is available. The status of this goal is set to active upon acceptance,...
boost::mutex terminate_mutex_
void preemptCallback(GoalHandle preempt)
Callback for when the ActionServer receives a new preempt and passes it on.
SimpleActionServer(std::string name, ExecuteCallback execute_callback, bool auto_start)
Constructor for a SimpleActionServer.
boost::recursive_mutex lock_
actionlib
Author(s): Eitan Marder-Eppstein, Vijay Pradeep, Mikael Arguedas
autogenerated on Fri May 19 2023 02:36:55