【发布时间】:2019-08-28 13:34:13
【问题描述】:
如果我告诉Pepper 的单词(从对话框外部保存)在列表中(创建为字符串,并从 Matlab 中的 SSH 保存到 ALMemory)中,我必须检查 Python 框,如果是或不是,做某事。 我该怎么做?
def onInput_onStart(self):
#self.onStopped() #activate the output of the box
picklist = ALProxy("ALMemory")
list=picklist.getData("myFood")
def food(self):
if food in list:
tts=ALProxy("ALDialog")
tts.say("Available")
【问题讨论】:
-
您的代码看起来差不多。你有任何错误吗?
-
是的,机器人不会告诉'Available'