start_walk_pose.py
Go to the documentation of this file.
1 import rospy
2 
3 def startWalkPose(motionProxy):
4  numJoints = len(motionProxy.getJointNames('Body'))
5 
6  allAngles = [
7  0.0076280385255813599, # HeadPitch
8  0.019900038838386536, # HeadYaw
9  1.8085440397262573, # LAnklePitch
10  0.21165004372596741, # LAnkleRoll
11  -1.4680800437927246, # LElbowRoll
12  -0.52918803691864014, # LElbowYaw
13  0.0091620385646820068, # LHand
14  0.0011173889506608248, # LHipPitch
15  0.001575961709022522, # LHipRoll
16  0.024585962295532227, # LHipYawPitch
17  -0.37885606288909912, # LKneePitch
18  0.93723207712173462, # LShoulderPitch
19  -0.56301999092102051, # LShoulderRoll
20  -0.019900038838386536, # LWristYaw
21  0.001575961709022522, # RAnklePitch
22  0.024585962295532227, # RAnkleRoll
23  -0.37893998622894287, # RElbowRoll
24  0.9419180154800415, # RElbowYaw
25  -0.55986803770065308, # RHand
26  -0.024502038955688477, # RHipPitch
27  1.8224339485168457, # RHipRoll
28  -0.22247196733951569, # RHipYawPitch
29  1.4756660461425781, # RKneePitch
30  0.52160197496414185, # RShoulderPitch
31  0.001492038369178772, # RShoulderRoll
32  0.025117311626672745] # RWristYaw
33 
34  if (numJoints == 26):
35  angles = allAngles
36  elif (numJoints == 22): # no hands (e.g. simulator)
37  angles = allAngles[0:6] + allAngles[8:24]
38  else:
39  rospy.logerr("Unkown number of joints: %d", numJoints)
40  return
41 
42  try:
43  motionProxy.angleInterpolation('Body', angles, 1.5, True);
44 
45  except RuntimeError,e:
46  print "An error has been caught"
47  print e
def startWalkPose(motionProxy)


nao_apps
Author(s):
autogenerated on Mon Jun 10 2019 14:04:55