NAO & Pepper 機器人 python 環境下開發筆記

環境不多說了Choregraph+Naoqi sdk for python

一些常用且重要的函數方法:

ALProxy is an object that gives you acces to all the methods or the module your are going to connect to.

class ALProxy(name, ip, port)
    name - The name of the module
    ip - The IP of your robot
    port - The port on which NAOqi listens (9559 by default)

To make NAO walk, you should use ALMotionProxy::moveInit (to put the robot in a correct position), and then ALMotionProxy::moveTo

from naoqi import ALProxy
motion = ALProxy("ALMotion", "nao.local", 9559)
motion.moveInit()
motion.moveTo(0.5, 0, 0)

This will let you make the robot do several things at the same time.

from naoqi import ALProxy
motion = ALProxy("ALMotion", "nao.local", 9559)
tts = ALProxy("ALTextToSpeech", "nao.local", 9559)
motion.moveInit()
motion.post.moveTo(0.5, 0, 0)
tts.say("I'm walking")

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章