这些天依然在看nao公司文档的东西,把读过的代码顺手敲了出来。代码依然很简单,但是为什么我要写博客呢?这其中有很大的原因在于,代码是死的,可是读着读着就感觉代码活了,而且,每次读都会有不同的感受。咱就直接看正题吧。
#-*-encoding:UTF-8-*-
import sys
import motion
import almath
from naoqi import ALProxy
def StiffnessOn(proxy):
#we use the body name to signify the collection of all jionts
pName="Body"
pStiffnessLists=1.0
pTimeLists=1.0
proxy.stiffnessInterpolation(pName,pStiffnessLists,pTimeLists)
def main(robotIP):
''' example showing a path of two position
'''
try:
motionProxy=ALProxy("ALMotion",robotIP,9559)
except Exception ,e:
print"could not create a proxy to almotion"
print str(e)
try: