I'm reading the documents of the generic State class and trying to use it with ROS system. I'm just curious when does the execute function of the State class get called?
class Foo(smach.State):
def __init__(self, outcomes=['outcome1', 'outcome2']):
# Your state initialization goes here
# When does this function get called? <---------------
def execute(self, userdata):
# Your state execution goes here
if xxxx:
return 'outcome1'
else:
return 'outcome2'
I'm reading the documents of the generic State class and trying to use it with ROS system. I'm just curious when does the
execute
function of the State class get called?