Template Class SimpleActionServer
Defined in File simple_action_server.hpp
Class Documentation
An action server wrapper to make applications simpler using Actions.
Public Types
Public Functions
An constructor for SimpleActionServer.
- Parameters:
node – Ptr to node to make actions
action_name – Name of the action to call
execute_callback – Execution callback function of Action
server_timeout – Timeout to to react to stop or preemption requests
spin_thread – Whether to spin with a dedicated thread internally
options – Options to pass to the underlying rcl_action_server_t
An constructor for SimpleActionServer.
- Parameters:
<node – interfaces> Abstract node interfaces to make actions
action_name – Name of the action to call
execute_callback – Execution callback function of Action
server_timeout – Timeout to to react to stop or preemption requests
spin_thread – Whether to spin with a dedicated thread internally
options – Options to pass to the underlying rcl_action_server_t
handle the goal requested: accept or reject. This implementation always accepts.
- Parameters:
uuid – Goal ID
Goal – A shared pointer to the specific goal
- Returns:
GoalResponse response of the goal processed
Accepts cancellation requests of action server.
- Parameters:
uuid – Goal ID
Goal – A server goal handle to cancel
- Returns:
CancelResponse response of the goal cancelled
Handles accepted goals and adds to preempted queue to switch to.
- Parameters:
Goal – A server goal handle to cancel
Computed background work and processes stop requests.
Active action server.
Deactive action server.
Whether the action server is munching on a goal.
- Returns:
bool If its running or not
Whether the action server is active or not.
- Returns:
bool If its active or not
Whether the action server has been asked to be preempted with a new goal.
- Returns:
bool If there’s a preemption request or not
Accept pending goals.
- Returns:
Goal Ptr to the goal that’s going to be accepted
Terminate pending goals.
Get the current goal object.
- Returns:
Goal Ptr to the goal that’s being processed currently
Get the pending goal object.
- Returns:
Goal Ptr to the goal that’s pending
Whether or not a cancel command has come in.
- Returns:
bool Whether a cancel command has been requested or not
Terminate all pending and active actions.
- Parameters:
result – A result object to send to the terminated actions
Terminate the active action.
- Parameters:
result – A result object to send to the terminated action
Return success of the active action.
- Parameters:
result – A result object to send to the terminated actions
Publish feedback to the action server clients.
- Parameters:
feedback – A feedback object to send to the clients
Protected Functions
Generate an empty result object for an action type.
Whether a given goal handle is currently active.
- Parameters:
handle – Goal handle to check
- Returns:
Whether this goal handle is active
Terminate a particular action with a result.
- Parameters:
handle – goal handle to terminate
the – Results object to terminate the action with
Info logging.
Debug logging.
Error logging.
Warn logging.
Protected Attributes