2023-11-08 10:03:40 +08:00
|
|
|
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 10:03:40 +08:00
|
|
|
|
2023-11-08 15:28:01 +08:00
|
|
|
class At(Cond):
|
|
|
|
can_be_expanded = True
|
2023-11-08 10:03:40 +08:00
|
|
|
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
|