expressive behaviours

FlashBehaviour.u contains various robot competencies, which are more complex behaviors based on one or many his low level modules. The following listings shows some examples of FLASH behaviors

Adding new behaviours

New behaviour must be added to the FlashBehaviour.u file as a urbiscript function:

function b_RBehaveHappy()
{
    robot.body.arm.MoveSideSide(1.5)&
   {
      robot.body.neck.head.BehaveJoy(10,1.5);
   } & {
      robot.body.neck.head.MoveLeft(3,0.5);
      robot.body.neck.head.MoveRight(2,0.3);
      robot.body.neck.head.MoveLeft(2,0.2);
      robot.body.neck.head.MoveRight(3,0.5);
      robot.body.neck.head.MoveLeft(1,0.3);
      robot.body.neck.head.MoveRight(1,0.5);
      robot.body.neck.head.MoveRight(0,0.5);
   };
};
 
 
function b_RBehaveSad(){
    robot.body.arm.hand.MoveClose(4,3)&
    robot.body.arm.MoveCenterDow(3),
    robot.body.neck.head.BehaveSad(10,3);
};
 
 
function b_RBehaveFear(){
    robot.body.arm.hand.MoveClose(4,2)&
    robot.body.arm.MoveCenterUp(2),
    sleep(1);
    robot.body.neck.head.BehaveFear(10,3);
};
 
 
function b_RBehaveDisgust() {
    robot.body.arm.hand.MoveClose(4,3)&
    robot.body.arm.MoveCenterDown2(3),
    sleep(1);
    robot.body.neck.head.BehaveDisgust(10,3);
};
 
 
function b_RBehaveSurprise() {
    robot.body.arm.hand.MoveOpen(1)&
    robot.body.arm.MoveSideSide(1),
    robot.body.neck.head.BehaveSurprise(10,3);
};
 
 
function b_RBehaveAngry() {
  robot.body.arm.hand.MoveClose(10,2)&
    robot.body.arm.MoveCenterUpper(2)&
    robot.body.neck.head.BehaveAngry(10,2);
    sleep(1);
};
 
 
function b_RBehaveNormal() {
    robot.body.arm.hand.MoveClose(4,2)&
    robot.body.neck.head.BehaveNormal(2)&
    robot.body.arm.MoveCenterDown(2);
};

and to the robot competency structure

 do (robot.competency) {
    // EXPRESSIVE BEHAVIOURS  
    function Emotion(_time)         {call.b_REmotion(_time);};
    function BehaveHappy()         {call.b_RBehaveHappy();};
    function BehaveSad()         {call.b_RBehaveSad();};
    function BehaveFear()         {call.b_RBehaveFear();};
    function BehaveDisgust()         {call.b_RBehaveDisgust();};
    function BehaveSurprise()         {call.b_RBehaveSurprise();};
    function BehaveAngry()         {call.b_RBehaveAngry();};
    function BehaveNormal()         {call.b_RBehaveNormal();};
};

 

 

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

FLASH Documentation