How to make Nao robot execute functions one after the other? This makes everything happen at same time:
session.service("ALTextToSpeech").done(function (tts) {
tts.say("Hello world.");
}).fail(function (error) {
console.log("An error occurred:", error);
});
session.service("ALBehaviorManager").done(function (behavior) {
behavior.runBehavior("Stand/Emotions/Positive/Winner_1");
}).fail(function (error) {
console.log("An error occurred:", error);
});
Thank you for help!