本文實(shí)例為大家分享了python實(shí)現(xiàn)nao機(jī)器人身體軀干和腿部動(dòng)作的具體代碼,供大家參考,具體內(nèi)容如下
創(chuàng)新互聯(lián)公司是一家專業(yè)提供廣河企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站設(shè)計(jì)、做網(wǎng)站、成都外貿(mào)網(wǎng)站建設(shè)公司、H5建站、小程序制作等業(yè)務(wù)。10年已為廣河眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)的建站公司優(yōu)惠進(jìn)行中。跟上一篇類似,代碼沒什么難度,可以進(jìn)行擴(kuò)展。
#-*-encoding:UTF-8-*- '''control nao's left foot, cartesian control:torso and foot trajectories ''' import sys import motion from naoqi import ALProxy def StiffnessOn(proxy): pNmaes="Body" pStiffnessLists=1.0 pTimeLists=1.0 proxy.stiffnessInterpolation(pName,pStiffnessLists,pTimeLists) def main(robotIP): '''example of cartesian foot trajectory ''' try : motionProxy=ALProxy("ALMotion",robotIP,9559) except Exception,e: print "could not create a proxy" print "error is ",e try: postureProxy=ALProxy("ALRobotPosture",robotIP,9559) except Exception ,e: print "could not create a proxy" print"error is",e StiffnessOn(motionProxy) #send nao to pose init postureProxy.goToPosture("StandInit",0.5) space=motion .FRAME_ROBOT AxisMask=almath.AXIS_MASK_VEL isAbsolute=False path=[0.0,-0.07,-0.03,0.0,0.0,0.0] #lower the torso and move the size effector="Torso" time=2.0 motionProxy.positionInterpolation(effector,space,path,axisMask,time,isAbsolute) #lleg motion effector="LLeg" path=[0.0,0.06,0.00,0.0,0.0,0.0] times=2.0 motionProxy.positionInterpolation(effector,space,axisMask,time,isAbsolute) if __name__=="__main__": robotIP="127.0.0.1" if len(sys.argv)<=1: print "usage python robotIP" else: robotIP=sys.argv[1] main(robotIP)
網(wǎng)頁題目:python實(shí)現(xiàn)nao機(jī)器人身體軀干和腿部動(dòng)作操作-創(chuàng)新互聯(lián)
文章轉(zhuǎn)載:http://jinyejixie.com/article20/cceejo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊(cè)、虛擬主機(jī)、做網(wǎng)站、軟件開發(fā)、App設(shè)計(jì)、定制開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容