コード例 #1
0
ファイル: Lucy.py プロジェクト: PatriciaPolero/lucy
 def executePose(self, pose):
     # set positions and wait that the actuator reaching that position
     dontSupportedJoints = self.sysConf.getVrepNotImplementedBioloidJoints()
     RobotImplementedJoints = []
     for joint in self.joints:
         if joint not in dontSupportedJoints:
             RobotImplementedJoints.append(joint)
     for joint in RobotImplementedJoints:
         angle = pose.getValue(joint)
         angleAX = AXAngle()
         angleAX.setDegreeValue(angle)
         # TODO implement method for setting position of all actuators at the same time
         self.actuator.move_actuator(
             self.robotConfiguration.loadJointId(joint), int(angleAX.getValue()), self.defaultSpeed
         )
         self.poseExecuted = self.poseExecuted + 1
     time.sleep(3)
コード例 #2
0
ファイル: Lucy.py プロジェクト: aguirrea/lucy
    def executePose(self, pose):
        #set positions and wait that the actuator reaching that position
        #TODO tener en cuenta los motores que están invertidos, creo que los únicos que están quedando son los de los hombros
        for joint in self.RobotImplementedJoints:
            if joint == "L_Hip_Pitch":
                angle = pose.getValue(joint)
                print "el angulo es: ", angle
                angleAX = AXAngle()
                angleAX.setDegreeValue(300 - angle)
                #TODO implement method for setting position of all actuators at the same time
                self.actuator.move_actuator(self.robotConfiguration.loadJointId(joint), int(angleAX.getValue()), self.defaultSpeed)
                self.poseExecuted = self.poseExecuted + 1
        print "pose executed!"
        time.sleep(0.2)


        '''