Skip to end of metadata
Go to start of metadata

You can find here a full description of the functions included in the Reeti API.

Types Defined
NameTypeDescription
ReetiPositionClassA class containing an instance of the 15 positions of the actuators of the Reeti
ReetiLedColorClassA class containing the color of the Reeti' Leds
ReetiSpeakingClassA class containing if the reeti is speaking or not
ReetiBookmarkClassA class containing the last bookmark found
ReetiPlayingClassA class containg if the reeti is playing a sequence or not
ErrorCodeEnumAn enumeration of the different Error Codes : OK, TIMEOUT, ERROR
LedEnumAn enumeration of the different leds : BOTHLED, RIGHTLED, LEFTLED
CameraEnumAn enumeration of the different cameras : RIGHTCAM, LEFTCAM

 

Constructors
FunctionsParametersReturn ValueDescription
Reeti

string _uri : IP adress of the reeti to connect to
int _port : port used (9090 by default do not change it if you are unsure of what you do

nonethe constructor used to instantiate a Reeti object
Asynchronous specific functions
FunctionsParametersReturn ValueDescription
registerCallbackPositionpositionCallback _cb: a callback function of positionCallback typevoidregister a callback in order to get the current position of the Reeti
registerCallbackLedColorledColorCallback _cb: a callback function of ledColorCallback typevoidregister a callback in order toget the current led Color of the Reeti
registerCallbackIsSpeakingisSpeakingCallback _cb: a callback function of isSpeakingCallback typevoidregister a callback in order to allow to know if the Reeti is currently speaking
registerCallbackBookMarkbookMarkCallback _cb: a callback function of bookMarkCallback typevoidregister a callback in order to allow to know when a bookmark is reached while the Reeti is talking
registerCallbackIsPlayingisPlayingCallback _cb :a callback function of isPlayingCallback typevoidregister a callback in order to allow to know if the Reeti is currently playing a sequence
unregisterPositionvoidvoidunregister the position callback
unregisterLedColorvoidvoidunregister the led position callback
unregisterIsSpeakingvoidvoidunregister the callback used to know if the reeti is talking
unregisterBookMarkvoidvoidunregister the callback to know when a bookmark is reached
unregisterIsPlayingvoidvoidunregister the callback used to know if the reeti is playing a sequence
setPoseAsync

float _neckRotat : neck rotation position (from 0 to 100)

float _neckPan : neck pan position (from 0 to 100)

float _neckTilt : neck tilt position (from 0 to 100)

float _rightLC : right lips corner position (from 0 to 100)

float  _leftLC : left lips corner position (from 0 to 100)

float _topLip : top lip position (from 0 to 100)

float  _bottomLip : bottom lip position (from 0 to 100)

float _rightEyePan : right eye pan position  (from 0 to 100)

float _rightEyeTilt : right eye tilt position (from 0 to 100)

float _leftEyePan : left eye pan position (from 0 to 100)

float _leftEyeTilt : left eye tilt position (from 0 to 100)

float _rightEyeLid : right eye lid position (from 0 to 100)

float _leftEyeLid : left eye lid position (from 0 to 100)

float _rightEar : right ear position (from 0 to 100)

float _leftEar : left ear position(from 0 to 100)

float _speed : movement speed (from 10 to 300)

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidset the position of the 15 actuators of the Reeti asynchronously
setPoseAsync

ReetiPosition _position : an instance of ReetiPosition containing the 15 positions

float _speed : movement speed (from 10 to 300)

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

voidset the position of the 15 actuators of the Reeti asynchronously
takePictureAsync

Camera _cam: the camera to use , RIGHTCAM or LEFTCAM

string _filename : the output filename

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidtake a picture with one of the reeti's camera and save it under /home/reeti/Pictures asynchronously
recordVideoAsync

Camera_cam : the camera to use , RIGHTCAM or LEFTCAM

string _filename : the output filename

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidrecord a video with one of the reeti's camera and save it under /home/reeti/Videos asynchronously
stopRecordAsync

Camera _cam : the camera to use , RIGHTCAM or LEFTCAM

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidstop the recording of the vidéo asynchronously
sayAsync

string _speech : the text to say

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidmake the reeti talk asynchronously
sayWithSynchroAsync

string _speech : the text to say

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidmake the reeti talk and move its lips asynchronously
stopSpeechAsync

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidmake the reeti stop talking asynchronously
playSequenceAsyncstring _sequence : the sequence file to play

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

 void

make the reeti play the chosen sequence asynchronously
playPoseAsync

string _pose : the pose file to play

servCallback _cb : a callback function of servCallback type

int _timeout : delay before the callback function return a timeout error if no answer from the reeti (default 15000 ms)

voidmake the reeti play the chosen pose asynchronously
Synchronous specific functions
FunctionsParametersReturn ValueDescription
setPoseSync

float _neckRotat : neck rotation position (from 0 to 100)

float _neckPan : neck pan position (from 0 to 100)

float _neckTilt : neck tilt position (from 0 to 100)

float _rightLC : right lips corner position (from 0 to 100)

float _leftLC : left lips corner position (from 0 to 100)

float _topLip : top lip position (from 0 to 100)

float _bottomLip : bottom lip position (from 0 to 100)

float _rightEyePan : right eye pan position  (from 0 to 100)

float _rightEyeTilt : right eye tilt position (from 0 to 100)

float _leftEyePan : left eye pan position (from 0 to 100)

float _leftEyeTilt : left eye tilt position (from 0 to 100)

float _rightEyeLid : right eye lid position (from 0 to 100)

float _leftEyeLid : left eye lid position (from 0 to 100)

float _rightEar : right ear position (from 0 to 100)

float  _leftEar : left ear position(from 0 to 100)

float _speed : movement speed (from 10 to 300)

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

set the position of the 15 actuators of the Reeti synchronously
setPoseSync

ReetiPosition _position : an instance of ReetiPosition containing the 15 positions

float _speed : movement speed (from 10 to 300)

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

set the position of the 15 actuators of the Reeti synchronously
takePictureSync

Camera _cam : the camera to use , RIGHTCAM or LEFTCAM

string _filename : the output filename

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

take a picture with one of the reeti's camera and save it under /home/reeti/Pictures synchronously

 

 

recordVideoSync

Camera _cam : the camera to use , RIGHTCAM or LEFTCAM

string _filename : the output filename

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

record a video with one of the reeti's camera and save it under /home/reeti/Videos synchronously
stopRecordSync

Camera _cam : the camera to use , RIGHTCAM or LEFTCAM

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

stop the recording of the vidéo synchronously
saySync

string _speech : the text to say

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

make the reeti talk synchronously
sayWithSynchroSync

string _speech : the text to say

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

make the reeti talk and move its lips synchronously
stopSpeechSyncint _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

make the reeti play the chosen sequence synchronously
playSequenceSync

string _sequence : the sequence file to play

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

make the reeti play the chosen pose synchronously
playPoseSync

string _pose : the pose file to play

int _timeout : delay before the function return false if no answer from the reeti (default 15000 ms)

returns true if the command is correctly performed

returns false if the command is not correctly performed or if a timeout happened

set the position of the 15 actuators of the Reeti asynchronously
Mutual functions
FunctionsParametersReturn ValueDescription
neckRotatfloat _pos: a float between 0 and 100voidset the rotation of the Reeti's neck to the desired value
neckPanfloat _pos: a float between 0 and 100voidset the pan of the Reeti's neck to the desired value
neckTiltfloat _pos: a float between 0 and 100voidset the tilt of the Reeti's neck to the desired value
rightLCfloat _pos: a float between 0 and 100voidset the position of the right lips corner of the Reeti to the desired value
leftLCfloat _pos: a float between 0 and 100voidset the position of the left lips corner of the Reeti to the desired value
topLipfloat _pos: a float between 0 and 100voidset the position of the top lip of the Reeti to the desired value
bottomLipfloat _pos: a float between 0 and 100voidset the position of the bottom lip of the Reeti to the desired value
rightEyePanfloat _pos: a float between 0 and 100voidset the pan of the Reeti's right eye to the desired value
rightEyeTiltfloat _pos: a float between 0 and 100voidset the tilt of the Reeti's right eye to the desired value
leftEyePanfloat _pos: a float between 0 and 100voidset the pan of the Reeti's left eye to the desired value
leftEyeTiltfloat _pos: a float between 0 and 100voidset the tilt of the Reeti's left eye to the desired value
rightEyeLidfloat _pos: a float between 0 and 100voidset the position of the Reeti's right eye lid to the desired value
leftEyeLidfloat _pos: a float between 0 and 100voidset the position of the Reeti's left eye lid to the desired value
rightEarfloat _pos: a float between 0 and 100voidset the position of the Reeti's right ear to the desired value
leftEarfloat _pos: a float between 0 and 100voidset the position of the Reeti's left ear to the desired value
setLedColor

Led _led: the led to set between LEFTLED, RIGHTLED and BOTHLED

string _color: the desired color between red, green, light green, blue, dark blue, turquoise, yellow, violet, white, stop

voidset the color of the desired led
setLedRGB

Led _led: the led to set between LEFTLED, RIGHTLED and BOTHLED

float _r: red intensity (between 0 and 1023)

float _g: green intensity (between 0 and 1023)

float _b: blue intensity (between 0 and 1023)

voidset the color of the desired led
isConnectedvoid

returns true if connected

returns false if not connected

check if the connection is still available
getLastPositionvoidreturns a ReetiPosition object containing the 15 positionsreturns the last known positions of the 15 actuators
getColorvoidreturns a string with the current color of the ledreturns the current color of the reeti's led
getLastBookmarkvoidreturns a string with the last bookmark foundreturns the last bookmark encountered in a reeti's speech
isSpeakingvoid

returns true if the reeti is speaking

returns false if not

returns if the reeti is speaking or not
isPlayingvoid

returns true if the reeti isplaying a sequence

returns false if not

returns if the reeti is playing a sequence or not

 

See the Samples in order to get more information about using the C++ API.

  • No labels