NAO & Pepper 机器人 python 环境下开发笔记
程序员文章站
2022-07-12 23:49:45
...
环境不多说了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")
上一篇: 杂
下一篇: 【bat】批量修改文件名脚本