RoboWaiter/robowaiter/behavior_lib/cond/At.py

23 lines
516 B
Python
Raw Normal View History

import py_trees as ptree
from typing import Any
2023-11-08 15:28:01 +08:00
from robowaiter.behavior_lib._base.Cond import Cond
2023-11-08 15:28:01 +08:00
class At(Cond):
can_be_expanded = True
num_params = 2
valid_params = '''
Coffee, Table
'''
def __init__(self,*args):
super().__init__(*args)
def _update(self) -> ptree.common.Status:
# if self.scene.status?
if self.scene.state['chat_list'] == []:
return ptree.common.Status.FAILURE
else:
return ptree.common.Status.SUCCESS