Public Member Functions | Private Attributes | List of all members
flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState Class Reference
Inheritance diagram for flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, predicate, input_keys)
 
def execute (self, userdata)
 
def on_enter (self, userdata)
 

Private Attributes

 _input_keys
 
 _outcome
 
 _predicate
 

Detailed Description

Implements a state that checks if the given condition is true based on multiple userdata inputs provided as a list to the calculation function
                                                        and returns the corresponding outcome.
This state can be used if the further control flow of the behavior depends on a simple condition.

-- predicate  function      The condition whose truth value will be evaluated.
                                                        It could be a private function (self.foo) manually defined in a behavior's source code
                                                        or a lambda function (e.g., lambda x: x[0]^2 + x[1]^2).
-- input_keys   string[]    List of available input keys.

># input_keys   object[]    Input(s) to the calculation function as a list of userdata.
                                                        The individual inputs can be accessed as list elements (see lambda expression example).

<= true                                         Returned if the condition evaluates to True
<= false                                        Returned if the condition evaluates to False

Definition at line 12 of file flexible_check_condition_state.py.

Constructor & Destructor Documentation

def flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState.__init__ (   self,
  predicate,
  input_keys 
)
Constructor

Definition at line 32 of file flexible_check_condition_state.py.

Member Function Documentation

def flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState.execute (   self,
  userdata 
)
Execute this state

Definition at line 42 of file flexible_check_condition_state.py.

def flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState.on_enter (   self,
  userdata 
)

Definition at line 48 of file flexible_check_condition_state.py.

Member Data Documentation

flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState._input_keys
private

Definition at line 37 of file flexible_check_condition_state.py.

flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState._outcome
private

Definition at line 39 of file flexible_check_condition_state.py.

flexbe_states.flexible_check_condition_state.FlexibleCheckConditionState._predicate
private

Definition at line 38 of file flexible_check_condition_state.py.


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


flexbe_states
Author(s): Philipp Schillinger
autogenerated on Wed Jun 5 2019 21:52:08