2 posts / 0 new
Last post
Last seen: 4 days 8 hours ago
Joined: August 25, 2017
retrieve memory data in web app JS

I'm programming an app for the Aldebaran's Pepper robot. I'm using Choregraphe and I made a web app for displaying 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,

Last seen: 5 hours 35 min ago
Joined: March 5, 2017

Make sure you have a session with the robot and try something likeself.memory.raiseEvent(self.getParameter("key"), x)then, send the variable to your created memory event perhaps?