Skip to content
Snippets Groups Projects
Commit 35ef2879 authored by Simon Wijk Stranius's avatar Simon Wijk Stranius
Browse files

Remove unused code, uncomment

parent 050e31e4
No related branches found
No related tags found
No related merge requests found
Pipeline #59543 passed
......@@ -272,28 +272,6 @@ class EmotionalPepper(State):
def __emotions_cb(self, emotions):
self.log.info("Got emotion_s_ cb")
self.log.info(str(emotions))
# TODO: Use z-index. E.g. the person in the back looks angry
# id = emotions.id
# emotion = emotions.dominant_emotion
# self.log.info(str(emotions))
# # New person!
# if id not in self.people:
# self.say(f"Oh wow, a new person. I'll remember you as {id}")
# self.people[id] = Person(id, emotion)
# self.trigger_ask_for_name()
# else: # Known person!
# time_to_say_hello = self.people[id].time_since_or_create("greet", 20)
# self.log.info(f"Time to say hello: {time_to_say_hello}")
# if self.people[id].is_forgotten or (time_to_say_hello and self.people[id].time_since_or_create("seen", 20)):
# self.say(f"Nice to see you {id}")
# self.people[id].feel(emotion)
# self.people[id].seen()
# # TODO: Move this to the enter of ask_for_name and put it in the else above
# if self.people[id].new_emotion:
# self.trigger_analyze_emotion(emotion={"id": emotions.id, "emotion": emotions.dominant_emotion})
def __nlp_emotion_cb(self, emotions):
emotion = emotions.dominant_emotion
......@@ -310,17 +288,10 @@ class EmotionalPepper(State):
self.log.info("\t".join(s_lst))
self.fh_nlp.write("\t".join(s_lst))
self.fh_nlp.write("\n")
return
self.new_nlp_emotion = True
self.nlp_emotion = dominant
# TODO: May not be a good idea to send unknown id
self.trigger_analyze_emotion(emotion={"id": -1, "emotion": dominant})
def __dialogflow_cb(self, dialogflow_msg):
lst = [time.time() - self.start_time, dialogflow_msg.recognized_text]
s_lst = [str(s) for s in lst]
self.log.info("\t".join(s_lst))
self.fh_df.write("\t".join(s_lst))
self.fh_df.write("\n")
class StateMachineNode(Node):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment