When you run this behavior, the robot will track your face and estimate your age!
(Choregraphe file available to download at the end of this article)
- Drag and drop the Movement -> Motors -> WakeUp box onto the Flow Diagram panel.
- Connect its input to the diagram input.
Test : The robot stands up.
- Drag and drop the Sensing -> Vision -> Surroundings -> Basic Awareness box onto the Flow Diagram panel.
- Connect its input to the output of the WakeUp box.
- Click on its parameter button.
Deselect all stimuli but the People Stimulus.
Test : The robot only tracks human faces, but no sounds, movements etc.
- Drag and drop the Sensing -> Human Understanding -> Get Age box onto the Flow Diagram panel.
- Connect its input to the Human Tracked output of the Basic Awareness box.
- The robot tries to estimate the age of the person in front of him.
- Drag and drop the Speech -> Creation -> Say Text box onto the Flow Diagram panel.
- Connect its input to the onStopped output of the Get Age box.
- Double click on the Say Text box and replace line 27 of the python code with: sentence += “You look like you are %s years old” % str(p)
Test : Depending on the estimated age the robot will say: “You look like you are {age} years old”
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article