0

有没有办法同时执行多个应用程序或我的一个应用程序调用另一个应用程序。例如,假设我有一个应用程序,那只是一个对话框。我的机器人上也安装了基本语音(http://doc.aldebaran.com/2-1/nao/basic_channel_conversation.html )。

  1. 有没有办法让我的机器人能够同时使用基本语音中定义的短语和我的应用程序中定义的短语?

  2. 有没有办法让我的应用程序在不退出我的应用程序的情况下调用这个基本演讲

  3. 有没有办法运行我并行创建的多个应用程序?

目前,当我的应用程序运行时,Pepper 听不懂基本语音中的任何内容,但我想使用它,因为我喜欢它。

4

2 回答 2

2

使用行为管理器从您的主应用程序中运行其他应用程序。 http://doc.aldebaran.com/2-5/naoqi/core/albehaviormanager.html

例如

self.behaviorManager = self.session.service("ALBehaviorManager")
self.behaviorManager.runBehavior("System/animations/Stand/Reactions/SeeSomething_1")

因此,当检测到人类时,您可能需要调用 runBehavior("usr/run_dialog_dev")。

于 2017-08-10T20:58:48.890 回答
1

Is there a way my robot to be able to use the defined phrases in the basic speech and the phrases defined in my application simultaneously?

If you want to add your sentences to the basic speech, you can use collaborative dialogs and even start your app on demand with the command ^switchFocus(my-app/my-behavior). All topics (from all apps) that are defined as "collaborative dialogs" will be loaded when the "basic speech" starts. Be careful that only the topic is started, not the app it comes from!

Is there a way my application to call this basic speech without quiting my application

You can use ALDialog.runDialog (doc here) but you need to think how to go back and forth between your application topic and the basic general topics.

Example: when Pepper wants to present different products, what happens after you ask "What time is it?", the robot answers and is now off-topic, but then what? you will need to find a way to drive the user back into topic!

Is there a way to run multiple application I have created in parallel?

runBehavior will do the trick yes, but be careful that the concurrent behaviors won't make the robot do two things at the same time (movements for example). A better architecture would be to have a collaborative dialog that switches focus to the right application to answer, then goes back to the general basic speech.

于 2017-08-17T17:39:20.627 回答