def feedbackReceived(emotions, feedback): #check if feedback is good or bad print("feedback received") if feedback == "good": #TODO flask call shut off screen if emotions.get_emotion() in ("excited", "happy", "content", "bored"): #TODO mir mission print("displayed extremely happy") else: #TODO mir mission print("displayed kind of happy") emotions.mod_emotion(+3, +3) elif feedback == "bad": #TODO flask call shut off screen if emotions.get_emotion() in ("excited", "happy", "content", "bored"): #TODO mir mission print("displayed disappointed") elif emotions.get_emotion() == "sad": #TODO mir mission print("displayed sad") else: #TODO mir mission print("displayed angry") emotions.mod_emotion(-2, -2)
def attractCustomers(emotions): """ Randomize between: Two Achoo - https://freesound.org/people/Reitanna/sounds/343921/ Scoot a bit back with each achoo, then roll slowly forward Roll eyes all the way around with each achoo Show purple light on achoo Random chirping - https://freesound.org/people/radarflora/sounds/350690/ Roll around a bit Look around a bit Rainbow lights """ #TODO reaction = random.random() * 100 print("random reaction percentage: " + str(reaction)) if reaction < 5: achoo() emotions.mod_emotion(2,2) if reaction >= 5 and reaction < 10: chirping() if reaction >= 10 and reaction < 20: eyes.lookRight() time.sleep(2) eyes.lookUp() time.sleep(3) eyes.lookDown() if reaction >= 20 and reaction < 50: eyes.lookLeft() time.sleep(1) eyes.lookRight() time.sleep(1) eyes.lookDown() if reaction >= 50: eyes.lookRight() time.sleep(3) eyes.lookDown() print("attracting customers")
def attractCustomers(emotions): """ Randomize between: Two Achoo - https://freesound.org/people/Reitanna/sounds/343921/ Scoot a bit back with each achoo, then roll slowly forward Roll eyes all the way around with each achoo Show purple light on achoo Random chirping - https://freesound.org/people/radarflora/sounds/350690/ Roll around a bit Look around a bit Rainbow lights """ #TODO reaction = random.random() * 100 if reaction < 10: mir_calls.add_to_mission_queue("f747a369-509c-11e9-9b99-94c691a3a93e") emotions.mod_emotion(2, 2) eyes.rollEyes() if reaction >= 10 and reaction < 20: eyes.lookRight() time.sleep(2) eyes.lookUp() time.sleep(5) eyes.lookDown if reaction >= 20 and reaction < 50: eyes.lookLeft() time.sleep(1) eyes.lookRight() time.sleep(1) eyes.lookDown() if reaction >= 50: eyes.lookRight() time.sleep(3) eyes.lookDown() print("attracting customers")
def atColumn(emotions, direction): """ “Bling” we have arrived - https://freesound.org/people/newagesoup/sounds/350359/ Look at column Flash white light """ #check which direction the column is in and point there print("at column") if direction == "left": #TODO mir mission #TODO flask call print("pointed at column left") emotions.mod_emotion(+1,+1) elif direction == "right": #TODO mir mission #TODO flask call print("pointed at column right") emotions.mod_emotion(+1,+1)
def displayEmotion(emotions): """ Frustrated or angry Annoyed beep - https://freesound.org/people/DontGoThere/sounds/255883/ (this should be slowed down) Show red lights Look left, look right Sad or bored Sad wobbling sound - https://freesound.org/people/pschrandt/sounds/428076/ (make sure this doesn’t play too loud) Look at ground Shake (as if shaking head) Show blue light Happy excited or content happy chirping (when content) - https://freesound.org/people/Illud/sounds/271674/ Goes from side to side, looks to each side Show green light """ print("displaying emotion") if emotions.get_emotion() in ("frustrated", "angry"): #TODO mir mission print("in frustrated or angry") print("my emotion is") print(emotions.get_emotion()) emotionAngry() emotions.mod_emotion(0,-1) elif emotions.get_emotion() in ("sad", "bored"): #TODO mir mission print("in sad or bored") print("my emotion is") print(emotions.get_emotion()) eyes.topRoll() emotions.mod_emotion(-1,-1) else: #TODO mir mission print("in happy excited or content") print("my emotion is") print(emotions.get_emotion()) eyes.topRoll() emotions.mod_emotion(-1,-1)