How to make an HTML page to be shown when Pepper boots

試著忘記壹切 提交于 2019-12-04 16:03:40

问题


I have a behavior which purpose is to show an HTML page (hosted on the robot). I want that behavior to be loaded on boot and that HTML page to be shown on the Pepper's tablet when Pepper is booted.

I have added it to the robot default behaviors but that doesn't do the trick. It shows me that this behavior is running, that it is in the default behaviors but the HTML page is not shown. Just to make it clear when this behavior is not running and I trigger it, it works as it is intended - I mean the problem is not in the HTML code.


回答1:


It might be that your behavior is started before the AutonomousLife service or before ALTabletService is ready. This is possible with default behaviors. In your code you need to wait for those 2 to be ready otherwise:

  • if ALTabletService is not ready, your code will just do nothing
  • if ALAutonomousLife starts after your app, it will reset the tablet so your page will be hidden.

The best solution is probably to not add it as a default behavior, but edit the app properties and set this behavior as a "solitary" activity, and use a "launch trigger condition" that is always true, like "1".

In that case, as soon as Pepper doesn't have any interactive behavior to start, it will run yours (so it will display the webpage). Also with this solution you ensure that all other services are ready before your behavior is started.

More info in the documentation about how to create solitary activites and launch trigger conditions.



来源:https://stackoverflow.com/questions/45812833/how-to-make-an-html-page-to-be-shown-when-pepper-boots

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!