The ComplexActionServer Operate with concurrent goals in a multi-threaded fashion. More...
Public Member Functions | |
def | __del__ (self) |
def | __init__ (self, name, ActionSpec, execute_cb=None, auto_start=True) |
Constructor for a ComplexActionServer. More... | |
def | accept_new_goal (self) |
Accepts a new goal when one is available The status of this goal is set to active upon acceptance,. More... | |
def | executeLoop (self) |
Called from a separate thread to call blocking execute calls. More... | |
def | get_default_result (self) |
def | internal_goal_callback (self, goal) |
Callback for when the ActionServer receives a new goal and passes it on. More... | |
def | internal_preempt_callback (self, preempt) |
Callback for when the ActionServer receives a new preempt and passes it on. More... | |
def | is_active (self) |
Allows polling implementations to query about the status of the current goal. More... | |
def | is_new_goal_available (self) |
Allows polling implementations to query about the availability of a new goal. More... | |
def | publish_feedback (self, feedback) |
Publishes feedback for a given goal. More... | |
def | register_goal_callback (self, cb) |
Allows users to register a callback to be invoked when a new goal is available. More... | |
def | run_goal (self, goal, goal_handle) |
def | set_aborted (self, result=None, text="", goal_handle=None) |
Sets the status of the active goal to aborted. More... | |
def | set_succeeded (self, result=None, text="", goal_handle=None) |
Sets the status of the active goal to succeeded. More... | |
def | start (self) |
Explicitly start the action server, used it auto_start is set to false. More... | |
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 50 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 57 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.__del__ | ( | self | ) |
Definition at line 92 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.accept_new_goal | ( | self | ) |
Accepts a new goal when one is available The status of this goal is set to active upon acceptance,.
Definition at line 103 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.executeLoop | ( | self | ) |
Called from a separate thread to call blocking execute calls.
Definition at line 205 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.get_default_result | ( | self | ) |
Definition at line 158 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.internal_goal_callback | ( | self, | |
goal | |||
) |
Callback for when the ActionServer receives a new goal and passes it on.
Definition at line 176 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 201 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.is_active | ( | self | ) |
Allows polling implementations to query about the status of the current goal.
Definition at line 127 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.is_new_goal_available | ( | self | ) |
Allows polling implementations to query about the availability of a new goal.
Definition at line 121 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 154 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.register_goal_callback | ( | self, | |
cb | |||
) |
Allows users to register a callback to be invoked when a new goal is available.
cb | The callback to be invoked |
Definition at line 163 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.run_goal | ( | self, | |
goal, | |||
goal_handle | |||
) |
Definition at line 239 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 145 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 136 of file complex_action_server.py.
def flexbe_input.complex_action_server.ComplexActionServer.start | ( | self | ) |
Explicitly start the action server, used it auto_start is set to false.
Definition at line 171 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.action_server |
Definition at line 89 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.current_goal |
Definition at line 78 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.execute_callback |
Definition at line 64 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.execute_condition |
Definition at line 76 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.execute_thread |
Definition at line 82 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.goal_callback |
Definition at line 65 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.goal_queue_ |
Definition at line 60 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.goals_received_ |
Definition at line 59 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.lock |
Definition at line 74 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.need_to_terminate |
Definition at line 67 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.new_goal |
Definition at line 62 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.next_goal |
Definition at line 79 of file complex_action_server.py.
flexbe_input.complex_action_server.ComplexActionServer.terminate_mutex |
Definition at line 68 of file complex_action_server.py.