Emys' movement is controlled by UDynamixel module. This module must be enabled in the robot configuration file. EMYS head structure can also use robot.audio.player/robot.audio.speech part of robot structure. It this case UPlayer/UPlayerNext or USpeech modules should be also enabled in the robot configuration file. If you are not going to use speech functions, these modules may stay disabled.

Robot head structure

ATTENTION!!! Using direct joint value slot (val) without trajectory generator, motor will achieve the position as fast as it can. If the goal position will be far from the current position it will sudden movements. You should avoid such situations especially in the neck joints. More safety is using Move or MoveSpeed functions which have trajectory generators.

   // absolute neck pitch joint angle value [deg.]
robot.body.neck.pitch.val;
robot.body.neck.pitch.val->rangemin;
robot.body.neck.pitch.val->rangemax;
   // move neck pitch joint on relative to neutral robot position [deg.] in time [s] using smooth trajectory
robot.body.neck.pitch.Move(position, time);
   // move neck pitch joint on relativeto neutral robot position [deg.] with speed [deg./s]
robot.body.neck.pitch.MoveSpeed(position, speed);
   // absolute head pitch joint angle value [deg.]
robot.body.neck.head.pitch.val;
robot.body.neck.head.pitch.val->rangemin;
robot.body.neck.head.pitch.val->rangemax;
   // move head pitch joint on relative to neutral robot position [deg.] in time [s] using smooth trajectory
robot.body.neck.head.pitch.Move(position, time);
   // move head pitch joint on relative to neutral robot position [deg.] with speed [deg./s]
robot.body.neck.head.pitch.MoveSpeed(position, speed);
   // absolute head yaw joint angle value [deg.]
robot.body.neck.head.yaw.val;
robot.body.neck.head.yaw.val->rangemin;
robot.body.neck.head.yaw.val->rangemax;
   // move head yaw joint on relative to neutral position [deg.] in time [s] using smooth trajectory
robot.body.neck.head.yaw.Move(position, time);
   // move head yaw joint on relative to neutral position [deg.] with speed [deg./s]
robot.body.neck.head.yaw.MoveSpeed(position, speed);
   // absolute disc joint angle value [deg.]
robot.body.neck.head.disc[up|down].val;
robot.body.neck.head.disc[up|down].val->rangemin;
robot.body.neck.head.disc[up|down].val->rangemax;
   // move disc joint on relative to neutral robot position [deg.] in time [s] using smooth trajectory
robot.body.neck.head.disc[up|down].Move(position, time);
   // move disc joint on relative to neutral robot position [deg.] with speed [deg./s]
robot.body.neck.head.disc[up|down].MoveSpeed(position, speed);
   // absolute left eyebrow joint angle value [deg.]
robot.body.neck.head.eye[left|right].brow.val;
robot.body.neck.head.eye[left|right].brow.val->rangemin;
robot.body.neck.head.eye[left|right].brow.val->rangemax;
   // move left eyebrow joint on relative to neutral robot position [deg.] in time [s] using smooth trajectory
robot.body.neck.head.eye[left|right].brow.Move(position, time);
   // move left eyebrow joint on relative to neutral robot position [deg.] with speed [deg./s]
robot.body.neck.head.eye[left|right].brow.MoveSpeed(position, speed);
 
   // absolute eyelid joint angle value [deg.]
robot.body.neck.head.eye[left|right].lid.val;
robot.body.neck.head.eye[left|right].lid.val->rangemin;
robot.body.neck.head.eye[left|right].lid.val->rangemax;
   // move eyelid joint on relative to neutral robot position [deg.] in time [s] using smooth trajectory
robot.body.neck.head.eye[left|right].lid.Move(position, time);
   // move eyelid joint on relative to neutral robot position [deg.] with speed [deg./s]
robot.body.neck.head.eye[left|right].lid.MoveSpeed(position, speed);
 
   // absolute eye translation joint angle value [deg.]
robot.body.neck.head.eye[left|right].trans.val;
robot.body.neck.head.eye[left|right].trans.val->rangemin;
robot.body.neck.head.eye[left|right].trans.val->rangemax;
   // move eye translation joint on relative to neutral robot position [deg.] 
   // in time [s] using smooth trajectory
robot.body.neck.head.eye[left|right].trans.Move(position, time);
   // move eye translation joint on relative to neutral robot position [deg.] with speed [deg./s]
robot.body.neck.head.eye[left|right].trans.MoveSpeed(position, speed);
Touch sensors
   // get analog value of touch sensor (0..2000)
robot.body.neck.head.sensor[up|left|front|right|down].val;
   // get digital value of touch sensor (0 or 1)
robot.body.neck.head.sensor[up|left|front|right|down].touch;
Simple movments

This is a basic set of movement functions, that can be use instead of every single joints Move functions. 

   // Use following function parameters
   // intensity - is based on a scale of [0..10] and defines the move intensity. 
   // time - defines the duration of action [s].
robot.body.neck.head.MoveBack(intensity,time);
robot.body.neck.head.MoveForward(intensity,time);
robot.body.neck.head.MoveLeft(intensity,time);
robot.body.neck.head.MoveRight(intensity,time);
robot.body.neck.head.MoveUp(intensity,time);
robot.body.neck.head.MoveDown(intensity,time);
robot.body.neck.head.MoveVertical(time);
robot.body.neck.head.MoveEyeClose(intensity,time);
robot.body.neck.head.MoveNo(intensity,time);
robot.body.neck.head.MoveYes(intensity,time);
 
   // move head on relative to neutral robot yaw and pitch position [deg.] in time [s] using smooth trajectory
robot.body.neck.head.MoveAt(yaw,pitch,time); // yaw <-90,90> pitch <-26,26>
   // move head on relative to neutral robot yaw and pitch position [deg.] with speed [deg./s]
robot.body.neck.head.MoveAtSpeed(yaw,pitch,time); // yaw <-90,90> pitch <-26,26>
 
   // blink right or left eye
robot.body.neck.head.eye[left|right].Blink(time);
   // open left or right disc with intensity [0..10] in time [s].
robot.body.neck.head.disc[up|down].MoveI(intensity,time);
Expressions

This set of functions can be use to express some emotions on the robot face. All of them engage only eyes and discs joints.

   // Use following function parameters
   // intensity - is based on a scale of [0..10] and defines the expression intensity. 
   // time - defines the duration of action [s].
robot.body.neck.head.ExpNormal(time); 
robot.body.neck.head.ExpSmile(intensity,time); 
robot.body.neck.head.ExpAngry(intensity,time); 
robot.body.neck.head.ExpDisgust(intensity,time); 
robot.body.neck.head.ExpSad(intensity,time); 
robot.body.neck.head.ExpSurprise(intensity,time); 
robot.body.neck.head.ExpSad(intensity,time); 
robot.body.neck.head.ExpFear(intensity,time);
Expressive behaviours

This set of functions engage almost all joints to express some emotional behaviours.

   // Use following function parameters
   // intensity - is based on a scale of [0..10] and defines the expression intensity. 
   // time - defines the duration of action [s].
robot.body.neck.head.BehaveJoy(intensity,time); 
robot.body.neck.head.BehaveAngry(intensity,time); 
robot.body.neck.head.BehaveDisgust(intensity,time); 
robot.body.neck.head.BehaveSurprise(intensity,time); 
robot.body.neck.head.BehaveSad(intensity,time); 
robot.body.neck.head.BehaveFear(intensity,time); 
robot.body.neck.head.BehaveYawn(time); 
robot.body.neck.head.BehaveNormal(time);
Background behaviours

This set of functions can be use as a backgound movement. Call this functions once will never stop until call another background function or Stop function. You should call this function with comma at the end.

    // It is a look around function, where 
   // intensity - is based on a scale of [0..10] and defines the movement intensity,
   // time - is a longest time [s] of single movement, 
   //        where the movement time will be random in range[time/2...time]
   // freq - is a integer parameter that specify how often head movement should stop, 
   //        if 0 it will be always in move.
robot.body.neck.head.ActAround(intensity,time,freq),
 
   // Call this function to emulate robot breathing, where
   // intensity - is based on a scale of [-10..10] and defines the movement intensity,
   //             in range [-10..0] both discs will be moving in the same way,
   //             in range [ 0..10] both discs will be moving contrary,
   //             set higher value if you want to express tired.
   // time - defines the duration of single disc movement: up-down period [s].
robot.body.neck.head.ActBreath(intensity,time),
 
   // This function generates head movements during walking, where
   // intensity - is based on a scale of [0..10] and defines the movement intensity,
   // time - defines the duration of single movement: back-forward period [s].
robot.body.neck.head.ActWalking(intensity,time),
 
   // This function emulate robot quaking behaviour, where
   // intensity - is based on a scale of [0..10] and defines the quake intensity,
robot.body.neck.head.ActQuake(intensity),
 
   // Call this function to generate random robot eye blinking, where
   // freq - is a longest time [s] of gap between blinks and it will be random 
   //        in range [freq/2...freq] in [s],
   // time - defines the duration of eyelid movement: close-open period [s].
robot.body.neck.head.ActBlinking(freq,time),
 
   // This function emulates robot jaw gnashing, where
   // intensity - is based on a scale of [0..10] and defines the gnashing intensity,
   // time - defines the duration of eyelid movement: up-down period [s].
robot.body.neck.head.ActGnashing(intensity,speed),
 
   // This function is a combination of: look around, breathing and blinking  functions.
   // See above for parameters description. 
robot.body.neck.head.ActAlive(A_inten, A_time, A_freq, BR_inten, BR_time, BL_frequency, BL_time); 
Speech functions

Use these functions to speaking by EMYS head. All of them use robot.audio part of structure. If you enable speech synthesies module in the robot configuration file (ex. USpeech)  the speaking function will use this module to visualize mouth movements (visems - see USpeech documentation). If no speech module will be available you can still use speaking function, but only with ready to play and visualise files (utterance.wav + utterance.vis). See example here LINK. If no robot.audio.player and robot.audio.speech will be available all speach functions stay inaccessible.

    // Use this function to say/generate yawn behaviour. 
    // It will generate yawing sound if robot.audio.player will be available.
robot.body.neck.head.SayYawn();
 
   // Use this function if you have speech synthesies module available in your audio system, where
   // "text" - utterance string,
   // intensity - is based on a scale of [0..10] and defines mouth movement intensity,
   // voice - set the voice number from enabled voices, see configuration file -> _Speech_param
robot.body.neck.head.Say("text", intensity, voice);
 
   // Use this function if you have only player module available in your audio system, where
   // "file" - path to the file without file extension, visem file must be in the same place,
   // intensity - is based on a scale of [0..10] and defines mouth movement intensity,
robot.body.neck.head.SayFile("path/to/file", intensity);
Stop all movements
 robot.body.neck.head.Stop;

 

 

 

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

FLASH Documentation