The ComplexActionServer Operate with concurrent goals in a multi-threaded fashion. More...
Public Member Functions | |
def | __del__ |
def | __init__ |
Constructor for a ComplexActionServer. | |
def | accept_new_goal |
Accepts a new goal when one is available The status of this goal is set to active upon acceptance,. | |
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 | 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 | run_goal |
def | set_aborted |
Sets the status of the active goal to aborted. | |
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 | |
goal_queue_ | |
goals_received_ | |
lock | |
need_to_terminate | |
new_goal | |
next_goal | |
terminate_mutex |
The ComplexActionServer Operate with concurrent goals in a multi-threaded fashion.
Definition at line 51 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.__init__ | ( | self, | |
name, | |||
ActionSpec, | |||
execute_cb = None , |
|||
auto_start = True |
|||
) |
Constructor for a ComplexActionServer.
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 58 of file complex_action_server.py.
Definition at line 93 of file complex_action_server.py.
Accepts a new goal when one is available The status of this goal is set to active upon acceptance,.
Definition at line 104 of file complex_action_server.py.
Called from a separate thread to call blocking execute calls.
Definition at line 206 of file complex_action_server.py.
Definition at line 159 of file complex_action_server.py.
Callback for when the ActionServer receives a new goal and passes it on.
Definition at line 177 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.internal_preempt_callback | ( | self, | |
preempt | |||
) |
Callback for when the ActionServer receives a new preempt and passes it on.
Definition at line 202 of file complex_action_server.py.
Allows polling implementations to query about the status of the current goal.
Definition at line 128 of file complex_action_server.py.
Allows polling implementations to query about the availability of a new goal.
Definition at line 122 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.publish_feedback | ( | self, | |
feedback | |||
) |
Publishes feedback for a given goal.
feedback | Shared pointer to the feedback to publish |
Definition at line 155 of file complex_action_server.py.
Allows users to register a callback to be invoked when a new goal is available.
cb | The callback to be invoked |
Definition at line 164 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.run_goal | ( | self, | |
goal, | |||
goal_handle | |||
) |
Definition at line 240 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.set_aborted | ( | self, | |
result = None , |
|||
text = "" , |
|||
goal_handle = None |
|||
) |
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 146 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.set_succeeded | ( | self, | |
result = None , |
|||
text = "" , |
|||
goal_handle = None |
|||
) |
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 137 of file complex_action_server.py.
Explicitly start the action server, used it auto_start is set to false.
Definition at line 172 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.
Definition at line 58 of file complex_action_server.py.