Go to the documentation of this file.
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>
63 class ServerGoalHandle
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;
175 ServerGoalHandle(
typename std::list<StatusTracker<ActionSpec> >::iterator status_it,
185 typename std::list<StatusTracker<ActionSpec> >::iterator
status_it_;
190 friend class ActionServerBase<ActionSpec>;
198 #endif // ACTIONLIB__SERVER__SERVER_GOAL_HANDLE_H_
bool setCancelRequested()
A private method to set status to PENDING or RECALLING.
ActionServerBase< ActionSpec > * as_
boost::shared_ptr< const Goal > getGoal() const
Accessor for the goal associated with the ServerGoalHandle.
void publishFeedback(const Feedback &feedback)
Send feedback to any clients of the goal associated with this ServerGoalHandle.
boost::shared_ptr< void > handle_tracker_
bool operator==(const ServerGoalHandle &other) const
Equals operator for ServerGoalHandles.
#define ACTION_DEFINITION(ActionSpec)
bool isValid() const
Determine if the goal handle is valid (tracking a valid goal, and associated with a valid action serv...
actionlib_msgs::GoalStatus getGoalStatus() const
Accessor for the status associated with the ServerGoalHandle.
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 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...
bool operator!=(const ServerGoalHandle &other) const
!= operator for ServerGoalHandles
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...
friend class ActionServerBase< ActionSpec >
void setSucceeded(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to succeeded.
ServerGoalHandle()
Default constructor for a ServerGoalHandle.
boost::shared_ptr< DestructionGuard > guard_
actionlib_msgs::GoalID getGoalID() const
Accessor for the goal id associated with the ServerGoalHandle.
std::list< StatusTracker< ActionSpec > >::iterator status_it_
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
Author(s): Eitan Marder-Eppstein, Vijay Pradeep, Mikael Arguedas
autogenerated on Fri May 19 2023 02:36:55