Search code examples
javascriptpythonnao-robotpepper

Screen share Pepper's tablet


How can I share the screen of Pepper's tablet? I wish to show the content displayed on the tablet on a projector so that it is engaging a larger audience. Is there any way to access it using the Java or Python SDK?


Solution

  • Yes, I often do that.

    One way of doing so in NAOqi 2.5:

    • Make a webpage for your tablet content, formatted so that it looks good both on Pepper's tablet and in a browser window (so you need to use responsive design). See this, for example, on how to build a project with a basic webpage.
    • Store your state on the robot-side, e.g. in a python script / service; and the webpage should just be a watcher of that state (e.g. subscribe to a signal on a service, or to an ALMemory key). If you have buttons on the webpage, they should not directly change the display, but rather notify the python, which will in turn update the state which will update the webpage.
    • When running the application, display it on the tablet on usual AND with a web browser, open http://your-robots-ip/apps/your-app-id/, and put it in full sceen.

    Et voilà! You should have a nice synchronized display on the tablet and the screen!