Tutorial - Face Characteristics - Get Expression
Print
Modified on: Thu, 12 May, 2022 at 11:30 AM
![no-virtual](https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80103479943/original/E1s9v4SYgwisc785JveJFDmMN2lWFTJ2zA.png?1652347167) | Cannot be tested on a simulated robot
|
When you run this behavior, the robot will track your face and tell you the expression it could detect on your face !
In this behavior the robot is only able to identify the facial expression of one person at a time.
- 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.
| ![../../../_images/awareness_param.png](https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80103472864/original/dLWc5tuCAoBxLtmPUU6qY-7S_U3rJs4nQQ.png?1652346554) |
- Test -> The robot only tracks human faces, but no sounds, movements etc.
|
- Drag and drop the Sensing > Human Understanding > Get Expression box onto the Flow Diagram panel.
- Connect its input to the Human Tracked output of the Basic Awareness box.
| ![../../../_images/chore_get_expression1.png](https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80103473706/original/UXkkDeCLe3KQ9U6al59ZRibRENPYoh4KgA.png?1652346622) |
- Test -> The robot tries to identify the facial expression of the person in front of him.
|
- Drag and drop the Programming > Logic > Switch Case box onto the Flow Diagram panel.
- Connect its input to the onStopped output of the Get Expression box.
- Remove all existing cases from the Switch Case box and add the cases “happy”, “surprised”, “angry”, “sad” and “neutral”.
- Test -> When the robot detected a facial expression, the Switch Case box triggers the corresponding output.
|
- Drag and drop 5 Speech > Creation > Animated Say boxes onto the Flow Diagram panel.
- Connect each of them with one of the grey outputs of the Switch Case box.
- Double click on one of the Animated Say boxes and adjust the text in the Localized Text box as desired. Repeat this procedure for the other 4 Animated Say boxes.
| ![../../../_images/chore_get_expression2.png](https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80103476817/original/KDDqso901ieMmRLIQga6FdnaOy2ahcbv4Q.png?1652346898) |
- Test -> Depending on which Animated Say box was triggered by the Switch Case box, the robot says what is written in the inner Localized Text box.
|
Did you find it helpful?
Yes
No
Send feedback Sorry we couldn't be helpful. Help us improve this article with your feedback.