def afterPlatformCalibration(self, response): self.phase = 'none' ret, result = response if ret: profile.putProfileSettingNumpy('rotation_matrix', result[0]) profile.putProfileSettingNumpy('translation_vector', result[1]) else: if result == Error.CalibrationError: self.resultLabel.SetLabel( _("Error in pattern: please check the pattern and try again" )) dlg = wx.MessageDialog( self, _("Platform Calibration failed. Please try again"), _(result), wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() if ret: self.skipButton.Disable() self.nextButton.Enable() self.resultLabel.SetLabel( _("All OK. Please press next to continue")) else: self.skipButton.Enable() self.nextButton.Disable() self.onFinishCalibration()
def afterLaserCalibration(self, response): self.phase = 'platformCalibration' ret, result = response if ret: profile.putProfileSetting('distance_left', result[0][0]) profile.putProfileSettingNumpy('normal_left', result[0][1]) profile.putProfileSetting('distance_right', result[1][0]) profile.putProfileSettingNumpy('normal_right', result[1][1]) self.platformExtrinsics.setCallbacks( None, lambda p: wx.CallAfter(self.progressPlatformCalibration, p), lambda r: wx.CallAfter(self.afterPlatformCalibration, r)) self.platformExtrinsics.start() else: if result == Error.CalibrationError: self.resultLabel.SetLabel( _("Error in lasers: please connect the lasers and try again" )) dlg = wx.MessageDialog( self, _("Laser Calibration failed. Please try again"), _(result), wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() self.skipButton.Enable() self.onFinishCalibration()
def afterLaserCalibration(self, response): self.phase='platformCalibration' ret, result = response if ret: profile.putProfileSetting('distance_left', result[0][0]) profile.putProfileSettingNumpy('normal_left', result[0][1]) profile.putProfileSetting('distance_right', result[1][0]) profile.putProfileSettingNumpy('normal_right', result[1][1]) self.platformExtrinsics.setCallbacks(None, lambda p: wx.CallAfter(self.progressPlatformCalibration,p), lambda r: wx.CallAfter(self.afterPlatformCalibration,r)) self.platformExtrinsics.start() else: if result == Error.CalibrationError: self.resultLabel.SetLabel(_("Error in lasers: please connect the lasers and try again")) dlg = wx.MessageDialog(self, _("Laser Calibration failed. Please try again"), _(result), wx.OK|wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() self.skipButton.Enable() self.onFinishCalibration()
def afterPlatformCalibration(self, response): self.phase = 'none' ret, result = response if ret: profile.putProfileSettingNumpy('rotation_matrix', result[0]) profile.putProfileSettingNumpy('translation_vector', result[1]) else: if result == Error.CalibrationError: self.resultLabel.SetLabel(_("Error in pattern: please check the pattern and try again")) dlg = wx.MessageDialog(self, _("Platform Calibration failed. Please try again"), _(result), wx.OK|wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() if ret: self.skipButton.Disable() self.nextButton.Enable() self.resultLabel.SetLabel(_("All OK. Please press next to continue")) else: self.skipButton.Enable() self.nextButton.Disable() self.onFinishCalibration()
def putProfileSettings(self): profile.putProfileSettingNumpy('rotation_matrix', self.rotationValues) profile.putProfileSettingNumpy('translation_vector', self.translationValues)
def putProfileSettings(self): profile.putProfileSettingNumpy('laser_coordinates', self.coordinatesValues) profile.putProfileSettingNumpy('laser_origin', self.originValues) profile.putProfileSettingNumpy('laser_normal', self.normalValues)
def putProfileSettings(self): profile.putProfileSettingNumpy('distance_left', self.distanceLeftValue) profile.putProfileSettingNumpy('normal_left', self.normalLeftValues) profile.putProfileSettingNumpy('distance_right', self.distanceRightValue) profile.putProfileSettingNumpy('normal_right', self.normalRightValues)
def putProfileSettings(self): profile.putProfileSettingNumpy('camera_matrix', self.cameraValues) profile.putProfileSettingNumpy('distortion_vector', self.distortionValues)