Reeti
 All Classes Functions Variables Groups Pages
Public Member Functions | Public Attributes | List of all members
UReetiHead Class Reference

Driver to the low level part of Reeti: 15 motors, 2 LEDs, 3 tactile sensors. More...

#include <UReetiHead.h>

Inherits UObject.

Public Member Functions

void neutralPosition (void)
 Set all motors on their neutral position ( ~= middle position) More...
 
void moveTo (double value)
 Move all motors to the same value. More...
 
void moveAll (double v1, double v2, double v3, double v4, double v5, double v6, double v7, double v8, double v9, double v10, double v11, double v12, double v13, double v14, double v15)
 Move all motors to a specific position. More...
 
void moveLips (int _numChar)
 Move automatically Reeti lips (usefull when Reeti is speaking) More...
 
int stopServo ()
 Stop all the motors. More...
 
void changeLedColor (string col)
 change the color of all leds to 'col' More...
 
void changeColor (int ledIndex, string col, double intensity)
 Change led color with a specific color and intensity. More...
 
void changeLedColorRGB (int ledIndex, int _red, int _green, int _blue, double intensity)
 Change led color with a specific color and intensity. More...
 
bool isTactileSensorTouched (int sensorIndex)
 Check if the specified tactile sensor is currently touched. More...
 

Public Attributes

UVar neckRotat
 
UVar neckTilt
 
UVar neckPan
 
UVar leftLC
 
UVar rightLC
 
UVar topLip
 
UVar leftEar
 
UVar rightEar
 
UVar rightEyeLid
 
UVar rightEyeTilt
 
UVar rightEyePan
 
UVar leftEyeLid
 
UVar leftEyeTilt
 
UVar leftEyePan
 
UVar bottomLip
 
UVar color
 
UVar leftCheek
 
UVar rightCheek
 
UVar nose
 
urbi::UClient * client
 

Detailed Description

Driver to the low level part of Reeti: 15 motors, 2 LEDs, 3 tactile sensors.

Date
December 04, 2014
Author
cho
Version
2.8.0

Use

the UReetiHead object is instantiated during init in the following way :

Member Function Documentation

void UReetiHead::neutralPosition ( void  )

Set all motors on their neutral position ( ~= middle position)

Parameters
none
Returns
none
void UReetiHead::moveTo ( double  value)

Move all motors to the same value.

Parameters
valuenew value to set on all motors (must be between 0 and 100)
Returns
none
void UReetiHead::moveAll ( double  v1,
double  v2,
double  v3,
double  v4,
double  v5,
double  v6,
double  v7,
double  v8,
double  v9,
double  v10,
double  v11,
double  v12,
double  v13,
double  v14,
double  v15 
)

Move all motors to a specific position.

Parameters
vXnew value to set on motor at position X (must be between 0 and 100)
neckRotat= v1;
neckTilt= v2;
neckPan= v3;
leftLC= v4;
rightLC= v5;
topLip= v6;
bottomLip= v7;
rightEar= v8;
leftEar= v9;
rightEyeTilt= v10;
leftEyeTilt= v11;
rightEyePan= v12;
leftEyePan= v13;
rightEyeLid= v14;
leftEyeLid= v15;
Returns
none
void UReetiHead::moveLips ( int  _numChar)

Move automatically Reeti lips (usefull when Reeti is speaking)

Parameters
_numCharnumber of characters that reeti will say. (Needed to know how much time it will take)
Returns
none
int UReetiHead::stopServo ( )

Stop all the motors.

Parameters
none
Returns
0 if success
void UReetiHead::changeLedColor ( string  col)

change the color of all leds to 'col'

Parameters
colcolor name among (red, green, light green, blue, dark blue, turquoise, yellow, violet, white)
Returns
nothing (void)
void UReetiHead::changeColor ( int  ledIndex,
string  col,
double  intensity 
)

Change led color with a specific color and intensity.

Parameters
ledIndex0 = All Led, 1 = Led1 ....
colcolor name among (red, green, light green, blue, dark blue, turquoise, yellow, violet, white)
intensitylight intensity. Value must be between 0 and 1.
Returns
nothing returned
void UReetiHead::changeLedColorRGB ( int  ledIndex,
int  _red,
int  _green,
int  _blue,
double  intensity 
)

Change led color with a specific color and intensity.

Parameters
ledIndex0 = All Led, 1 = Led1 ....
_redRed value ( between [0;1023])
_greenGreen value ( between [0;1023])
_blueBlue value ( between [0;1023])
intensitylight intensity. Value must be between 0 and 1.
Returns
nothing returned
bool UReetiHead::isTactileSensorTouched ( int  sensorIndex)

Check if the specified tactile sensor is currently touched.

Parameters
sensorIndexnumber of corresponding sensor
1–> unsused
2–> left cheek
3–> right cheek
4–> nose
Returns
TRUE if sensor is touched, otherwise FALSE

Member Data Documentation

UVar UReetiHead::neckRotat

UVar for the neckrotate position

UVar UReetiHead::neckTilt

UVar for the neckTilt position

UVar UReetiHead::neckPan

UVar for the neckPan position

UVar UReetiHead::leftLC

UVar for the left comissure position

UVar UReetiHead::rightLC

UVar for the right comissure position

UVar UReetiHead::topLip

UVar for the top lip position

UVar UReetiHead::leftEar

UVar for the left ear position

UVar UReetiHead::rightEar

UVar for the right ear position

UVar UReetiHead::rightEyeLid

UVar for the right eye lid position

UVar UReetiHead::rightEyeTilt

UVar for the right eye tilt position (vertical)

UVar UReetiHead::rightEyePan

UVar for the right eye pan position (horizontal)

UVar UReetiHead::leftEyeLid

UVar for the left eye lid position

UVar UReetiHead::leftEyeTilt

UVar for the left eye tilt position (vertical)

UVar UReetiHead::leftEyePan

UVar for the left eye pan position (horizontal)

UVar UReetiHead::bottomLip

UVar for the bottom lip position

UVar UReetiHead::color

UVar for changing the cheeks color

UVar UReetiHead::leftCheek

UVar for left cheek tactile sensor

UVar UReetiHead::rightCheek

UVar for right cheek tactile sensor

UVar UReetiHead::nose

UVar for nose tactile sensor

urbi::UClient* UReetiHead::client

Urbi client for communicating with the server. Must be initialized as follow : client=new urbi::UClient(IP, _port); with

  • IP = IP adress of Reeti
  • _port = 54001