RoboWaiter/tasks_no_ui/OT/Open_tasks_test.py

81 lines
3.2 KiB
Python
Raw Normal View History

2023-11-15 14:30:57 +08:00
"""
人提出请求机器人完成任务
1. 做咖啡固定动画接收到做咖啡指令走到咖啡机拿杯子操作咖啡机取杯子送到客人桌子上
2. 倒水
3. 夹点心
具体描述设计一套点单规则如菜单包含咖啡点心等按照规则拟造随机的订单在收到订单后通过大模型让机器人输出合理的备餐计划并尝试在模拟环境中按照这个规划实现任务
"""
# todo: 接收点单信息,大模型生成任务规划
from robowaiter.scene.scene import Scene
class SceneOT(Scene):
def __init__(self, robot):
super().__init__(robot)
# 在这里加入场景中发生的事件
2023-11-19 10:48:45 +08:00
self.signal_event_list = [
2023-11-28 17:50:20 +08:00
# (3, self.customer_say, ("System", "有多少盒装饮料")),
# (3, self.customer_say, ("System", "桌子有几张")),
# (3, self.customer_say, ("System", "你们这儿有军棋吗")),
# (3, self.customer_say, ("System", "军棋有几个")),
# (3, self.customer_say, ("System", "有几把椅子呀")),
# (3, self.customer_say, ("System", "有多少顾客")),
# (3, self.customer_say, ("System", "你们这儿有多少军棋")),
# (3, self.customer_say, ("System", "哪里有盒装饮料?")),
2023-11-28 18:34:46 +08:00
# (3, self.customer_say, ("System", "洗手间在哪里?")),#卫生间
2023-11-28 17:50:20 +08:00
# (3, self.customer_say, ("System", "卫生间在哪里?")),
# (3, self.customer_say, ("System", "你们这里有棋吗,在哪里")),
2023-11-28 18:34:46 +08:00
# (3, self.customer_say, ("System", "棋在哪里"))
2023-11-28 17:50:20 +08:00
# (3, self.customer_say, ("System", "有几副棋")),
# (3, self.customer_say, ("System", "我的手镯,你有看到吗")),
# (3, self.customer_say, ("System", "你们这有小说吗?")),
# (3, self.customer_say, ("System", "我昨天保温杯落在你们咖啡厅了,你看到了吗?")),
# (3, self.customer_say, ("System", "你们这有魔方吗?")),
# (3, self.customer_say, ("System", "垃圾桶在哪呀?")),
# (3, self.customer_say, ("System", "这有小说吗?在哪里")),
2023-11-28 18:34:46 +08:00
# (3, self.customer_say, ("System", "还有空位吗")),
(3, self.customer_say, ("System", "有空桌子吗")),
2023-11-28 17:50:20 +08:00
# (3, self.customer_say, ("System", "把盒装冰红茶放到水桌")),
# (3, self.customer_say, ("System", "冰红茶")),
2023-11-22 20:13:44 +08:00
# (3, self.customer_say, ("System", "酸奶。")),
2023-11-19 16:47:52 +08:00
# (3, self.customer_say, ("System","来一号桌")),
# (-1, self.customer_say, ("System","回去吧")),
2023-11-18 12:07:30 +08:00
# (5, self.set_goal("At(Robot,BrightTable4)"))
2023-11-15 14:30:57 +08:00
]
2023-11-22 17:55:57 +08:00
# self.event_list = [
# # (3, self.set_goal("On(VacuumCup,Bar)"))
# (3, self.set_goal("On(Yogurt,Bar)"))
# ]
2023-11-15 14:30:57 +08:00
def _reset(self):
2023-11-28 17:50:20 +08:00
self.add_walkers([[0, 880], [250, 1200]])
2023-11-19 16:47:52 +08:00
self.gen_obj()
2023-11-18 17:56:48 +08:00
pass
2023-11-18 12:07:30 +08:00
2023-11-15 14:30:57 +08:00
def _run(self):
pass
if __name__ == '__main__':
import os
from robowaiter.robot.robot import Robot
robot = Robot()
# create task
task = SceneOT(robot)
task.reset()
task.run()