You can find here a full description of the functions included in the Reeti API.
Types Defined
Name | Type | Description |
---|---|---|
ReetiPosition | Class | A class containing an instance of the 15 positions of the actuators of the Reeti |
ReetiLedColor | Class | A class containing the color of the Reeti' Leds |
ReetiSpeaking | Class | A class containing if the reeti is speaking or not |
ReetiBookmark | Class | A class containing the last bookmark found |
ReetiPlaying | Class | A class containg if the reeti is playing a sequence or not |
ErrorCode | Enum | An enumeration of the different Error Codes : OK, TIMEOUT, ERROR |
Led | Enum | An enumeration of the different leds : BOTHLED, RIGHTLED, LEFTLED |
Camera | Enum | An enumeration of the different cameras : RIGHTCAM, LEFTCAM |
Constructors
Function | Parameters | Return Value | Description |
---|---|---|---|
Reeti | string _uri : IP adress of the reeti to connect to | none | the constructor used to instantiate a Reeti object |
Asynchronous specific functions
Function | Parameters | Return Value | Description |
---|---|---|---|
registerCallbackPosition | positionCallback _cb: a callback function of positionCallback type | void | register a callback in order to get the current position of the Reeti |
registerCallbackLedColor | ledColorCallback _cb: a callback function of ledColorCallback type | void | register a callback in order toget the current led Color of the Reeti |
registerCallbackIsSpeaking | isSpeakingCallback _cb: a callback function of isSpeakingCallback type | void | register a callback in order to allow to know if the Reeti is currently speaking |
registerCallbackBookMark | bookMarkCallback _cb: a callback function of bookMarkCallback type | void | register a callback in order to allow to know when a bookmark is reached while the Reeti is talking |
registerCallbackIsPlaying | isPlayingCallback _cb :a callback function of isPlayingCallback type | void | register a callback in order to allow to know if the Reeti is currently playing a sequence |
unregisterPosition | void | void | unregister the position callback |
unregisterLedColor | void | void | unregister the led position callback |
unregisterIsSpeaking | void | void | unregister the callback used to know if the reeti is talking |
unregisterBookMark | void | void | unregister the callback to know when a bookmark is reached |
unregisterIsPlaying | void | void | unregister 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) | void | set 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) | void | set 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) | void | take 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) | void | record 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) | void | stop 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) | void | make 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) | void | make 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) | void | make the reeti stop talking asynchronously |
playSequenceAsync | string _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) | void | make the reeti play the chosen pose asynchronously |
Synchronous specific functions
Functions | Parameters | Return Value | Description |
---|---|---|---|
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 |
stopSpeechSync | 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 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
Functions | Parameters | Return Value | Description |
---|---|---|---|
neckRotat | float _pos: a float between 0 and 100 | void | set the rotation of the Reeti's neck to the desired value |
neckPan | float _pos: a float between 0 and 100 | void | set the pan of the Reeti's neck to the desired value |
neckTilt | float _pos: a float between 0 and 100 | void | set the tilt of the Reeti's neck to the desired value |
rightLC | float _pos: a float between 0 and 100 | void | set the position of the right lips corner of the Reeti to the desired value |
leftLC | float _pos: a float between 0 and 100 | void | set the position of the left lips corner of the Reeti to the desired value |
topLip | float _pos: a float between 0 and 100 | void | set the position of the top lip of the Reeti to the desired value |
bottomLip | float _pos: a float between 0 and 100 | void | set the position of the bottom lip of the Reeti to the desired value |
rightEyePan | float _pos: a float between 0 and 100 | void | set the pan of the Reeti's right eye to the desired value |
rightEyeTilt | float _pos: a float between 0 and 100 | void | set the tilt of the Reeti's right eye to the desired value |
leftEyePan | float _pos: a float between 0 and 100 | void | set the pan of the Reeti's left eye to the desired value |
leftEyeTilt | float _pos: a float between 0 and 100 | void | set the tilt of the Reeti's left eye to the desired value |
rightEyeLid | float _pos: a float between 0 and 100 | void | set the position of the Reeti's right eye lid to the desired value |
leftEyeLid | float _pos: a float between 0 and 100 | void | set the position of the Reeti's left eye lid to the desired value |
rightEar | float _pos: a float between 0 and 100 | void | set the position of the Reeti's right ear to the desired value |
leftEar | float _pos: a float between 0 and 100 | void | set 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 | void | set 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) | void | set the color of the desired led |
isConnected | void | returns true if connected returns false if not connected | check if the connection is still available |
getLastPosition | void | returns a ReetiPosition object containing the 15 positions | returns the last known positions of the 15 actuators |
getColor | void | returns a string with the current color of the led | returns the current color of the reeti's led |
getLastBookmark | void | returns a string with the last bookmark found | returns the last bookmark encountered in a reeti's speech |
isSpeaking | void | returns true if the reeti is speaking returns false if not | returns if the reeti is speaking or not |
isPlaying | void | returns true if the reeti isplaying a sequence returns false if not | returns if the reeti is playing a sequence or not |