I'm programming an app for the Aldebaran's Pepper robot. I'm using Choregraphe and I made a web app to display in robots tablet. I am trying to pass on a variable from Pepper's behavior to the web app javascript.
My idea was to insert a key, data pair in Pepper's memory with a default insertData box, and then to load the app and retrieve it from memory there. The javascript code would look something like this.
var session = new QiSession();
var memory;
session.service("ALMemory").then(function(m) {
memory = m;});
var data = memory.getData('key')
I think it is close to working, but it's not quite there yet. Any ideas?
What is in general the best way to pass a variable to javascript?
Kind regards,
(This question is similar to this one, but my approach is different and I was asked to create a new one.)
Make sure everything is done as callbacks, as each NAOqi function gives you futures.
See doc here.