init_pose.py
Go to the documentation of this file.
00001 import rospy
00002 
00003 # go to crouching position
00004 def initPose(motionProxy):
00005         numJoints = len(motionProxy.getJointNames('Body'))
00006         
00007         allAngles = [0.0,0.0,                                   # head
00008                 1.39, 0.34, -1.39, -1.04, 0.0, 0.0,             # left arm
00009                 0.0, 0.0, -0.43, 0.69, -0.34, 0.0,      # left leg
00010                 0.0, 0.0, -0.43, 0.69, -0.34, 0.0,      # right leg
00011                 1.39, -0.34, 1.39, 1.04, 0.0, 0.0]              # right arm
00012         
00013         if (numJoints == 26):
00014                 angles = allAngles
00015         elif (numJoints == 22):  # no hands (e.g. simulator)
00016                 angles = allAngles[0:6] + allAngles[8:24]
00017         else:
00018            rospy.logerr("Unkown number of joints: %d", numJoints)
00019            return 
00020                 
00021         try:
00022                 motionProxy.angleInterpolation('Body', angles, 1.5, True);
00023 
00024         except RuntimeError,e:
00025                 print "An error has been caught"
00026                 print e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


nao_driver
Author(s): Armin Hornung, Stefan Osswald, Daniel Maier
autogenerated on Tue Oct 15 2013 10:06:23