Example #1
0
 def setupFullCalibration(self):
     
     #ensure that there are no widgets in the deck when we start
     self.listOfCalibrationSteps = []
     
     #load the first steps in the calibration process because they are always the same
     intro =  Intro()
     self.listOfCalibrationSteps.append(intro)
     
     chooseKinematicsType                        = ChooseKinematicsType()
     self.listOfCalibrationSteps.append(chooseKinematicsType)
     
     vertDistGuess                               = VertDistToMotorsGuess()
     self.listOfCalibrationSteps.append(vertDistGuess)
     
     setTo12                                     = SetSprocketsVertical()
     self.listOfCalibrationSteps.append(setTo12)
     
     measureMotorDist                            = MeasureDistBetweenMotors()
     self.listOfCalibrationSteps.append(measureMotorDist)
     
     esw                                         = EnterSledWeight()
     self.listOfCalibrationSteps.append(esw)
     
     chooseChainOverSprocketDirection             = ChooseChainOverSprocketDirection()
     self.listOfCalibrationSteps.append(chooseChainOverSprocketDirection)
     
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     computeCalibrationSteps                     = ComputeCalibrationSteps()
     computeCalibrationSteps.setupListOfSteps    = self.addSteps
     self.listOfCalibrationSteps.append(computeCalibrationSteps)
Example #2
0
 def addAfterCalSteps(self):
     #one last review
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     #add finish step
     finish              = Finish()
     finish.done         = self.done
     self.listOfCalibrationSteps.append(finish)
Example #3
0
 def setupManualCalibration(self):
     '''
     
     Calling this function sets up the calibration process to show an option to enter manual machine dimensions
     
     '''
     
     #ensure that there are no widgets in the deck when we start
     self.listOfCalibrationSteps = []
     
     #add manual calibation card
     manualCalibration                       = ManualCalibration()
     self.listOfCalibrationSteps.append(manualCalibration)
     
     #one last review
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     #add finish step
     finish              = Finish()
     finish.done         = self.done
     self.listOfCalibrationSteps.append(finish)
Example #4
0
 def setupJustTriangularTestCuts(self):
     '''
     
     Calling this function sets up the calibration process to show just the steps cut the triangular test pattern
     
     '''
     
     #ensure that there are no widgets in the deck when we start
     self.listOfCalibrationSteps = []
     
     #add triangular kinematics
     triangularCalibration                       = TriangularCalibration()
     self.listOfCalibrationSteps.append(triangularCalibration)
     
     #one last review
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     #add finish step
     finish              = Finish()
     finish.done         = self.done
     self.listOfCalibrationSteps.append(finish)
 def on_Enter(self):
     '''
     
     Called the first time the widget is created
     
     '''
     
     App.get_running_app().data.calibrationInProcess = True
     
     #generate the first two steps because they are always the same
     intro =  Intro()
     self.listOfCalibrationSteps.append(intro)
     
     chooseKinematicsType                        = ChooseKinematicsType()
     self.listOfCalibrationSteps.append(chooseKinematicsType)
     
     vertDistGuess                               = VertDistToMotorsGuess()
     self.listOfCalibrationSteps.append(vertDistGuess)
     
     setTo12                                     = SetSprocketsVertical()
     self.listOfCalibrationSteps.append(setTo12)
     
     measureMotorDist                            = MeasureDistBetweenMotors()
     self.listOfCalibrationSteps.append(measureMotorDist)
     
     chooseChainOverSprocketDirection             = ChooseChainOverSprocketDirection()
     self.listOfCalibrationSteps.append(chooseChainOverSprocketDirection)
     
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     computeCalibrationSteps                     = ComputeCalibrationSteps()
     computeCalibrationSteps.setupListOfSteps    = self.addSteps
     self.listOfCalibrationSteps.append(computeCalibrationSteps)
     
     self.loadStep(0)
Example #6
0
    def addSteps(self):
        '''
        
        This function will be called when the ComputeCalibrationSteps step is reached. It will compute which steps are needed for a 
        given frame configuration and add them to the list
        
        '''
        
        if App.get_running_app().data.config.get('Advanced Settings', 'chainOverSprocket') == 'Top':
            #if we're using the top system no extra steps are needed
            pass
        else:
            #if we're using the bottom method we need to remove the chain now and put it back at 12 o'clock
            
            removeChains                                 = RemoveChains()
            self.listOfCalibrationSteps.append(removeChains)
            
            setTo12                                     = SetSprocketsVertical()
            self.listOfCalibrationSteps.append(setTo12)
            
        
        if App.get_running_app().data.config.get('Advanced Settings', 'kinematicsType') == 'Triangular':
            #Put step with choice of Holey Calibration vs. Triangular Calibration
            ChoiceWid=ChooseHoleyOrTriangularCalibration()
            ChoiceWid.chooseHoleyCalibration=self.addHoleyCalibration
            ChoiceWid.chooseTriangularCalibration=self.addTriangularCalibration
            ChoiceWid.listOfCalibrationSteps=self.listOfCalibrationSteps
            ChoiceWid.done=self.done
            self.listOfCalibrationSteps.append(ChoiceWid)
            
#            #add rotation radius guess
#            rotationRadiusGuess                         = RotationRadiusGuess()
#            self.listOfCalibrationSteps.append(rotationRadiusGuess)
#            
#            #add extend chains
#            measureOutChains                                = MeasureOutChains()
#            self.listOfCalibrationSteps.append(measureOutChains)
#            
#            #add set z
#            adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
#            self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
#            
#            #add triangular kinematics
#            triangularCalibration                       = TriangularCalibration()
#            self.listOfCalibrationSteps.append(triangularCalibration)
        else:
            
            #add extend chains
            measureOutChains                                = MeasureOutChains()
            self.listOfCalibrationSteps.append(measureOutChains)
            
            #add set z
            adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
            self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
            
            #Ask for guess of attachment spacing
            distBetweenChainBrackets                    = DistBetweenChainBrackets()
            self.listOfCalibrationSteps.append(distBetweenChainBrackets)
            #Do quadrilateral test cut
            quadTestCut                                 = QuadTestCut()
            self.listOfCalibrationSteps.append(quadTestCut)
        
        
            #one last review
            reviewMeasurements                          = ReviewMeasurements()
            self.listOfCalibrationSteps.append(reviewMeasurements)
            
            #add finish step
            finish              = Finish()
            finish.done         = self.done
            self.listOfCalibrationSteps.append(finish)
 def addSteps(self):
     '''
     
     This function will be called when the ComputeCalibrationSteps step is reached. It will compute which steps are needed for a 
     given frame configuration and add them to the list
     
     '''
     
     if App.get_running_app().data.config.get('Advanced Settings', 'chainOverSprocket') == 'Top':
         #if we're using the top system no extra steps are needed
         pass
     else:
         #if we're using the bottom method we need to remove the chain now and put it back at 12 o'clock
         
         removeChains                                 = RemoveChains()
         self.listOfCalibrationSteps.append(removeChains)
         
         setTo12                                     = SetSprocketsVertical()
         self.listOfCalibrationSteps.append(setTo12)
         
     
     if App.get_running_app().data.config.get('Advanced Settings', 'kinematicsType') == 'Triangular':
         #add rotation radius guess
         rotationRadiusGuess                         = RotationRadiusGuess()
         self.listOfCalibrationSteps.append(rotationRadiusGuess)
         
         #add extend chains
         measureOutChains                                = MeasureOutChains()
         self.listOfCalibrationSteps.append(measureOutChains)
         
         #add set z
         adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
         self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
         
         #add triangular kinematics
         triangularCalibration                       = TriangularCalibration()
         self.listOfCalibrationSteps.append(triangularCalibration)
     else:
         
         #add extend chains
         measureOutChains                                = MeasureOutChains()
         self.listOfCalibrationSteps.append(measureOutChains)
         
         #add set z
         adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
         self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
         
         #Ask for guess of attachment spacing
         distBetweenChainBrackets                    = DistBetweenChainBrackets()
         self.listOfCalibrationSteps.append(distBetweenChainBrackets)
         #Do quadrilateral test cut
         quadTestCut                                 = QuadTestCut()
         self.listOfCalibrationSteps.append(quadTestCut)
         
         #App.get_running_app().data.message_queue.put("Message: You have chosen a configuration which is not currently supported by the calibration process. Check back soon")
         #self.done()
     
     #one last review
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     #add finish step
     finish              = Finish()
     finish.done         = self.done
     self.listOfCalibrationSteps.append(finish)