Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
flexbe_core.core.operatable_state_machine.OperatableStateMachine Class Reference
Inheritance diagram for flexbe_core.core.operatable_state_machine.OperatableStateMachine:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def confirm
def destroy
def execute
def on_exit
def replace

Static Public Member Functions

def add

Public Attributes

 autonomy
 id
 name

Static Public Attributes

int autonomy_level = 3
 silent_mode = False

Private Member Functions

def _async_execute
def _attach_callback
def _build_msg
def _disable_ros_control
def _enable_ros_control
def _mirror_structure_callback
def _notify_start
def _notify_stop
def _set_autonomy_level
def _sync_callback
def _transition_allowed

Private Attributes

 _autonomy
 _current_state
 _inner_sync_request
 _is_controlled
 _is_running
 _message
 _ordered_states
 _preempted_label
 _preempted_state
 _pub
 _rate
 _sub

Detailed Description

A state machine that can be operated.
It synchronizes its current state with the mirror and supports some control mechanisms.

Definition at line 21 of file operatable_state_machine.py.


Constructor & Destructor Documentation


Member Function Documentation

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._async_execute (   self,
  parent_ud = smach.UserData() 
) [private]
Run the state machine on entry to this state.
This will set the "closed" flag and spin up the execute thread. Once
this flag has been set, it will prevent more states from being added to
the state machine. 

Definition at line 81 of file operatable_state_machine.py.

Definition at line 252 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._build_msg (   self,
  prefix,
  msg = None 
) [private]
Adds this state machine to the initial structure message.

@type prefix: string
@param prefix: A path consisting of the container hierarchy containing this state.

@type msg: ContainerStructure
@param msg: The message that will finally contain the structure message.

Reimplemented in flexbe_core.core.concurrency_container.ConcurrencyContainer.

Definition at line 278 of file operatable_state_machine.py.

Definition at line 266 of file operatable_state_machine.py.

Sets the current autonomy level. 

Definition at line 227 of file operatable_state_machine.py.

Definition at line 240 of file operatable_state_machine.py.

Definition at line 274 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.add (   label,
  state,
  transitions = None,
  autonomy = None,
  remapping = None 
) [static]
Add a state to the opened state machine.

@type label: string
@param label: The label of the state being added.

@param state: An instance of a class implementing the L{State} interface.

@param transitions: A dictionary mapping state outcomes to other state
labels or container outcomes.

@param autonomy: A dictionary mapping state outcomes to their required
autonomy level

@param remapping: A dictionary mapping local userdata keys to userdata
keys in the container.

Definition at line 139 of file operatable_state_machine.py.

Confirms the state machine and triggers the creation of the structural message.
It is mandatory to call this function at the top-level state machine
between building it and starting its execution.

@type name: string
@param name: The name of this state machine to identify it.

Definition at line 196 of file operatable_state_machine.py.

Definition at line 186 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.execute (   self,
  parent_ud = smach.UserData() 
)

Definition at line 47 of file operatable_state_machine.py.

Definition at line 361 of file operatable_state_machine.py.

Definition at line 176 of file operatable_state_machine.py.


Member Data Documentation

Definition at line 30 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 85 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 47 of file operatable_state_machine.py.

Definition at line 47 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 27 of file operatable_state_machine.py.

Definition at line 30 of file operatable_state_machine.py.

Definition at line 28 of file operatable_state_machine.py.


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


flexbe_core
Author(s): Philipp Schillinger
autogenerated on Thu Jun 6 2019 19:32:27