Robot is not responsive during behavior

380 views Asked by At

I have made one behavior that's purpose is to display some html page on the tablet. But when I run this behavior my robot is not responsive and I can't have a conversation with it. I don't have absolutely no idea why is this. The behavior is interactive and it is added to the default behaviors.

Edited Added Choreographe project Scheme

Choreographe project view

About the problem to display main html page on boot. How to make an HTML page to be shown when Pepper boots

2

There are 2 answers

0
JLS On BEST ANSWER

There is a software way to start collaborative dialog: ALDialog.runDialog()

So you can just create a box with the following code:

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
1
Nerus On

Your issue lies in the fact that only one interactive behavior can be up and running at a time. So if you launch your behavior, then 'run_dialog_dev' has to be stopped, which means the dialog engine gets unsubscribed and so the robot is not listening anymore.

There is no system-provided way to use collaborative dialogs as part of your application. If you want to use the dialog topic you created you can use a dialog box linked to it in your "Choregraphe project Scheme" to launch the dialog and load the topic.