emotion API examples

Following listing presents how to use features of the robot's emotion modules using robot structure.

//utilizing robot emotional system is very easy, we simply call different emotional attractors and check how it affects robot emotional state
robot.network.weather.Get();//we get weather forecast 
robot.emotion.attractor.Weather();//the weather forecast influences robot's mood
var tmp_emot = robot.emotion.Get(); //now we check the current robot emotion - vector with name and intensity (1-3) of emotion
echo("Emotion: "+ tmp_emot[0] + ", intensity: " + tmp_emot[1]);
//after calling new atractor we can do it again
robot.emotion.attractor.ActBored(5);//nothing happens robot get bored
tmp_emot = robot.emotion.Get(); //we read emotion again
echo("Emotion: "+ tmp_emot[0] + ", intensity: " + tmp_emot[1]);



EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.9.2, 23.11.2017

FLASH Documentation