Public Member Functions | Public Attributes | List of all members
flexbe_input.complex_action_server.ComplexActionServer Class Reference

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
 

Detailed Description

The ComplexActionServer Operate with concurrent goals in a multi-threaded fashion.

Definition at line 51 of file complex_action_server.py.

Constructor & Destructor Documentation

def flexbe_input.complex_action_server.ComplexActionServer.__init__ (   self,
  name,
  ActionSpec,
  execute_cb = None,
  auto_start = True 
)

Constructor for a ComplexActionServer.

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 58 of file complex_action_server.py.

def flexbe_input.complex_action_server.ComplexActionServer.__del__ (   self)

Definition at line 93 of file complex_action_server.py.

Member Function Documentation

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 104 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 206 of file complex_action_server.py.

def flexbe_input.complex_action_server.ComplexActionServer.get_default_result (   self)

Definition at line 159 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 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.

def flexbe_input.complex_action_server.ComplexActionServer.is_active (   self)

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

Returns
True if a goal is active, false otherwise

Definition at line 128 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.

Returns
True if a new goal is available, false otherwise

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.

Parameters
feedbackShared pointer to the feedback to publish

Definition at line 155 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.

Parameters
cbThe 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.

Parameters
resultAn 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.

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

Definition at line 137 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 172 of file complex_action_server.py.

Member Data Documentation

flexbe_input.complex_action_server.ComplexActionServer.action_server

Definition at line 90 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.current_goal

Definition at line 79 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.execute_callback

Definition at line 65 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.execute_condition

Definition at line 77 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.execute_thread

Definition at line 83 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.goal_callback

Definition at line 66 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.goal_queue_

Definition at line 61 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.goals_received_

Definition at line 60 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.lock

Definition at line 75 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.need_to_terminate

Definition at line 68 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.new_goal

Definition at line 63 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.next_goal

Definition at line 80 of file complex_action_server.py.

flexbe_input.complex_action_server.ComplexActionServer.terminate_mutex

Definition at line 69 of file complex_action_server.py.


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


flexbe_input
Author(s): Philipp Schillinger
autogenerated on Wed Jun 5 2019 21:52:02