37 #ifndef ACTIONLIB__SERVER__SERVER_GOAL_HANDLE_H_ 38 #define ACTIONLIB__SERVER__SERVER_GOAL_HANDLE_H_ 40 #include <actionlib_msgs/GoalID.h> 41 #include <actionlib_msgs/GoalStatus.h> 45 #include <boost/shared_ptr.hpp> 53 template<
class ActionSpec>
54 class ActionServerBase;
62 template<
class ActionSpec>
86 void setAccepted(
const std::string & text = std::string(
""));
94 void setCanceled(
const Result & result = Result(),
const std::string & text = std::string(
""));
101 void setRejected(
const Result & result = Result(),
const std::string & text = std::string(
""));
108 void setAborted(
const Result & result = Result(),
const std::string & text = std::string(
""));
115 void setSucceeded(
const Result & result = Result(),
const std::string & text = std::string(
""));
143 actionlib_msgs::GoalID
getGoalID()
const;
185 typename std::list<StatusTracker<ActionSpec> >::iterator
status_it_;
198 #endif // ACTIONLIB__SERVER__SERVER_GOAL_HANDLE_H_ bool operator==(const ServerGoalHandle &other) const
Equals operator for ServerGoalHandles.
void publishFeedback(const Feedback &feedback)
Send feedback to any clients of the goal associated with this ServerGoalHandle.
ActionServerBase< ActionSpec > * as_
actionlib_msgs::GoalID getGoalID() const
Accessor for the goal id associated with the ServerGoalHandle.
boost::shared_ptr< void > handle_tracker_
void setRejected(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to rejected.
boost::shared_ptr< const Goal > getGoal() const
Accessor for the goal associated with the ServerGoalHandle.
bool operator!=(const ServerGoalHandle &other) const
!= operator for ServerGoalHandles
boost::shared_ptr< const ActionGoal > goal_
void setCanceled(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to RECALLED or PREEMPTED depending on...
void setAccepted(const std::string &text=std::string(""))
Accept the goal referenced by the goal handle. This will transition to the ACTIVE state or the PREEMP...
void setSucceeded(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to succeeded.
A class for storing the status of each goal the action server is currently working on...
boost::shared_ptr< DestructionGuard > guard_
bool isValid() const
Determine if the goal handle is valid (tracking a valid goal, and associated with a valid action serv...
ServerGoalHandle()
Default constructor for a ServerGoalHandle.
std::list< StatusTracker< ActionSpec > >::iterator status_it_
The ActionServerBase implements the logic for an ActionServer.
Encapsulates a state machine for a given goal that the user can trigger transitions on...
ACTION_DEFINITION(ActionSpec)
void setAborted(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to aborted.
ServerGoalHandle & operator=(const ServerGoalHandle &gh)
Equals operator for a ServerGoalHandle.
actionlib_msgs::GoalStatus getGoalStatus() const
Accessor for the status associated with the ServerGoalHandle.
bool setCancelRequested()
A private method to set status to PENDING or RECALLING.