The MGActionServer implements a multi goal policy on top of the ActionServer class. More...
Public Member Functions | |
def | __del__ |
def | __init__ |
Constructor for a MGActionServer. | |
def | accept_new_goal |
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 | removePreemptedGoals |
def | requestPreemption |
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 | |
active_goals | |
execute_callback | |
execute_condition | |
execute_thread | |
lock | |
need_to_terminate | |
new_goals | |
terminate_mutex |
The MGActionServer implements a multi goal policy on top of the ActionServer class.
Definition at line 164 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.__init__ | ( | self, | |
name, | |||
ActionSpec, | |||
execute_cb = None , |
|||
auto_start = True |
|||
) |
Constructor for a MGActionServer.
name | A name for the action server |
execute_cb | Optional 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_start | A 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 171 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.__del__ | ( | self | ) |
Definition at line 194 of file multi_goal_action_server.py.
Definition at line 203 of file multi_goal_action_server.py.
Called from a separate thread to call blocking execute calls.
Definition at line 341 of file multi_goal_action_server.py.
Definition at line 271 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.internal_goal_callback | ( | self, | |
goal | |||
) |
Callback for when the ActionServer receives a new goal and passes it on.
Definition at line 296 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.internal_preempt_callback | ( | self, | |
goal | |||
) |
Callback for when the ActionServer receives a new preempt and passes it on.
Definition at line 311 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.is_active | ( | self, | |
goal | |||
) |
Allows polling implementations to query about the status of the current goal.
Definition at line 229 of file multi_goal_action_server.py.
Allows polling implementations to query about the availability of a new goal.
Definition at line 214 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.is_preempt_requested | ( | self, | |
goal | |||
) |
Allows polling implementations to query about preempt requests.
Definition at line 220 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.removePreemptedGoals | ( | self, | |
threads_for_delete | |||
) |
Definition at line 328 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.requestPreemption | ( | self, | |
goal | |||
) |
Definition at line 235 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.set_aborted | ( | self, | |
goal, | |||
result = None , |
|||
text = "" |
|||
) |
Sets the status of the active goal to aborted.
result | An optional result to send back to any clients of the goal |
Definition at line 258 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.set_preempted | ( | self, | |
goal, | |||
result = None , |
|||
text = "" |
|||
) |
Sets the status of the active goal to preempted.
result | An optional result to send back to any clients of the goal |
Definition at line 276 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.set_succeeded | ( | self, | |
goal, | |||
result = None , |
|||
text = "" |
|||
) |
Sets the status of the active goal to succeeded.
result | An optional result to send back to any clients of the goal |
Definition at line 243 of file multi_goal_action_server.py.
def multi_goal_action_server.MGActionServer.start | ( | self | ) |
Explicitly start the action server, used it auto_start is set to false.
Definition at line 291 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.
Definition at line 171 of file multi_goal_action_server.py.