1

I just have started working with the NAO robot with the C++ SDK. I would like to use NAO as a presenter like in front of a small group or classrooms as lecturers. At the same time I want NAO to control the slide presentation of a laptop (e.g. with Powerpoint). I tried to look for some solutions and heard about making the presentation as a "webpage", and use "qimessaging" to communicate with NAO. Like I said I just started programing on the NAO. Can anyone give me some advice with the webpage/ qimessaging solution or does anyone have another way to program it?

Thank you in advance.

noudels
  • 11
  • 3

1 Answers1

0

Sure, that's totally buildable on NAO; basically have a webpage hosted on the robot, that uses QiMesssaging Javascript to communicate with the robot, and then show that in fullscreen page on your screen.

To build that you could start with the robot-jumpstarter template service-webpage-nao (specifically made for working on NAOqi 2.1 - if you're in 2.8 (on NAO v6) the other templates should work too); which contains a Python service that has two-way communciation with the associated webpage.

You could then change that service to contain your lecture contents, for example by having it set an ALMemory key containing the current page status (image / text to show), and then have the javascript watch that ALMemory key and update the page based on that (you don't need the two-way communication, as you shouldn't have buttons etc.). The example is in Python, but you could do the same with C++ (it will require more work, I don't really recommend it for a simple use case like that).

(You don't even need a service, you could do that from Choregraphe, but I find standalone Python more readable)

Emile
  • 2,946
  • 2
  • 19
  • 22
  • I start with the installation of jumpstarter and I also created a project. But where and how should I begin. I'm not so familiar with javascript. Could you give me an advice, how I set an ALMemory key containing the page? – noudels Dec 06 '18 at 07:17
  • Well, you will need to either do your slides in powerpoint (and find a way of connecting that to the robot), or in html (in which case you will need to know how to make them as webpages - just making a series of image is one possibility - and use javascript for the transitions). – Emile Dec 06 '18 at 10:00
  • But basically you could use an ALMemory key "MySlides/Page", and assign it the values "page1", "page2", "page3" in Python (e.g. with self.events.set("MySlifes/Page", "page1"), or with the ALMemory API), and then subscribe to that in js with RobotUtils.subscribeToALMemoryEvent( "MySlides/Page", callback), and in your callback change the page. That will require knowing a bit of javascript. – Emile Dec 06 '18 at 10:02