Exemplo n.º 1
0
 def run(self, instance):
     speech("Thank you. Your food will be with you soon")
     cusID = instance.model.tables[instance.table-1]['customerID']
     taskManager.new_task("Deliver", table_number=instance.table, delay=1, customerID=cusID)
     r = rospy.Rate(1)
     r.sleep()
     instance.running = False
Exemplo n.º 2
0
 def run(self, instance):
     speech("Okay, I will come back later")
     cusID = instance.model.tables[instance.table-1]['customerID']
     taskManager.new_task("TakeOrder", table_number=instance.table, delay=5, customerID=cusID)
     r = rospy.Rate(1)
     r.sleep()
     instance.running = False
 def run(self, instance):
     speech("Thanks again for your patience. I'll be back soon.")
     taskManager.new_task("CollectFromWaitingArea",
                          table_number=None,
                          delay=5,
                          customerID=-1)
     r = rospy.Rate(1)
     r.sleep()
     instance.running = False
Exemplo n.º 4
0
 def run(self, instance):
     speech("My apologies, I shall return later")
     cusID = instance.model.tables[instance.table_number - 1]['customerID']
     taskManager.new_task("CollectPayment",
                          table_number=instance.table_number,
                          delay=7.5,
                          customerID=cusID)
     r = rospy.Rate(1)
     r.sleep()
     instance.running = False
Exemplo n.º 5
0
 def run(self, instance):
     speech(
         "Okay, thank you for your comments. They have been submitted to my organic comrades for review"
     )
     cusID = instance.model.tables[instance.table - 1]['customerID']
     taskManager.new_task("CollectPayment",
                          table_number=instance.table,
                          delay=2,
                          customerID=cusID)
     r = rospy.Rate(1)
     r.sleep()
     instance.running = False
Exemplo n.º 6
0
 def run(self, instance):
     speech("Please follow me to the waiting area")
     navTo.navigateTo("waitingarea")
     speech("I will come get you when your table is ready")
     instance.addInput('')
     # add a task to collect them after the time
     taskManager.new_task("CollectFromWaitingArea",
                          table_number=None,
                          delay=5,
                          customerID=-1)
     r = rospy.Rate(1)
     r.sleep()
     instance.running = False
Exemplo n.º 7
0
 def run(self, instance):
     response = listen()
     if response is not None and 'go' in response:
         cusID = instance.model.tables[instance.table_number -
                                       1]['customerID']
         taskManager.new_task("Checkup",
                              table_number=instance.table_number,
                              delay=1,
                              customerID=cusID)
         r = rospy.Rate(1)
         r.sleep()
         instance.running = False
     instance.addInput(response)
 def run(self, instance):
     speech("Please follow me")
     navTo.navigateTo("table" + str(instance.group_table))
     speech("Please take a seat. Someone will be with you in a few minutes")
     instance.addInput('')
     cusID = instance.model.tables[instance.table_number - 1]['customerID']
     taskManager.new_task("TakeOrder",
                          table_number=instance.group_table,
                          delay=0.5,
                          customerID=cusID)
     r = rospy.Rate(1)
     r.sleep()
     instance.model.tables[instance.table_number]
     instance.running = False
Exemplo n.º 9
0
def kitchentask():
    print("kitchentask")
    try:
        user_int = int(request.args.get('table', ''))
        user_str = "table" + str(user_int)
        taskManager.new_task("Deliver", user_int)
        text = "waiter summoned for " + user_str
        model.prepend_message("kitchen", text)

        text = text + "\n\n" + model.messages["kitchen"]
        print("kitchentask")
    except:
        text = "error creating delivery task, please try again"
        print("kitchentask failed")

    return text