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.
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