Start the face expression.
Start the face expression.
Description
Contains scripts to run the face expressions. At the moment only runs locally.
Dependencies
None.
Instantiated Modules
- emotionInterface
- serial device through yarpdev
./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.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
How to run the Application
Run and execute through yarpmanager .
There are two applications:
- Face Expressions (faceExpressions.xml). This can run out of the box, since it assumes you have a pc104 and a real iCub.
- FaceSim (faceExpressionsSim.xml). This is the equivalent application to be used with the robot simulator.
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
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)
BM_EB1 (1 5 9 13 17)
BM_EB2 (2 6 10 14 18)
BM_EB3 (3 7 11 15 19)
bitmask_mouth_emotions 5
BM_M0 (6 9 10 18)
BM_M1 (0 2 6 9 10 12 14 18)
BM_M2 (4 5 6 9 10 16 17 18)
BM_M3 (1 2 3 5 7 8 11 13 14 15 17 19)
BM_M4 (4 5 6 9 10 16 17 18)
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