最近重新学习nao的官方文档,写点简单的程序回顾一下。主要是用python调用api,写下来保存着。
'''walk:small example to make nao walk'''
import sys
import motion
import time
from naoqi import alproxy
def stiffnesson(proxy):
#we use the 'body' to signify the collection of all joints
pname="body"
pstiffnesslists=1.0
ptimelists=1.0
proxy.stiffnessinterpolation(pname,pstiffnesslists,ptimelists)
def main(robotip):
#init proxies
try:
motionproxy=alproxy("almotion",robotip,9559)
except exception,e:
print "could not create proxy to almotion"
print"error was",e
try:
postureproxy=alproxy("alrobotposture",robotip,9559)
except exception,e:
print"could not create proxy to alrobotposture"
prin