2 from flexbe_core
import EventState, Logger
7 Checks if the given condition is true and returns the corresponding outcome. 8 This state can be used if the further control flow of the behavior depends on a simple condition. 10 -- predicate function The condition whose truth value will be evaluated. 11 Has to expect one parameter which will be set to input_value and return a boolean. 13 ># input_value object Input to the predicate function. 15 <= true Returned if the condition evaluates to True 16 <= false Returned if the condition evaluates to False 20 super(CheckConditionState, self).
__init__(outcomes=[
'true',
'false'],
21 input_keys=[
'input_value'])
31 except Exception
as e:
32 Logger.logwarn(
'Failed to execute condition function!\n%s' % str(e))
def execute(self, userdata)
def __init__(self, predicate)
def on_enter(self, userdata)