Public Member Functions | Public Attributes
actionlib.simple_action_server.SimpleActionServer Class Reference

The SimpleActionServer implements a singe goal policy on top of the ActionServer class. More...

Inheritance diagram for actionlib.simple_action_server.SimpleActionServer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __del__
def __init__
 Constructor for a SimpleActionServer.
def accept_new_goal
 Accepts a new goal when one is available The status of this goal is set to active upon acceptance, and the status of any previously active goal is set to preempted.
def executeLoop
 Called from a separate thread to call blocking execute calls.
def get_default_result
def internal_goal_callback
 Callback for when the ActionServer receives a new goal and passes it on.
def internal_preempt_callback
 Callback for when the ActionServer receives a new preempt and passes it on.
def is_active
 Allows polling implementations to query about the status of the current goal.
def is_new_goal_available
 Allows polling implementations to query about the availability of a new goal.
def is_preempt_requested
 Allows polling implementations to query about preempt requests.
def publish_feedback
 Publishes feedback for a given goal.
def register_goal_callback
 Allows users to register a callback to be invoked when a new goal is available.
def register_preempt_callback
 Allows users to register a callback to be invoked when a new preempt request is available.
def set_aborted
 Sets the status of the active goal to aborted.
def set_preempted
 Sets the status of the active goal to preempted.
def set_succeeded
 Sets the status of the active goal to succeeded.
def start
 Explicitly start the action server, used it auto_start is set to false.

Public Attributes

 action_server
 current_goal
 execute_callback
 execute_condition
 execute_thread
 goal_callback
 lock
 need_to_terminate
 new_goal
 new_goal_preempt_request
 next_goal
 preempt_callback
 preempt_request
 terminate_mutex

Detailed Description

The SimpleActionServer implements a singe goal policy on top of the ActionServer class.

The specification of the policy is as follows: only one goal can have an active status at a time, new goals preempt previous goals based on the stamp in their GoalID field (later goals preempt earlier ones), an explicit preempt goal preempts all goals with timestamps that are less than or equal to the stamp associated with the preempt, accepting a new goal implies successful preemption of any old goal and the status of the old goal will be change automatically to reflect this.

Definition at line 56 of file simple_action_server.py.


Constructor & Destructor Documentation

def actionlib.simple_action_server.SimpleActionServer.__init__ (   self,
  name,
  ActionSpec,
  execute_cb = None,
  auto_start = True 
)

Constructor for a SimpleActionServer.

Parameters:
nameA name for the action server
execute_cbOptional callback that gets called in a separate thread whenever a new goal is received, allowing users to have blocking callbacks. Adding an execute callback also deactivates the goalCallback.
auto_startA boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.

Definition at line 63 of file simple_action_server.py.

Definition at line 97 of file simple_action_server.py.


Member Function Documentation

Accepts a new goal when one is available The status of this goal is set to active upon acceptance, and the status of any previously active goal is set to preempted.

Preempts received for the new goal between checking if isNewGoalAvailable or invokation of a goal callback and the acceptNewGoal call will not trigger a preempt callback. This means, isPreemptReqauested should be called after accepting the goal even for callback-based implementations to make sure the new goal does not have a pending preempt request.

Returns:
A shared_ptr to the new goal.

Definition at line 115 of file simple_action_server.py.

Called from a separate thread to call blocking execute calls.

Definition at line 273 of file simple_action_server.py.

Definition at line 183 of file simple_action_server.py.

Callback for when the ActionServer receives a new goal and passes it on.

Definition at line 215 of file simple_action_server.py.

Callback for when the ActionServer receives a new preempt and passes it on.

Definition at line 255 of file simple_action_server.py.

Allows polling implementations to query about the status of the current goal.

Returns:
True if a goal is active, false otherwise

Definition at line 154 of file simple_action_server.py.

Allows polling implementations to query about the availability of a new goal.

Returns:
True if a new goal is available, false otherwise

Definition at line 143 of file simple_action_server.py.

Allows polling implementations to query about preempt requests.

Returns:
True if a preempt is requested, false otherwise

Definition at line 149 of file simple_action_server.py.

Publishes feedback for a given goal.

Parameters:
feedbackShared pointer to the feedback to publish

Definition at line 179 of file simple_action_server.py.

Allows users to register a callback to be invoked when a new goal is available.

Parameters:
cbThe callback to be invoked

Definition at line 197 of file simple_action_server.py.

Allows users to register a callback to be invoked when a new preempt request is available.

Parameters:
cbThe callback to be invoked

Definition at line 205 of file simple_action_server.py.

def actionlib.simple_action_server.SimpleActionServer.set_aborted (   self,
  result = None,
  text = "" 
)

Sets the status of the active goal to aborted.

Parameters:
resultAn optional result to send back to any clients of the goal

Definition at line 171 of file simple_action_server.py.

def actionlib.simple_action_server.SimpleActionServer.set_preempted (   self,
  result = None,
  text = "" 
)

Sets the status of the active goal to preempted.

Parameters:
resultAn optional result to send back to any clients of the goal

Definition at line 188 of file simple_action_server.py.

def actionlib.simple_action_server.SimpleActionServer.set_succeeded (   self,
  result = None,
  text = "" 
)

Sets the status of the active goal to succeeded.

Parameters:
resultAn optional result to send back to any clients of the goal

Definition at line 163 of file simple_action_server.py.

Explicitly start the action server, used it auto_start is set to false.

Definition at line 210 of file simple_action_server.py.


Member Data Documentation

Definition at line 63 of file simple_action_server.py.

Reimplemented in mock_simple_server.RefSimpleServer.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.

Definition at line 63 of file simple_action_server.py.


The documentation for this class was generated from the following file:


actionlib
Author(s): Eitan Marder-Eppstein, Vijay Pradeep
autogenerated on Fri Aug 28 2015 10:04:41