예제 #1
0
 def __init__(self, geneticMaterial):
     DTIndividualGeneticMaterial.__init__(self)
     lp = LoadPoses(geneticMaterial)
     robotConfig = LoadRobotConfiguration()
     poseSize = lp.getFrameQty()
     self.geneticMatrix = [[lp.getPose(i).getValue(j) for j in robotConfig.getJointsName()] for i in
                           xrange(poseSize)]
예제 #2
0
 def __init__(self, geneticMaterial):
     DTIndividualGeneticMaterial.__init__(self)
     
     lp = LoadPoses(geneticMaterial)
     cycleSize = lp.getFrameQty()
     CYCLE_REPETITION = self.cyclesQty
     print "cicleSize: ", cycleSize
     self.geneticMatrix = [[lp.getPose(i).getValue(j) for j in self.robotConfig.getJointsName()] for i in
                           xrange(cycleSize)] * CYCLE_REPETITION
     #for debugging info:
     #self.calculateGapByInterpolation(REFERENCE_WINDOW_RADIUS, INTERPOLATION_WINDOW, SPLINE_SMOOTHING_FACTOR, cycleSize, CYCLE_REPETITION, True)
     self.calculateGapByCubicInterpolation(REFERENCE_WINDOW_RADIUS, INTERPOLATION_WINDOW, SPLINE_SMOOTHING_FACTOR, cycleSize, CYCLE_REPETITION)