iCub-main
faceExpressions

Start the face expression.

+ Collaboration diagram for faceExpressions:

Start the face expression.

Description

Contains scripts to run the face expressions. At the moment only runs locally.

Dependencies

None.

Instantiated Modules

./conf/emotions.ini: parameters passed to the emotionInterface module to run expressions on "classic" iCub.
./conf/emotions_rfe.ini: parameters passed to the emotionInterface module to run expressions on iCub mounting the rfe board.
./conf/serialport.ini: parameters passed to the serial device.
uint8_t board
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
grid on
Definition: show_eyes_axes.m:5

How to run the Application

Run and execute through yarpmanager .

There are two applications:

Now from any machine you can rpc to the port "/icub/face/emotions/in" and send high level commands. Be aware that some commands are only available on the latest robots mounting the RFE board.

help to display this message
set <part> <emotion> set a specific emotion for a defined part
the available parts are: mou, eli, leb, reb, all
the available emotions are: neu, hap, sad, sur, ang, evi, shy, cun
set col <color> set the color of the led
!! available only for rfe board !!
the available colors are: black, white, red, lime, blue, yellow, cyan, magenta, silver, gray, maroon, olive, green, purple, teal, navy
set brig <brig> set the brightness of the leds
!! available only for rfe board !!
the brightness is defined by an integer from 0 to 5, where 0 means led off
set mask (<col_leb> <m_name_leb> <brig_leb>) (<col_reb> <m_name_reb> <brig_reb>) (<col_mou> <m_name_mou> <brig_mou>) set color, bitmask and brightness for each part(leb, reb, mou)
!! available only for rfe board !!
m_name stands for mask name and the available bitmasks can be consulted/added in faceExpressions/emotions_rfe.ini
function white
Definition: show_eyes_axes.m:3

In particular the bitmask supported are defined in the emotions_rfe.ini file as follow:

bitmask_eyebrow_emotions 4
BM_EB0 (0 4 8 12 16) //00011111h // surprised
BM_EB1 (1 5 9 13 17) //00022222h // neutral, happy, shy
BM_EB2 (2 6 10 14 18) //00044444h // sad
BM_EB3 (3 7 11 15 19) //00044444h // angry
bitmask_mouth_emotions 5
BM_M0 (6 9 10 18) //00020300h // neutral
BM_M1 (0 2 6 9 10 12 14 18) //00045645h // happy, evil
BM_M2 (4 5 6 9 10 16 17 18) //00070670h // sad
BM_M3 (1 2 3 5 7 8 11 13 14 15 17 19) //000AE9AEh // surprised
BM_M4 (4 5 6 9 10 16 17 18) //00070670h // angry

For example (6 9 10 18) means specify which that led 6, 9, 10 and 18 has to be set to on of that specific segment. The LEDs on the iCub face mounting the rfe board are arranged as follow:

Warning
Note that the enumeration is 1-based in the image but the bitmasks are 0-based
Face expressions LEDs of the iCub with RFE board

Example Instantiation of the Module

Alternatively, you can run the following bash scripts:

./cycle.sh: demonstates the face expressions, cycle randomly through a set of expressions.
./exampleTransition.sh: demonstrate color/brightness transitions supported by the rfe board.
Author
Lorenzo Natale, Alex Bernardino and Nicolò Genesio

Copyright (C) 2008 RobotCub Consortium

CopyPolicy: Released under the terms of the GNU GPL v2.0.

This file can be edited at app/faceExpressions/doc.dox