示例#1
0
    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()
示例#2
0
    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()
示例#3
0
	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()
示例#4
0
	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()
示例#5
0
文件: panels.py 项目: Claude59/horus
 def putProfileSettings(self):
     profile.putProfileSettingNumpy('rotation_matrix', self.rotationValues)
     profile.putProfileSettingNumpy('translation_vector', self.translationValues)
示例#6
0
文件: panels.py 项目: Claude59/horus
 def putProfileSettings(self):
     profile.putProfileSettingNumpy('laser_coordinates', self.coordinatesValues)
     profile.putProfileSettingNumpy('laser_origin', self.originValues)
     profile.putProfileSettingNumpy('laser_normal', self.normalValues)
示例#7
0
文件: panels.py 项目: Claude59/horus
 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)
示例#8
0
文件: panels.py 项目: Claude59/horus
 def putProfileSettings(self):
     profile.putProfileSettingNumpy('camera_matrix', self.cameraValues)
     profile.putProfileSettingNumpy('distortion_vector', self.distortionValues)
示例#9
0
 def putProfileSettings(self):
     profile.putProfileSettingNumpy('rotation_matrix', self.rotationValues)
     profile.putProfileSettingNumpy('translation_vector', self.translationValues)
示例#10
0
 def putProfileSettings(self):
     profile.putProfileSettingNumpy('laser_coordinates', self.coordinatesValues)
     profile.putProfileSettingNumpy('laser_origin', self.originValues)
     profile.putProfileSettingNumpy('laser_normal', self.normalValues)
示例#11
0
 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)
示例#12
0
 def putProfileSettings(self):
     profile.putProfileSettingNumpy('camera_matrix', self.cameraValues)
     profile.putProfileSettingNumpy('distortion_vector', self.distortionValues)