RoboWaiter/robowaiter/behavior_lib/act/GreetCustomer.py

36 lines
977 B
Python
Raw Normal View History

import py_trees as ptree
from robowaiter.behavior_lib._base.Act import Act
from robowaiter.algos.navigator.navigate import Navigator
2023-11-18 12:07:30 +08:00
class GreetCustomer(Act):
can_be_expanded = True
num_args = 0
valid_args = ()
def __init__(self, *args):
super().__init__(*args)
@classmethod
def get_info(cls):
info = {}
info['pre'] = set()
info["add"] = set()
info["del_set"] = set()
info['cost']=0
return info
def _update(self) -> ptree.common.Status:
2023-11-20 15:48:03 +08:00
goal = Act.place_xy_yaw_dic['Bar']
2023-11-16 23:05:11 +08:00
self.scene.walk_to(goal[0]-5,goal[1], 180, 180, 0)
# self.scene.chat_bubble("欢迎光临!请问有什么可以帮您?")
2023-11-19 16:47:52 +08:00
if self.scene.show_bubble:
self.scene.chat_bubble("欢迎光临!")
2023-11-18 12:07:30 +08:00
customer_name = self.scene.state['attention']['customer']
self.scene.state['greeted_customers'].add(customer_name)
2023-11-18 14:51:17 +08:00
return ptree.common.Status.RUNNING