update 更新部署

This commit is contained in:
FrankCV2048
2024-12-12 21:50:40 +08:00
parent 7a26238219
commit ad90c9f1f6
10 changed files with 354 additions and 230 deletions

View File

@ -1,5 +1,6 @@
from enum import Enum from enum import Enum
import Constant
from COM.COM_Robot import RobotClient from COM.COM_Robot import RobotClient
from Util.util_time import CClockPulse, CTon from Util.util_time import CClockPulse, CTon
@ -11,7 +12,7 @@ class CatchStatus(Enum):
CShake = 3 CShake = 3
COk = 4 COk = 4
class catch: class Catch:
def __init__(self, robotClient: RobotClient): def __init__(self, robotClient: RobotClient):
self.robotClient = robotClient self.robotClient = robotClient
self.catch_status = CatchStatus.CNone self.catch_status = CatchStatus.CNone
@ -24,26 +25,27 @@ class catch:
if self.catch_status == CatchStatus.CTake: if self.catch_status == CatchStatus.CTake:
self.robotClient.sendIOControl(self.robotClient.con_ios[0],1) self.robotClient.sendIOControl(self.robotClient.con_ios[0],1)
if self.robotClient.check_outputQ(self.robotClient.con_ios[0]): if self.robotClient.check_outputQ(self.robotClient.con_ios[0]) or Constant.Debug:
self.catch_status = CatchStatus.COk self.catch_status = CatchStatus.COk
if self.catch_status == CatchStatus.CDrop: if self.catch_status == CatchStatus.CDrop:
self.robotClient.sendIOControl(self.robotClient.con_ios[0],0) self.robotClient.sendIOControl(self.robotClient.con_ios[0],0)
self.robotClient.sendIOControl(self.robotClient.con_ios[1],1) self.robotClient.sendIOControl(self.robotClient.con_ios[1],1)
if self.robotClient.check_outputQ(self.robotClient.con_ios[1]) and not self.robotClient.check_outputQ(self.robotClient.con_ios[0]): if Constant.Debug or self.robotClient.check_outputQ(self.robotClient.con_ios[1]) and not self.robotClient.check_outputQ(self.robotClient.con_ios[0]):
self.catch_status = CatchStatus.COk self.catch_status = CatchStatus.COk
if self.catch_status == CatchStatus.CShake: if self.catch_status == CatchStatus.CShake:
if not self.shake_continue.Q(True, 3000): if not self.shake_continue.Q(True, 2000):
shakeQ = self.shakePulse.Q(True, 1000, 1000) shakeQ = self.shakePulse.Q(True, 100, 100)
self.robotClient.sendIOControl(self.robotClient.con_ios[2], shakeQ) self.robotClient.sendIOControl(self.robotClient.con_ios[2], shakeQ)
print("正在震动" if shakeQ else "震动结束")
else: else:
self.shake_continue.SetReset() self.shake_continue.SetReset()
self.catch_status = CatchStatus.COk self.catch_status = CatchStatus.COk
if self.robotClient.check_outputQ(self.robotClient.con_ios[2]): if Constant.Debug or self.robotClient.check_outputQ(self.robotClient.con_ios[2]):
self.robotClient.sendIOControl(self.robotClient.con_ios[2], False) self.robotClient.sendIOControl(self.robotClient.con_ios[2], False)
print("震动结束")
if self.catch_status == CatchStatus.COk: if self.catch_status == CatchStatus.COk:
pass pass

View File

@ -3,9 +3,11 @@ import time
import cv2 import cv2
from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QMessageBox
from PySide6.QtCore import Signal, QObject
import Constant import Constant
import Expection import Expection
from CU.Catch import Catch, CatchStatus
from Model.FeedModel import PositionModel from Model.FeedModel import PositionModel
from Model.Position import Real_Position, Detection_Position from Model.Position import Real_Position, Detection_Position
from enum import Enum, IntEnum from enum import Enum, IntEnum
@ -156,8 +158,11 @@ class FeedingConfig:
pass pass
class Feeding: class Feeding(QObject):
need_origin_signal = Signal(str)
take_no_photo_sigal = Signal(str)
def __init__(self, robotClient: RobotClient, detection: Detection): def __init__(self, robotClient: RobotClient, detection: Detection):
super().__init__()
self.feedConfig = None self.feedConfig = None
self.feedStatus = FeedStatus.FNone self.feedStatus = FeedStatus.FNone
self.robotClient = robotClient self.robotClient = robotClient
@ -177,12 +182,14 @@ class Feeding:
self.pos_index = -1 self.pos_index = -1
self.pos_near_index = -1 self.pos_near_index = -1
self.catch = Catch(self.robotClient)
pass pass
def init_detection_image(self): def init_detection_image(self):
self.detection_image = cv2.imread(Constant.feed_sign_path) self.detection_image = cv2.imread(Constant.feed_sign_path)
def run(self): def run(self):
self.catch.run()
# 获取事件坐标 # 获取事件坐标
real_position = Real_Position() real_position = Real_Position()
real_position.init_position(self.robotClient.status_model.world_0, real_position.init_position(self.robotClient.status_model.world_0,
@ -233,6 +240,7 @@ class Feeding:
log.log_message(logging.INFO, Constant.str_feed_start) log.log_message(logging.INFO, Constant.str_feed_start)
if not self.robotClient.origin_position.compare(real_position) and not self.is_reverse: if not self.robotClient.origin_position.compare(real_position) and not self.is_reverse:
# QMessageBox.information(None, "提示", Constant.str_feed_start_error) # Fuck 引起异常 # QMessageBox.information(None, "提示", Constant.str_feed_start_error) # Fuck 引起异常
self.need_origin_signal.emit(Constant.str_feed_start_error)
self.feedStatus = FeedStatus.FNone self.feedStatus = FeedStatus.FNone
return return
if self.is_reverse: if self.is_reverse:
@ -270,7 +278,6 @@ class Feeding:
self.feedConfig.feedLine.start2take_pos_index = len(self.feedConfig.feedLine.start_to_take) -2 self.feedConfig.feedLine.start2take_pos_index = len(self.feedConfig.feedLine.start_to_take) -2
self.feedConfig.feedLine.origin2start_pos_index = len(self.feedConfig.feedLine.origin_to_start) - 2 self.feedConfig.feedLine.origin2start_pos_index = len(self.feedConfig.feedLine.origin_to_start) - 2
self.next_position(self.is_reverse) self.next_position(self.is_reverse)
return return
if self.robotClient.type_detection == DetectType.EyeOutHand: if self.robotClient.type_detection == DetectType.EyeOutHand:
@ -347,21 +354,31 @@ class Feeding:
elif self.feedStatus == FeedStatus.FTake: elif self.feedStatus == FeedStatus.FTake:
log.log_message(logging.INFO, Constant.str_feed_take) log.log_message(logging.INFO, Constant.str_feed_take)
if self.feedConfig.feedLine.get_take_position().get_position() != None: if self.feedConfig.feedLine.get_take_position().get_position() != None:
self.take_no_photo = False # self.take_no_photo = False
if self.feedConfig.feedLine.get_take_position().get_position().compare(real_position): if self.feedConfig.feedLine.get_take_position().get_position().compare(real_position):
# 打开吸嘴并返回 # 打开吸嘴并返回
# self.sendIOControl(self.robotClient.con_ios[0], 1) # self.sendIOControl(self.robotClient.con_ios[0], 1)
# self.sendIOControl(self.robotClient.con_ios[1], 1) # self.sendIOControl(self.robotClient.con_ios[1], 1)
# self.sendIOControl(self.robotClient.con_ios[2], 1) # self.sendIOControl(self.robotClient.con_ios[2], 1)
# TODO 检测是否通 不然报警
self.feedConfig.feedLine.set_take_position(None)
time.sleep(self.robotClient.time_delay_take) if self.catch.catch_status == CatchStatus.CNone :
log.log_message(logging.INFO, Constant.str_feed_take_success) self.catch.catch_status = CatchStatus.CTake
self.next_position() return
if self.catch.catch_status == CatchStatus.CTake:
return
if self.catch.catch_status == CatchStatus.COk :
self.catch.catch_status = CatchStatus.CNone
self.feedConfig.feedLine.set_take_position(None)
time.sleep(self.robotClient.time_delay_take)
log.log_message(logging.INFO, Constant.str_feed_take_success)
self.next_position()
else: else:
log.log_message(logging.ERROR, Constant.str_feed_takePhoto_fail) log.log_message(logging.ERROR, Constant.str_feed_takePhoto_fail)
self.take_no_photo = True # self.take_no_photo = True
self.take_no_photo_sigal.emit()
# 继续获取图像 # 继续获取图像
# TODO # TODO
@ -383,8 +400,17 @@ class Feeding:
log.log_message(logging.INFO, Constant.str_feed_shake) log.log_message(logging.INFO, Constant.str_feed_shake)
if self.get_current_position().get_position().compare(real_position): if self.get_current_position().get_position().compare(real_position):
# TODO 震动方案 # TODO 震动方案
time.sleep(self.robotClient.time_delay_shake)
self.next_position()
if self.catch.catch_status == CatchStatus.CNone:
self.catch.catch_status = CatchStatus.CShake
return
if self.catch.catch_status == CatchStatus.CShake:
return
if self.catch.catch_status == CatchStatus.COk:
self.catch.catch_status = CatchStatus.CNone
time.sleep(self.robotClient.time_delay_shake)
self.next_position()
elif self.feedStatus == FeedStatus.FDropBag: elif self.feedStatus == FeedStatus.FDropBag:
log.log_message(logging.INFO, Constant.str_feed_drop) log.log_message(logging.INFO, Constant.str_feed_drop)
@ -393,16 +419,23 @@ class Feeding:
# self.sendIOControl(self.robotClient.con_ios[0], 0) # self.sendIOControl(self.robotClient.con_ios[0], 0)
# self.sendIOControl(self.robotClient.con_ios[1], 0) # self.sendIOControl(self.robotClient.con_ios[1], 0)
# self.sendIOControl(self.robotClient.con_ios[2], 0) # self.sendIOControl(self.robotClient.con_ios[2], 0)
# TODO 检测是否断 不然报警
time.sleep(self.robotClient.time_delay_put)
# TODO 获取目标位置
# self.detection.get_position(Point_isVision=False, Box_isPoint=True, First_Depth=True, Iter_Max_Pixel=30, save_img_point=0, Height_reduce=30, width_reduce=30)
self.feedConfig.feedLine.set_take_position(self.get_take_position())
self.feedConfig.num = self.feedConfig.num - 1
log.log_message(logging.INFO, f'{Constant.str_feed_feed_num}{self.feedConfig.num}')
self.next_position()
def run_reseet(self): if self.catch.catch_status == CatchStatus.CNone:
self.catch.catch_status = CatchStatus.CDrop
return
if self.catch.catch_status == CatchStatus.CDrop:
return
if self.catch.catch_status == CatchStatus.COk:
self.catch.catch_status = CatchStatus.CNone
time.sleep(self.robotClient.time_delay_put)
# self.detection.get_position(Point_isVision=False, Box_isPoint=True, First_Depth=True, Iter_Max_Pixel=30, save_img_point=0, Height_reduce=30, width_reduce=30)
self.feedConfig.feedLine.set_take_position(self.get_take_position())
self.feedConfig.num = self.feedConfig.num - 1
log.log_message(logging.INFO, f'{Constant.str_feed_feed_num}{self.feedConfig.num}')
self.next_position()
def run_reset(self):
real_position = Real_Position() real_position = Real_Position()
real_position.init_position(self.robotClient.status_model.world_0, real_position.init_position(self.robotClient.status_model.world_0,
self.robotClient.status_model.world_1, self.robotClient.status_model.world_1,
@ -540,7 +573,7 @@ class Feeding:
self.send_emergency_stop() self.send_emergency_stop()
return True return True
def send_emergency_sound(self): def send_emergency_sound(self):
self.sendIOControl(Constant.IO_EmergencyPoint, 1) self.sendIOControl(Constant.IO_EmergencyPoint, 2)
def send_emergency_stop(self): def send_emergency_stop(self):
self.sendIOControl(Constant.IO_EmergencyPoint, 0) self.sendIOControl(Constant.IO_EmergencyPoint, 0)
@ -597,8 +630,12 @@ class Feeding:
self.robotClient.add_sendQuene(request_command) self.robotClient.add_sendQuene(request_command)
pass pass
def get_take_position(self): def get_take_position(self):
if Constant.Debug:
return self.robotClient.status_model.getRealPosition()
_, img, xyz, uvw, points = self.detection.get_position(Point_isVision=False, Box_isPoint=True, First_Depth=True, Iter_Max_Pixel=30,save_img_point=0, Height_reduce=30, width_reduce=30) _, img, xyz, uvw, points = self.detection.get_position(Point_isVision=False, Box_isPoint=True, First_Depth=True, Iter_Max_Pixel=30,save_img_point=0, Height_reduce=30, width_reduce=30)
self.detection_image = img self.detection_image = img
if xyz ==None or uvw==None or points==None:
return None
target_position,noraml_base = getPosition(*xyz,*uvw,None,points) target_position,noraml_base = getPosition(*xyz,*uvw,None,points)
position = Real_Position().init_position(*target_position[:3],*noraml_base[:3]) position = Real_Position().init_position(*target_position[:3],*noraml_base[:3])

View File

@ -33,41 +33,119 @@ status = 3
linetype = 0 linetype = 0
[Position5] [Position5]
x = 0.0 x = 7.0
y = 0.0 y = 50.0
z = 0.0 z = 1.0
u = 0.0 u = 12.0
v = 0.0 v = 0.0
w = 0.0 w = 1.0
id = 5 id = 5
order = 1 order = 2
lineid = 1 lineid = 1
status = 4 status = 4
linetype = 0 linetype = 0
[Position4] [Position4]
x = 0.0 x = 7.0
y = 0.0 y = 50.0
z = 0.0 z = 1.0
u = 0.0 u = 12.0
v = 0.0 v = 0.0
w = 0.0 w = 1.0
id = 4 id = 4
order = 2 order = 3
lineid = 1 lineid = 1
status = 2 status = 2
linetype = 0 linetype = 0
[Position1] [Position1]
x = 0.0 x = 7.0
y = 0.0 y = 50.0
z = 0.0 z = 1.0
u = 0.0 u = 12.0
v = 0.0 v = 0.0
w = 0.0 w = 1.0
id = 1 id = 1
order = 3 order = 4
lineid = 1 lineid = 1
status = 5 status = 5
linetype = 0 linetype = 0
[Position6]
x = 7.0
y = 50.0
z = 1.0
u = 12.0
v = 0.0
w = 1.0
id = 6
order = 1
lineid = 1
status = 2
linetype = 0
[Position7]
x = 7.0
y = 50.0
z = 1.0
u = 12.0
v = 0.0
w = 1.0
id = 7
order = 5
lineid = 1
status = 6
linetype = 0
[Position8]
x = 7.0
y = 50.0
z = 1.0
u = 12.0
v = 0.0
w = 1.0
id = 8
order = 6
lineid = 1
status = 7
linetype = 0
[Position9]
x = 7.0
y = 50.0
z = 1.0
u = 12.0
v = 0.0
w = 1.0
id = 9
order = 7
lineid = 1
status = 8
linetype = 0
[Position10]
x = 7.0
y = 50.0
z = 1.0
u = 12.0
v = 0.0
w = 1.0
id = 10
order = 8
lineid = 1
status = 9
linetype = 0
[Position11]
x = 7.0
y = 50.0
z = 1.0
u = 12.0
v = 0.0
w = 1.0
id = 11
order = 9
lineid = 1
status = 3
linetype = 0

View File

@ -57,7 +57,7 @@ str_feed_photo_confirm = '确认摆好'
str_feed_io_control = '发送IO控制: ' str_feed_io_control = '发送IO控制: '
str_feed_safe_error_msgbox = '未在安全位置,请先复位!' str_feed_safe_error_msgbox = '未在安全位置,请先复位!'
str_feed_shake = '摇摆' str_feed_shake = '摇摆'
str_feed_start_error = '请先复位机械臂' str_feed_start_error = '请先复位到原点'
str_feed_return_original_position_fail = '机械臂未按照实际路线点移动,未能寻找到适配路径点位' str_feed_return_original_position_fail = '机械臂未按照实际路线点移动,未能寻找到适配路径点位'
str_feed_reset_no_line_error = '未定义的线段' str_feed_reset_no_line_error = '未定义的线段'
str_sys_start = '进入系统' str_sys_start = '进入系统'

View File

@ -939,7 +939,7 @@ background-color: rgb(13, 17, 40);</string>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>5</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="page_3"> <widget class="QWidget" name="page_3">
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="1"> <layout class="QVBoxLayout" name="verticalLayout_7" stretch="1">
@ -2477,11 +2477,14 @@ border:None;</string>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum> <enum>QFrame::Shadow::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_9" rowstretch="1,1,1,1"> <layout class="QGridLayout" name="gridLayout_9" rowstretch="1,1,1">
<property name="verticalSpacing">
<number>80</number>
</property>
<item row="1" column="2"> <item row="1" column="2">
<widget class="QLabel" name="label_92"> <widget class="QLabel" name="label_92">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -2529,7 +2532,7 @@ border:None;</string>
<item row="0" column="4"> <item row="0" column="4">
<widget class="QLabel" name="label_88"> <widget class="QLabel" name="label_88">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -2545,7 +2548,7 @@ border:None;</string>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QLabel" name="label_93"> <widget class="QLabel" name="label_93">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -2561,7 +2564,7 @@ border:None;</string>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_95"> <widget class="QLabel" name="label_95">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -2577,7 +2580,7 @@ border:None;</string>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_90"> <widget class="QLabel" name="label_90">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -2625,7 +2628,7 @@ border:None;</string>
<item row="1" column="4"> <item row="1" column="4">
<widget class="QLabel" name="label_91"> <widget class="QLabel" name="label_91">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>

View File

@ -186,7 +186,7 @@ class CMDInstructRequest:
if len(self.instructions) != 0: if len(self.instructions) != 0:
model_str = model_str+',"instructions":'+"[{"+self.instructions[0].toString()+"}]"+"}" model_str = model_str+',"instructions":'+"[{"+self.instructions[0].toString()+"}]"+"}"
else: else:
model_str = model_str+"}" model_str = model_str+',"instructions":'+"[{""}]"+"}" #model_str+"}"
print(model_str) print(model_str)
return model_str return model_str

View File

@ -61,12 +61,12 @@ feed_speed = 10
reset_speed = 35 reset_speed = 35
[Origin] [Origin]
x = 143.921 x = 7.0
y = 2170.454 y = 50.0
z = 1627.494 z = 1.0
u = 3.234 u = 12.0
v = 24.269 v = 0.0
w = -87.403 w = 1.0
[Camera_Feed] [Camera_Feed]
ipaddress = 127.0.0.1 ipaddress = 127.0.0.1

38
main.py
View File

@ -617,6 +617,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.robotClient.feed_speed = feed_speed self.robotClient.feed_speed = feed_speed
self.robotClient.reset_speed = reset_speed self.robotClient.reset_speed = reset_speed
self.feeding = Feeding(self.robotClient, self.detection) # 临时 self.feeding = Feeding(self.robotClient, self.detection) # 临时
self.feeding.need_origin_signal.connect(self.show_infomessage_box)
self.feeding.take_no_photo_sigal.emit(self.show_no_photo_message_box)
self.last_time = time.time() self.last_time = time.time()
self.remain_lineName = self.configReader.get('Robot_Feed', 'remain_lineName') self.remain_lineName = self.configReader.get('Robot_Feed', 'remain_lineName')
self.remain_Count = int(self.configReader.get('Robot_Feed', 'remain_Count')) self.remain_Count = int(self.configReader.get('Robot_Feed', 'remain_Count'))
@ -870,7 +872,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
line_head = self.comboBox_lineIndex.currentData() line_head = self.comboBox_lineIndex.currentData()
self.command_quene.put(FeedCommand(FeedingConfig(num, FeedLine(self.feedLine_dict[line_head].id,self.feedLine_dict[line_head].name,self.feedLine_dict[line_head].positions), self.feeding.robotClient.photo_locs[:]))) self.command_quene.put(FeedCommand(FeedingConfig(num, FeedLine(self.feedLine_dict[line_head].id,self.feedLine_dict[line_head].name,self.feedLine_dict[line_head].positions), self.feeding.robotClient.photo_locs[:])))
self.stackedWidget_num.setCurrentIndex(1) # self.stackedWidget_num.setCurrentIndex(1)
self.set_run_status_button(True) self.set_run_status_button(True)
self.feeding.pause = False self.feeding.pause = False
log.log_message(logging.INFO, f'{self.feedLine_dict[line_head].name}:{Constant.str_feed_start}') log.log_message(logging.INFO, f'{self.feedLine_dict[line_head].name}:{Constant.str_feed_start}')
@ -1157,8 +1159,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
def send_reset_button_click(self): def send_reset_button_click(self):
# TODO 清楚痕迹 # TODO 清楚痕迹
# TODO 开启自动 # TODO 开启自动
# 触发自动运行
if self.robotClient.status_model.curMode != 7:
self.send_switch_tool_command()
log.log_message(logging.INFO, Constant.str_sys_switch_tool)
self.send_start_tool_command()
log.log_message(logging.INFO, Constant.str_sys_start_tool)
line_head = self.comboBox_lineIndex.currentData() line_head = self.comboBox_lineIndex.currentData()
self.send_clear_auto_command()
#safe_position = self.feedLine_dict[line_head].safe_position #safe_position = self.feedLine_dict[line_head].safe_position
# self.send_position_command(safe_position.X, safe_position.Y, safe_position.Z, safe_position.U, safe_position.V, safe_position.W,move_type=MoveType.WORLD) # self.send_position_command(safe_position.X, safe_position.Y, safe_position.Z, safe_position.U, safe_position.V, safe_position.W,move_type=MoveType.WORLD)
if self.remain_lineName != '': if self.remain_lineName != '':
@ -1272,10 +1282,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
position_origin.init_position(self.robotClient.origin_position) position_origin.init_position(self.robotClient.origin_position)
position_origin.status = 1 position_origin.status = 1
command.feed_config.feedLine.feed_positions.insert(0,position_origin) command.feed_config.feedLine.feed_positions.insert(0,position_origin)
self.feeding.feedConfig = command.feed_config
self.robotClient.send_emergency_sound() self.robotClient.send_emergency_sound()
time.sleep(5) time.sleep(5)
self.robotClient.send_emergency_stop() self.robotClient.send_emergency_stop()
self.feeding.feedConfig = command.feed_config
self.feeding.feedStatus = FeedStatus.FStart self.feeding.feedStatus = FeedStatus.FStart
# self.feeding.feed_Mid_Status = FeedMidStatus.FMid_Start # self.feeding.feed_Mid_Status = FeedMidStatus.FMid_Start
command.status = Status.Runing command.status = Status.Runing
@ -1283,7 +1294,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
try: try:
self.feeding.run() self.feeding.run()
self.feeding.run_reseet() self.feeding.run_reset()
except: except:
print(Error_Code.SYS_NONEPoint) print(Error_Code.SYS_NONEPoint)
@ -1338,7 +1349,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.updateUI_label_status() self.updateUI_label_status()
self.updateUI_frame_sign(self.feeding.feedStatus) self.updateUI_frame_sign(self.feeding.feedStatus)
self.updateUI_IOPanel() self.updateUI_IOPanel()
self.updateUI_InfoMB()
def updateRobotSeting(self): def updateRobotSeting(self):
@ -1349,11 +1360,20 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.lineEdit_origin_v.setText(str(self.robotClient.origin_position.V)) self.lineEdit_origin_v.setText(str(self.robotClient.origin_position.V))
self.lineEdit_origin_w.setText(str(self.robotClient.origin_position.W)) self.lineEdit_origin_w.setText(str(self.robotClient.origin_position.W))
def updateUI_InfoMB(self): def show_no_photo_message_box(self):
if self.cton_take_no_photo.Q(self.feeding.take_no_photo,True): self.feeding.pause = True
self.show_infomessage_box("未识别到料袋报警,请重新放料后,点击继续") self.send_pause_command(pause=1)
self.send_pause_command(pause=1) msg_box_person = QMessageBox()
self.feeding.pause = True msg_box_person.setIcon(QMessageBox.Icon.Warning)
msg_box_person.setText("未识别到料袋报警,请重新放料后,点击继续")
msg_box_person.setWindowTitle("提示")
msg_box_person.setStandardButtons(QMessageBox.StandardButton.Ok)
result = msg_box_person.exec()
if result == QMessageBox.StandardButton.Cancel:
return
# self.show_infomessage_box("")
def updateUI_IOPanel(self): def updateUI_IOPanel(self):
try: try:

102
test2.py
View File

@ -1,76 +1,54 @@
from PySide6.QtWidgets import QApplication, QPushButton, QMainWindow import threading
from PySide6.QtGui import QPainter, QLinearGradient, QColor, QFont
from PySide6.QtCore import Qt, QRectF
import sys
class GradientButton(QPushButton): from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QMessageBox
def __init__(self, text, parent=None): from PySide6.QtCore import QThread, Signal, QObject
super().__init__(text, parent)
# 设置按钮无边框
self.setFlat(True)
# 设置按钮文本对齐方式
# 设置按钮字体 class Worker:
self.setFont(QFont("Arial", 14, QFont.Bold)) # 定义一个类属性的信号
# 启用鼠标追踪以便在悬停时重绘
self.setMouseTracking(True)
# 当前是否悬停
self.hover = False
def paintEvent(self, event): def __init__(self):
painter = QPainter(self) self.task_done_signal = Signal(str)
painter.setRenderHint(QPainter.Antialiasing) def run_task(self):
import time
time.sleep(2) # 模拟耗时操作
# 发送信号
self.task_done_signal.emit("子线程任务完成!")
# 获取按钮的矩形区域
rect = self.rect()
# 创建线性渐变,从中心线向上下渐变
gradient = QLinearGradient(rect.center().x(), rect.top(), rect.center().x(), rect.bottom())
gradient.setColorAt(0, QColor(225,225,225))
gradient.setColorAt(0.5, QColor('#1A1F38'))
gradient.setColorAt(1, QColor(225,225,225))
brush = gradient
painter.setBrush(brush)
painter.setPen(Qt.NoPen)
# 绘制圆角矩形作为按钮背景
radius = 2 # 圆角半径
painter.drawRoundedRect(QRectF(rect), radius, radius)
# 绘制按钮文本
painter.setPen(QColor('#E8E9EB')) # 设置字体为白色
painter.drawText(rect, Qt.AlignCenter, self.text())
def enterEvent(self, event):
self.hover = True
self.update() # 触发重绘
super().enterEvent(event)
def leaveEvent(self, event):
self.hover = False
self.update() # 触发重绘
super().leaveEvent(event)
class MainWindow(QMainWindow): class MainWindow(QMainWindow):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.setWindowTitle("中心线性渐变按钮示例") self.setWindowTitle("子线程信号示例")
self.setFixedSize(400, 300) self.setGeometry(200, 200, 400, 300)
# 创建自定义渐变按钮 # 添加按钮
self.button = GradientButton("点击我", self) self.button = QPushButton("启动子线程", self)
self.button.setGeometry(100, 130, 100, 40) self.button.setGeometry(100, 100, 200, 50)
# 连接按钮点击事件 self.button.clicked.connect(self.run_task)
self.button.clicked.connect(self.on_button_click)
def on_button_click(self): # 创建子线程和工作者对象
print("按钮被点击了!") self.worker_thread = threading.Thread(target=self.run_task)
self.worker = Worker()
# 连接信号和槽
self.worker.task_done_signal.connect(self.show_message)
def run_task(self):
# 启动子线程
self.worker_thread.start()
def show_message(self, message):
# 显示来自子线程的消息
QMessageBox.information(self, "任务完成", message)
# 停止子线程
self.worker_thread.quit()
self.worker_thread.wait()
if __name__ == "__main__": if __name__ == "__main__":
app = QApplication(sys.argv) app = QApplication([])
window = MainWindow() window = MainWindow()
window.show() window.show()
sys.exit(app.exec())
app.exec()

View File

@ -1533,114 +1533,118 @@ class Ui_MainWindow(object):
"border:None;") "border:None;")
self.frame_27.setFrameShape(QFrame.Shape.StyledPanel) self.frame_27.setFrameShape(QFrame.Shape.StyledPanel)
self.frame_27.setFrameShadow(QFrame.Shadow.Raised) self.frame_27.setFrameShadow(QFrame.Shadow.Raised)
self.horizontalLayout_15 = QHBoxLayout(self.frame_27) self.gridLayout_9 = QGridLayout(self.frame_27)
self.horizontalLayout_15.setObjectName(u"horizontalLayout_15") self.gridLayout_9.setObjectName(u"gridLayout_9")
self.label_90 = QLabel(self.frame_27) self.gridLayout_9.setVerticalSpacing(80)
self.label_90.setObjectName(u"label_90") self.label_92 = QLabel(self.frame_27)
sizePolicy2.setHeightForWidth(self.label_90.sizePolicy().hasHeightForWidth()) self.label_92.setObjectName(u"label_92")
self.label_90.setSizePolicy(sizePolicy2) sizePolicy7 = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
self.label_90.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) sizePolicy7.setHorizontalStretch(0)
sizePolicy7.setVerticalStretch(0)
sizePolicy7.setHeightForWidth(self.label_92.sizePolicy().hasHeightForWidth())
self.label_92.setSizePolicy(sizePolicy7)
self.label_92.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout_15.addWidget(self.label_90) self.gridLayout_9.addWidget(self.label_92, 1, 2, 1, 1)
self.lineEdit_origin_x = QLineEdit(self.frame_27)
self.lineEdit_origin_x.setObjectName(u"lineEdit_origin_x")
sizePolicy2.setHeightForWidth(self.lineEdit_origin_x.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_x.setSizePolicy(sizePolicy2)
self.lineEdit_origin_x.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_x.setReadOnly(True)
self.horizontalLayout_15.addWidget(self.lineEdit_origin_x)
self.label_93 = QLabel(self.frame_27)
self.label_93.setObjectName(u"label_93")
sizePolicy2.setHeightForWidth(self.label_93.sizePolicy().hasHeightForWidth())
self.label_93.setSizePolicy(sizePolicy2)
self.label_93.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout_15.addWidget(self.label_93)
self.lineEdit_origin_y = QLineEdit(self.frame_27) self.lineEdit_origin_y = QLineEdit(self.frame_27)
self.lineEdit_origin_y.setObjectName(u"lineEdit_origin_y") self.lineEdit_origin_y.setObjectName(u"lineEdit_origin_y")
sizePolicy2.setHeightForWidth(self.lineEdit_origin_y.sizePolicy().hasHeightForWidth()) sizePolicy4.setHeightForWidth(self.lineEdit_origin_y.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_y.setSizePolicy(sizePolicy2) self.lineEdit_origin_y.setSizePolicy(sizePolicy4)
self.lineEdit_origin_y.setStyleSheet(u"border:1px solid #FFFfff") self.lineEdit_origin_y.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_y.setReadOnly(True) self.lineEdit_origin_y.setReadOnly(True)
self.horizontalLayout_15.addWidget(self.lineEdit_origin_y) self.gridLayout_9.addWidget(self.lineEdit_origin_y, 0, 3, 1, 1)
self.label_88 = QLabel(self.frame_27)
self.label_88.setObjectName(u"label_88")
sizePolicy2.setHeightForWidth(self.label_88.sizePolicy().hasHeightForWidth())
self.label_88.setSizePolicy(sizePolicy2)
self.label_88.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout_15.addWidget(self.label_88)
self.lineEdit_origin_z = QLineEdit(self.frame_27)
self.lineEdit_origin_z.setObjectName(u"lineEdit_origin_z")
sizePolicy2.setHeightForWidth(self.lineEdit_origin_z.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_z.setSizePolicy(sizePolicy2)
self.lineEdit_origin_z.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_z.setReadOnly(True)
self.horizontalLayout_15.addWidget(self.lineEdit_origin_z)
self.label_89 = QLabel(self.frame_27)
self.label_89.setObjectName(u"label_89")
sizePolicy2.setHeightForWidth(self.label_89.sizePolicy().hasHeightForWidth())
self.label_89.setSizePolicy(sizePolicy2)
self.label_89.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout_15.addWidget(self.label_89)
self.lineEdit_origin_u = QLineEdit(self.frame_27)
self.lineEdit_origin_u.setObjectName(u"lineEdit_origin_u")
sizePolicy2.setHeightForWidth(self.lineEdit_origin_u.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_u.setSizePolicy(sizePolicy2)
self.lineEdit_origin_u.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_u.setReadOnly(True)
self.horizontalLayout_15.addWidget(self.lineEdit_origin_u)
self.label_92 = QLabel(self.frame_27)
self.label_92.setObjectName(u"label_92")
sizePolicy2.setHeightForWidth(self.label_92.sizePolicy().hasHeightForWidth())
self.label_92.setSizePolicy(sizePolicy2)
self.label_92.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout_15.addWidget(self.label_92)
self.lineEdit_origin_v = QLineEdit(self.frame_27) self.lineEdit_origin_v = QLineEdit(self.frame_27)
self.lineEdit_origin_v.setObjectName(u"lineEdit_origin_v") self.lineEdit_origin_v.setObjectName(u"lineEdit_origin_v")
sizePolicy2.setHeightForWidth(self.lineEdit_origin_v.sizePolicy().hasHeightForWidth()) sizePolicy4.setHeightForWidth(self.lineEdit_origin_v.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_v.setSizePolicy(sizePolicy2) self.lineEdit_origin_v.setSizePolicy(sizePolicy4)
self.lineEdit_origin_v.setStyleSheet(u"border:1px solid #FFFfff") self.lineEdit_origin_v.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_v.setReadOnly(True) self.lineEdit_origin_v.setReadOnly(True)
self.horizontalLayout_15.addWidget(self.lineEdit_origin_v) self.gridLayout_9.addWidget(self.lineEdit_origin_v, 1, 3, 1, 1)
self.label_88 = QLabel(self.frame_27)
self.label_88.setObjectName(u"label_88")
sizePolicy7.setHeightForWidth(self.label_88.sizePolicy().hasHeightForWidth())
self.label_88.setSizePolicy(sizePolicy7)
self.label_88.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_9.addWidget(self.label_88, 0, 4, 1, 1)
self.label_93 = QLabel(self.frame_27)
self.label_93.setObjectName(u"label_93")
sizePolicy7.setHeightForWidth(self.label_93.sizePolicy().hasHeightForWidth())
self.label_93.setSizePolicy(sizePolicy7)
self.label_93.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_9.addWidget(self.label_93, 0, 2, 1, 1)
self.label_95 = QLabel(self.frame_27)
self.label_95.setObjectName(u"label_95")
sizePolicy7.setHeightForWidth(self.label_95.sizePolicy().hasHeightForWidth())
self.label_95.setSizePolicy(sizePolicy7)
self.label_95.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_9.addWidget(self.label_95, 1, 0, 1, 1)
self.label_90 = QLabel(self.frame_27)
self.label_90.setObjectName(u"label_90")
sizePolicy7.setHeightForWidth(self.label_90.sizePolicy().hasHeightForWidth())
self.label_90.setSizePolicy(sizePolicy7)
self.label_90.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_9.addWidget(self.label_90, 0, 0, 1, 1)
self.lineEdit_origin_u = QLineEdit(self.frame_27)
self.lineEdit_origin_u.setObjectName(u"lineEdit_origin_u")
sizePolicy4.setHeightForWidth(self.lineEdit_origin_u.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_u.setSizePolicy(sizePolicy4)
self.lineEdit_origin_u.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_u.setReadOnly(True)
self.gridLayout_9.addWidget(self.lineEdit_origin_u, 1, 1, 1, 1)
self.lineEdit_origin_x = QLineEdit(self.frame_27)
self.lineEdit_origin_x.setObjectName(u"lineEdit_origin_x")
sizePolicy4.setHeightForWidth(self.lineEdit_origin_x.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_x.setSizePolicy(sizePolicy4)
self.lineEdit_origin_x.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_x.setReadOnly(True)
self.gridLayout_9.addWidget(self.lineEdit_origin_x, 0, 1, 1, 1)
self.label_91 = QLabel(self.frame_27) self.label_91 = QLabel(self.frame_27)
self.label_91.setObjectName(u"label_91") self.label_91.setObjectName(u"label_91")
sizePolicy2.setHeightForWidth(self.label_91.sizePolicy().hasHeightForWidth()) sizePolicy7.setHeightForWidth(self.label_91.sizePolicy().hasHeightForWidth())
self.label_91.setSizePolicy(sizePolicy2) self.label_91.setSizePolicy(sizePolicy7)
self.label_91.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.label_91.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout_15.addWidget(self.label_91) self.gridLayout_9.addWidget(self.label_91, 1, 4, 1, 1)
self.lineEdit_origin_w = QLineEdit(self.frame_27) self.lineEdit_origin_w = QLineEdit(self.frame_27)
self.lineEdit_origin_w.setObjectName(u"lineEdit_origin_w") self.lineEdit_origin_w.setObjectName(u"lineEdit_origin_w")
sizePolicy2.setHeightForWidth(self.lineEdit_origin_w.sizePolicy().hasHeightForWidth()) sizePolicy4.setHeightForWidth(self.lineEdit_origin_w.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_w.setSizePolicy(sizePolicy2) self.lineEdit_origin_w.setSizePolicy(sizePolicy4)
self.lineEdit_origin_w.setStyleSheet(u"border:1px solid #FFFfff") self.lineEdit_origin_w.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_w.setReadOnly(True) self.lineEdit_origin_w.setReadOnly(True)
self.horizontalLayout_15.addWidget(self.lineEdit_origin_w) self.gridLayout_9.addWidget(self.lineEdit_origin_w, 1, 5, 1, 1)
self.lineEdit_origin_z = QLineEdit(self.frame_27)
self.lineEdit_origin_z.setObjectName(u"lineEdit_origin_z")
sizePolicy4.setHeightForWidth(self.lineEdit_origin_z.sizePolicy().hasHeightForWidth())
self.lineEdit_origin_z.setSizePolicy(sizePolicy4)
self.lineEdit_origin_z.setStyleSheet(u"border:1px solid #FFFfff")
self.lineEdit_origin_z.setReadOnly(True)
self.gridLayout_9.addWidget(self.lineEdit_origin_z, 0, 5, 1, 1)
self.pushButton_get_origin = QPushButton(self.frame_27) self.pushButton_get_origin = QPushButton(self.frame_27)
self.pushButton_get_origin.setObjectName(u"pushButton_get_origin") self.pushButton_get_origin.setObjectName(u"pushButton_get_origin")
sizePolicy2.setHeightForWidth(self.pushButton_get_origin.sizePolicy().hasHeightForWidth()) sizePolicy4.setHeightForWidth(self.pushButton_get_origin.sizePolicy().hasHeightForWidth())
self.pushButton_get_origin.setSizePolicy(sizePolicy2) self.pushButton_get_origin.setSizePolicy(sizePolicy4)
self.pushButton_get_origin.setStyleSheet(u"\n" self.pushButton_get_origin.setStyleSheet(u"\n"
"*{\n" "*{\n"
"color: #ffffff;\n" "color: #ffffff;\n"
@ -1655,12 +1659,12 @@ class Ui_MainWindow(object):
"}\n" "}\n"
"") "")
self.horizontalLayout_15.addWidget(self.pushButton_get_origin) self.gridLayout_9.addWidget(self.pushButton_get_origin, 2, 1, 1, 2)
self.pushButton_set_origin = QPushButton(self.frame_27) self.pushButton_set_origin = QPushButton(self.frame_27)
self.pushButton_set_origin.setObjectName(u"pushButton_set_origin") self.pushButton_set_origin.setObjectName(u"pushButton_set_origin")
sizePolicy2.setHeightForWidth(self.pushButton_set_origin.sizePolicy().hasHeightForWidth()) sizePolicy4.setHeightForWidth(self.pushButton_set_origin.sizePolicy().hasHeightForWidth())
self.pushButton_set_origin.setSizePolicy(sizePolicy2) self.pushButton_set_origin.setSizePolicy(sizePolicy4)
self.pushButton_set_origin.setStyleSheet(u"\n" self.pushButton_set_origin.setStyleSheet(u"\n"
"*{\n" "*{\n"
"color: #ffffff;\n" "color: #ffffff;\n"
@ -1675,12 +1679,14 @@ class Ui_MainWindow(object):
"}\n" "}\n"
"") "")
self.horizontalLayout_15.addWidget(self.pushButton_set_origin) self.gridLayout_9.addWidget(self.pushButton_set_origin, 2, 4, 1, 2)
self.gridLayout_9.setRowStretch(0, 1)
self.gridLayout_9.setRowStretch(1, 1)
self.gridLayout_9.setRowStretch(2, 1)
self.verticalLayout_16.addWidget(self.frame_27) self.verticalLayout_16.addWidget(self.frame_27)
self.verticalLayout_16.setStretch(0, 1)
self.verticalLayout_15.addWidget(self.frame_6) self.verticalLayout_15.addWidget(self.frame_6)
@ -2453,11 +2459,11 @@ class Ui_MainWindow(object):
self.verticalLayout_18.setObjectName(u"verticalLayout_18") self.verticalLayout_18.setObjectName(u"verticalLayout_18")
self.frame_29 = QFrame(self.frame_8) self.frame_29 = QFrame(self.frame_8)
self.frame_29.setObjectName(u"frame_29") self.frame_29.setObjectName(u"frame_29")
sizePolicy7 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum) sizePolicy8 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum)
sizePolicy7.setHorizontalStretch(0) sizePolicy8.setHorizontalStretch(0)
sizePolicy7.setVerticalStretch(0) sizePolicy8.setVerticalStretch(0)
sizePolicy7.setHeightForWidth(self.frame_29.sizePolicy().hasHeightForWidth()) sizePolicy8.setHeightForWidth(self.frame_29.sizePolicy().hasHeightForWidth())
self.frame_29.setSizePolicy(sizePolicy7) self.frame_29.setSizePolicy(sizePolicy8)
self.frame_29.setFrameShape(QFrame.Shape.StyledPanel) self.frame_29.setFrameShape(QFrame.Shape.StyledPanel)
self.frame_29.setFrameShadow(QFrame.Shadow.Raised) self.frame_29.setFrameShadow(QFrame.Shadow.Raised)
self.gridLayout_6 = QGridLayout(self.frame_29) self.gridLayout_6 = QGridLayout(self.frame_29)
@ -3787,7 +3793,7 @@ class Ui_MainWindow(object):
self.retranslateUi(MainWindow) self.retranslateUi(MainWindow)
self.stackedWidget_view.setCurrentIndex(3) self.stackedWidget_view.setCurrentIndex(0)
self.tabWidget.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0)
self.stackedWidget_num.setCurrentIndex(0) self.stackedWidget_num.setCurrentIndex(0)
@ -3869,11 +3875,11 @@ class Ui_MainWindow(object):
self.label_76.setText(QCoreApplication.translate("MainWindow", u"30", None)) self.label_76.setText(QCoreApplication.translate("MainWindow", u"30", None))
self.label_83.setText(QCoreApplication.translate("MainWindow", u"31", None)) self.label_83.setText(QCoreApplication.translate("MainWindow", u"31", None))
self.label_79.setText(QCoreApplication.translate("MainWindow", u"32", None)) self.label_79.setText(QCoreApplication.translate("MainWindow", u"32", None))
self.label_90.setText(QCoreApplication.translate("MainWindow", u"X1:", None))
self.label_93.setText(QCoreApplication.translate("MainWindow", u"Y1:", None))
self.label_88.setText(QCoreApplication.translate("MainWindow", u"Z1:", None))
self.label_89.setText(QCoreApplication.translate("MainWindow", u"U1:", None))
self.label_92.setText(QCoreApplication.translate("MainWindow", u"V1:", None)) self.label_92.setText(QCoreApplication.translate("MainWindow", u"V1:", None))
self.label_88.setText(QCoreApplication.translate("MainWindow", u"Z1:", None))
self.label_93.setText(QCoreApplication.translate("MainWindow", u"Y1:", None))
self.label_95.setText(QCoreApplication.translate("MainWindow", u"U1:", None))
self.label_90.setText(QCoreApplication.translate("MainWindow", u"X1:", None))
self.label_91.setText(QCoreApplication.translate("MainWindow", u"W1:", None)) self.label_91.setText(QCoreApplication.translate("MainWindow", u"W1:", None))
self.pushButton_get_origin.setText(QCoreApplication.translate("MainWindow", u"\u83b7\u53d6\u539f\u70b9", None)) self.pushButton_get_origin.setText(QCoreApplication.translate("MainWindow", u"\u83b7\u53d6\u539f\u70b9", None))
self.pushButton_set_origin.setText(QCoreApplication.translate("MainWindow", u"\u4fdd\u5b58\u539f\u70b9", None)) self.pushButton_set_origin.setText(QCoreApplication.translate("MainWindow", u"\u4fdd\u5b58\u539f\u70b9", None))