Pepper启动时如何显示HTML页面 [英] How to make an HTML page to be shown when Pepper boots

查看:171
本文介绍了Pepper启动时如何显示HTML页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个行为,目的是显示一个HTML页面(驻留在机器人上).我希望在启动时加载该行为,并在启动Pepper时在Pepper的平板电脑上显示该HTML页面.

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.

我已将其添加到机器人的默认行为中,但这并不能解决问题.它向我显示此行为正在运行,它是默认行为,但未显示HTML页面.只是为了弄清楚何时这种行为没有运行并且我触发了它,它可以按预期的方式工作-我的意思是问题不在HTML代码中.

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.

推荐答案

可能是您的行为是在AutonomousLife服务之前或ALTabletService准备好之前启动的.对于默认行为,这是可能的.在您的代码中,您需要等待这2个代码准备就绪,否则:

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:

  • 如果ALTabletService尚未准备好,您的代码将什么都不做
  • 如果ALAutonomousLife在您的应用程序之后启动,它将重置平板电脑,因此您的页面将被隐藏.

最好的解决方案可能是不将其添加为默认行为,而是编辑应用程序属性并将此行为设置为单独"活动,并使用始终为true的启动触发条件",例如"1" .

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

在这种情况下,Pepper没有任何互动行为要开始时,它将运行您的(因此它将显示网页).同样,使用此解决方案,您可以确保在开始行为之前所有其他服务均已准备就绪.

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.

文档中有关如何创建单独的活动启动触发条件.

这篇关于Pepper启动时如何显示HTML页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆