2017-08-30 26 views
3

我做了一個行爲,目的是在平板電腦上顯示一些html頁面。但是當我運行這種行爲時,我的機器人沒有響應,我無法與它進行對話。我不完全不知道這是爲什麼。該行爲是交互式的,它被添加到默認行爲中。行爲期間機器人沒有響應

編輯新增Choreographe項目計劃

Choreographe project view

關於在引導顯示HTML主頁的問題。 How to make an HTML page to be shown when Pepper boots

+1

可以共享Choregraphe方案? (箱子) – albert

+0

當你說與機器人的對話時,我想你想說的是「自治的生活」 – albert

+0

@albert是的,我也做了我自己的對話框,它由基本通道的'run_dialog_dev'運行。 –

回答

2

有一種軟件的方式開始合作對話:ALDialog.runDialog()

所以你可以創建具有以下代碼框:

class MyClass(GeneratedClass): 
    def __init__(self): 
     GeneratedClass.__init__(self) 

    def onLoad(self): 
     self.dialog = self.session().service("ALDialog") 

    def onUnload(self): 
     self.dialog.stopDialog() 

    def onInput_onStart(self): 
     self.dialog.runDialog() 
     #self.onStopped() #activate the output of the box 

    def onInput_onStop(self): 
     self.onUnload() #it is recommended to reuse the clean-up as the box is stopped 
     self.onStopped() #activate the output of the box 
2

您的問題在於,一次只能啓動和運行一個交互式行爲。所以,如果你啓動你的行爲,那麼'run_dialog_dev'必須被停止,這意味着對話引擎得到退訂,所以機器人不再聽。

沒有系統提供的方式將協作對話框用作應用程序的一部分。如果要使用創建的對話框主題,可以使用「Choregraphe項目方案」中鏈接的對話框啓動對話框並加載主題。

+0

有一種軟件方法來啓動協作對話框:ALDialog.runDialog() – JLS