修复ui bug
This commit is contained in:
parent
bd7359143f
commit
ae5dc2222e
Binary file not shown.
Before Width: | Height: | Size: 794 KiB After Width: | Height: | Size: 92 KiB |
Binary file not shown.
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
@ -1177,6 +1177,9 @@ class Scene:
|
|||
return world_coordinates
|
||||
|
||||
def ui_func(self,args):
|
||||
plt.show()
|
||||
|
||||
def draw_current_bt(self):
|
||||
pass
|
||||
|
||||
def get_obstacle_point(self, db, scene, map_ratio, update_info_count=0):
|
||||
|
@ -1357,7 +1360,6 @@ class Scene:
|
|||
# plt.text(0, 0.1, f'已存语义信息:{self.infoCount}', fontsize=10)
|
||||
|
||||
output_path = os.path.join(self.output_path,"vision.png")
|
||||
plt.savefig(output_path)
|
||||
|
||||
# canvas = FigureCanvas(plt.gcf())
|
||||
# fig = plt.gcf() # 获取当前figure
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 92 KiB |
|
@ -4,6 +4,7 @@
|
|||
import tkinter as tk
|
||||
from robowaiter.utils.ui.pyqt5 import UI
|
||||
import os
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
# todo: 接收点单信息,大模型生成任务规划
|
||||
|
||||
|
@ -14,13 +15,13 @@ class SceneUI(Scene):
|
|||
scene_queue = None
|
||||
ui_queue = None
|
||||
# camera_interval = 4
|
||||
|
||||
def __init__(self, robot,scene_queue,ui_queue):
|
||||
self.scene_queue = scene_queue
|
||||
self.ui_queue = ui_queue
|
||||
|
||||
super().__init__(robot)
|
||||
# 在这里加入场景中发生的事件
|
||||
self.take_picture = True
|
||||
|
||||
# while True:
|
||||
# if not self.scene_queue.empty():
|
||||
|
@ -43,6 +44,9 @@ class SceneUI(Scene):
|
|||
self.ui_queue.put(('draw_from_file',"img_label_bt", f"{self.output_path}/current_bt.png"))
|
||||
|
||||
def ui_func(self,args):
|
||||
_,_,output_path = args
|
||||
plt.savefig(output_path)
|
||||
|
||||
self.ui_queue.put(args)
|
||||
|
||||
def _reset(self):
|
||||
|
|
|
@ -15,11 +15,11 @@ class Ui_MainWindow(object):
|
|||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(960, 1080)
|
||||
MainWindow.setAutoFillBackground(True)
|
||||
MainWindow.setAutoFillBackground(False)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.edit_say = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.edit_say.setGeometry(QtCore.QRect(450, 30, 221, 31))
|
||||
self.edit_say.setGeometry(QtCore.QRect(430, 40, 221, 31))
|
||||
self.edit_say.setObjectName("edit_say")
|
||||
self.btn_say = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.btn_say.setGeometry(QtCore.QRect(680, 40, 75, 23))
|
||||
|
@ -52,7 +52,7 @@ class Ui_MainWindow(object):
|
|||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
||||
self.edit_say.setText(_translate("MainWindow", "做一杯咖啡"))
|
||||
self.edit_say.setText(_translate("MainWindow", "Is(AC,On)"))
|
||||
self.btn_say.setText(_translate("MainWindow", "说话"))
|
||||
self.label_5.setText(_translate("MainWindow", "语义地图"))
|
||||
|
||||
|
|
|
@ -14,20 +14,20 @@
|
|||
<string>MainWindow</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QLineEdit" name="edit_say">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>450</x>
|
||||
<y>30</y>
|
||||
<x>430</x>
|
||||
<y>40</y>
|
||||
<width>221</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>做一杯咖啡</string>
|
||||
<string>Is(AC,On)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btn_say">
|
||||
|
|
Loading…
Reference in New Issue