import math import os standadRemoteApiPort=19997 localhost='127.0.0.1' genetic_bioloid=os.getcwd()+"/models/genetic_bioloid.ttt" print 'Program started' angle = AXAngle() sim = Simulator() clientID = sim.connectVREP() if clientID !=-1: print 'Connected to remote API server' sim.loadscn(clientID, genetic_bioloid) sim.startSim(clientID,True) angle.setDegreeValue(150) sim.setJointPosition(clientID,"R_Hip_Pitch",angle.toVrep()) sim.setJointPosition(clientID,"L_Hip_Pitch",angle.toVrep()) pos1x, pos1y=sim.getBioloidPlannarPosition(clientID) end=False while not end: for i in xrange(30): angle.setDegreeValue(150-i) #print "voy a setear ax12 value en cadera izquierda: ", 150 - i sim.setJointPosition(clientID,'L_Hip_Pitch',angle.toVrep()) angle.setDegreeValue(i*2) #print "voy a setear ax12 value en rodilla derecha: ", i sim.setJointPosition(clientID,'R_Knee',angle.toVrep())