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 |
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.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine.__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Reimplemented from flexbe_core.core.preemptable_state_machine.PreemptableStateMachine.
Definition at line 30 of file operatable_state_machine.py.
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.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._attach_callback | ( | self, | |
msg | |||
) | [private] |
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.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._disable_ros_control | ( | self | ) | [private] |
Reimplemented in flexbe_core.core.concurrency_container.ConcurrencyContainer.
Definition at line 353 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._enable_ros_control | ( | self | ) | [private] |
Reimplemented in flexbe_core.core.concurrency_container.ConcurrencyContainer.
Definition at line 337 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._mirror_structure_callback | ( | self, | |
msg | |||
) | [private] |
Definition at line 266 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._notify_start | ( | self | ) | [private] |
Reimplemented in flexbe_core.core.concurrency_container.ConcurrencyContainer.
Definition at line 330 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._notify_stop | ( | self | ) | [private] |
Reimplemented in flexbe_core.core.concurrency_container.ConcurrencyContainer.
Definition at line 345 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._set_autonomy_level | ( | self, | |
msg | |||
) | [private] |
Sets the current autonomy level.
Definition at line 227 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._sync_callback | ( | self, | |
msg | |||
) | [private] |
Definition at line 240 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine._transition_allowed | ( | self, | |
label, | |||
outcome | |||
) | [private] |
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.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine.confirm | ( | self, | |
name, | |||
id | |||
) |
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.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine.on_exit | ( | self, | |
userdata | |||
) |
Definition at line 361 of file operatable_state_machine.py.
def flexbe_core.core.operatable_state_machine.OperatableStateMachine.replace | ( | self, | |
new_state | |||
) |
Definition at line 176 of file operatable_state_machine.py.
Definition at line 30 of file operatable_state_machine.py.
Reimplemented in flexbe_core.core.concurrency_container.ConcurrencyContainer.
Definition at line 361 of file operatable_state_machine.py.
Definition at line 30 of file operatable_state_machine.py.
Reimplemented from flexbe_core.core.lockable_state_machine.LockableStateMachine.
Definition at line 337 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.
Reimplemented from flexbe_core.core.preemptable_state_machine.PreemptableStateMachine.
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.
Reimplemented from flexbe_core.core.lockable_state_machine.LockableStateMachine.
Definition at line 203 of file operatable_state_machine.py.
Definition at line 28 of file operatable_state_machine.py.