Public Member Functions | |
def | __init__ |
def | add_behavior |
def | add_parameter |
def | confirm |
def | create |
def | execute |
def | get_current_state |
def | get_locked_state |
def | preempt |
def | preempt_for_switch |
def | prepare_for_execution |
def | prepare_for_switch |
def | set_up |
def | use_behavior |
Public Attributes | |
contains | |
id | |
name | |
requested_state_path | |
Private Member Functions | |
def | _get_muted_state_machine |
def | _get_state_machine |
def | _get_states_of_path |
def | _mute_state_machine |
Private Attributes | |
_autonomy_level | |
_behaviors | |
_debug | |
_state_machine |
This is the superclass for all implemented behaviors.
Definition at line 18 of file behavior.py.
def flexbe_core.behavior.Behavior.__init__ | ( | self | ) |
Please call this superclass constructor first when overriding it with your behavior.
Definition at line 23 of file behavior.py.
def flexbe_core.behavior.Behavior._get_muted_state_machine | ( | self | ) | [private] |
Definition at line 205 of file behavior.py.
def flexbe_core.behavior.Behavior._get_state_machine | ( | self | ) | [private] |
Definition at line 200 of file behavior.py.
def flexbe_core.behavior.Behavior._get_states_of_path | ( | self, | |
path, | |||
container | |||
) | [private] |
Definition at line 224 of file behavior.py.
def flexbe_core.behavior.Behavior._mute_state_machine | ( | self, | |
sm | |||
) | [private] |
Definition at line 211 of file behavior.py.
def flexbe_core.behavior.Behavior.add_behavior | ( | self, | |
behavior_class, | |||
behavior_id | |||
) |
Adds another behavior as part of this behavior. This other behavior should be declared as contained in the behavior manifest. @type behavior_class: class @param behavior_class: The class implementing the other behavior. @type behavior_id: string @param behavior_id: Unique identifier for this behavior instance.
Definition at line 67 of file behavior.py.
def flexbe_core.behavior.Behavior.add_parameter | ( | self, | |
name, | |||
default | |||
) |
Adds a parameter to this behavior. The parameter should be declared in the behavior manifest. @type name: string @param name: The name of the parameter. @type default: object @param default: The default value of this parameter. Be sure to set it to the right type.
Definition at line 54 of file behavior.py.
def flexbe_core.behavior.Behavior.confirm | ( | self | ) |
Confirms that this behavior is ready for execution.
Definition at line 134 of file behavior.py.
def flexbe_core.behavior.Behavior.create | ( | self | ) |
Should create the state machine for this behavior and return it. It is called immediately before executing the behavior, so used parameters will have their final value when called. @return The complete state machine for this behavior.
Definition at line 42 of file behavior.py.
def flexbe_core.behavior.Behavior.execute | ( | self | ) |
Called when the behavior is executed. Need to call self.execute_behavior when ready to start the state machine and return its result. @return: A string containing the execution result such as finished or failed.
Definition at line 143 of file behavior.py.
def flexbe_core.behavior.Behavior.get_current_state | ( | self | ) |
Definition at line 178 of file behavior.py.
def flexbe_core.behavior.Behavior.get_locked_state | ( | self | ) |
Definition at line 181 of file behavior.py.
def flexbe_core.behavior.Behavior.preempt | ( | self | ) |
Definition at line 190 of file behavior.py.
def flexbe_core.behavior.Behavior.preempt_for_switch | ( | self | ) |
Definition at line 193 of file behavior.py.
def flexbe_core.behavior.Behavior.prepare_for_execution | ( | self, | |
input_data = {} |
|||
) |
Prepares this behavior for execution by building its state machine.
Definition at line 119 of file behavior.py.
def flexbe_core.behavior.Behavior.prepare_for_switch | ( | self, | |
state | |||
) |
Prepares the behavior for being executed after a behavior switch. @type name: string @param name: The name of this behavior.
Definition at line 158 of file behavior.py.
def flexbe_core.behavior.Behavior.set_up | ( | self, | |
id, | |||
autonomy_level, | |||
debug | |||
) |
Definition at line 219 of file behavior.py.
def flexbe_core.behavior.Behavior.use_behavior | ( | self, | |
behavior_class, | |||
behavior_id, | |||
default_keys = None , |
|||
parameters = None |
|||
) |
Creates a state machine implementing the given behavior to use it in the behavior state machine. Behavior has to be added first. @type behavior_class: class @param behavior_class: The class implementing the other behavior. @type behavior_id: string @param behavior_id: Same identifier as used for adding. @type default_keys: list @param default_keys: List of input keys of the behavior which should be ignored and instead use the default values as given by the behavior. @type parameters: dict @param parameters: Optional assignment of values to behavior parameters. Any assigned parameter will be ignored for runtime customization, i.e., cannot be overwritten by a user who runs the behavior.
Definition at line 84 of file behavior.py.
Definition at line 25 of file behavior.py.
Definition at line 25 of file behavior.py.
flexbe_core::behavior.Behavior::_debug [private] |
Definition at line 25 of file behavior.py.
Definition at line 25 of file behavior.py.
Definition at line 25 of file behavior.py.
Definition at line 25 of file behavior.py.
Definition at line 25 of file behavior.py.
Definition at line 25 of file behavior.py.