-
Notifications
You must be signed in to change notification settings - Fork 0
/
speakwithMove.cpp
31 lines (25 loc) · 965 Bytes
/
speakwithMove.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// http://doc.aldebaran.com/1-14/dev/python/making_nao_move.html
// http://doc.aldebaran.com/1-14/dev/naoqi/index.html#naoqi-blocking-non-blocking
#include <iostream>
#include <alerror/alerror.h>
using namespace std;
int main(int argc, char* argv[]) {
string robotIP = "192.168.1.88";
AL::ALMotionProxy motion(robotIP, 9559);
AL::ALTextToSpeechProxy tts(robotIP, 9559);
//------------Moving------------//
motion.moveInit();
int id;
/*
* calling the function on the post attribute make the behavior executing in the background.
* Every proxy you create has an attribute named ‘post’ that you can use to call long methods in the background.
* making the calling unblocking (done in parallel)
*/
id = motion.post.move(0.5,0,0);
if (motion.isRunning(id))
cout << " is running " <<endl;
else
cout<< " stopped" << endl;
//------------Talking------------//
tts.say("I am walking right now please don't interrupt me");
}