更新scene
This commit is contained in:
parent
4e9d1e434b
commit
9e4d4f2bf9
|
@ -480,7 +480,7 @@ def get_obstacle_point(sence, db, scene, cur_obstacle_world_points, map_ratio):
|
||||||
# plt.text(0, 0.7, f'检测物体数量:{obj_detect_count}', fontsize=10)
|
# plt.text(0, 0.7, f'检测物体数量:{obj_detect_count}', fontsize=10)
|
||||||
|
|
||||||
# plt.show()
|
# plt.show()
|
||||||
return cur_obstacle_world_points, cur_objs_id
|
return cur_obstacle_world_points, cur_objs_id, obj_detect_count
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import io
|
import io
|
||||||
|
import json
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
@ -1180,7 +1181,7 @@ class Scene:
|
||||||
|
|
||||||
# cur_obstacle_world_points, cur_objs_id = camera.get_obstacle_point(plt, db, scene,
|
# cur_obstacle_world_points, cur_objs_id = camera.get_obstacle_point(plt, db, scene,
|
||||||
# cur_obstacle_world_points, map_ratio)
|
# cur_obstacle_world_points, map_ratio)
|
||||||
cur_obstacle_world_points, cur_objs_id = camera.get_obstacle_point(self, db, scene,
|
cur_obstacle_world_points, cur_objs_id, obj_detect_count= camera.get_obstacle_point(self, db, scene,
|
||||||
cur_obstacle_world_points, map_ratio)
|
cur_obstacle_world_points, map_ratio)
|
||||||
# cur_obstacle_world_points, cur_objs_id = self.get_obstacle_point(db, scene, map_ratio)
|
# cur_obstacle_world_points, cur_objs_id = self.get_obstacle_point(db, scene, map_ratio)
|
||||||
# # self.get_obstacle_point(db, scene, cur_obstacle_world_points, map_ratio)
|
# # self.get_obstacle_point(db, scene, cur_obstacle_world_points, map_ratio)
|
||||||
|
@ -1206,12 +1207,12 @@ class Scene:
|
||||||
# cur_objs, objs_name_set = camera.get_semantic_map(GrabSim_pb2.CameraName.Head_Segment, cur_objs,
|
# cur_objs, objs_name_set = camera.get_semantic_map(GrabSim_pb2.CameraName.Head_Segment, cur_objs,
|
||||||
# objs_name_set)
|
# objs_name_set)
|
||||||
|
|
||||||
cur_obstacle_world_points, cur_objs_id = camera.get_obstacle_point(self, db, scene,
|
cur_obstacle_world_points, cur_objs_id, obj_detect_count= camera.get_obstacle_point(self, db, scene,
|
||||||
cur_obstacle_world_points, map_ratio)
|
cur_obstacle_world_points, map_ratio)
|
||||||
|
|
||||||
# if scene.info == "Unreachable":
|
# if scene.info == "Unreachable":
|
||||||
print(scene.info)
|
print(scene.info)
|
||||||
return cur_obstacle_world_points, cur_objs_id
|
return cur_obstacle_world_points, cur_objs_id, obj_detect_count
|
||||||
|
|
||||||
def isOutMap(self, pos, min_x=-200, max_x=600, min_y=-250, max_y=1300):
|
def isOutMap(self, pos, min_x=-200, max_x=600, min_y=-250, max_y=1300):
|
||||||
if pos[0] <= min_x or pos[0] >= max_x or pos[1] <= min_y or pos[1] >= max_y:
|
if pos[0] <= min_x or pos[0] >= max_x or pos[1] <= min_y or pos[1] >= max_y:
|
||||||
|
@ -1610,7 +1611,12 @@ class Scene:
|
||||||
semantic_info_str+= f'检测行人数量:{walker_detect_count}'+"\n\n"
|
semantic_info_str+= f'检测行人数量:{walker_detect_count}'+"\n\n"
|
||||||
semantic_info_str += f'检测物体数量:{obj_detect_count}' + "\n\n"
|
semantic_info_str += f'检测物体数量:{obj_detect_count}' + "\n\n"
|
||||||
semantic_info_str += f'更新语义信息:{update_info_count}' + "\n\n"
|
semantic_info_str += f'更新语义信息:{update_info_count}' + "\n\n"
|
||||||
semantic_info_str += f'已存语义信息:{self.infoCount}' + "\n"
|
|
||||||
|
|
||||||
|
file_json_name = os.path.join(root_path, 'robowaiter/proto/objs.json')
|
||||||
|
with open(file_json_name) as f:
|
||||||
|
data = json.load(f)
|
||||||
|
semantic_info_str += f'已存语义信息:{len(data)}' + "\n"
|
||||||
|
|
||||||
# print("======semantic_info_str===========")
|
# print("======semantic_info_str===========")
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ class SceneUI(Scene):
|
||||||
break
|
break
|
||||||
# cur_obstacle_world_points, cur_objs_id = self.navigation_move(plt, cur_objs, cur_obstacle_world_points,
|
# cur_obstacle_world_points, cur_objs_id = self.navigation_move(plt, cur_objs, cur_obstacle_world_points,
|
||||||
# [[goal[0], goal[1]]], map_ratio, db, 0, 11)
|
# [[goal[0], goal[1]]], map_ratio, db, 0, 11)
|
||||||
cur_obstacle_world_points, cur_objs_id = self.navigation_move(self, cur_objs, cur_obstacle_world_points,
|
cur_obstacle_world_points, cur_objs_id, obj_detect_count = self.navigation_move(self, cur_objs, cur_obstacle_world_points,
|
||||||
[[goal[0], goal[1]]], map_ratio, db, 0, 11)
|
[[goal[0], goal[1]]], map_ratio, db, 0, 11)
|
||||||
for point in cur_obstacle_world_points:
|
for point in cur_obstacle_world_points:
|
||||||
if point[0] < -350 or point[0] > 600 or point[1] < -400 or point[1] > 1450:
|
if point[0] < -350 or point[0] > 600 or point[1] < -400 or point[1] > 1450:
|
||||||
|
@ -113,7 +113,19 @@ class SceneUI(Scene):
|
||||||
# 已存语义信息
|
# 已存语义信息
|
||||||
added_info += new_add_info
|
added_info += new_add_info
|
||||||
# plt.text(0, 0.3, f'已存语义信息:{added_info}', fontsize=10) # 在图中添加文字,x和y坐标是在这个图片大小内的相对位置,fontsize是字体大小
|
# plt.text(0, 0.3, f'已存语义信息:{added_info}', fontsize=10) # 在图中添加文字,x和y坐标是在这个图片大小内的相对位置,fontsize是字体大小
|
||||||
|
|
||||||
|
|
||||||
|
semantic_info_str = ""
|
||||||
|
# semantic_info_str += f'检测行人数量:{walker_detect_count}' + "\n\n"
|
||||||
|
semantic_info_str += f'检测物体数量:{obj_detect_count}' + "\n\n"
|
||||||
|
semantic_info_str += f'更新语义信息:{new_add_info}' + "\n\n"
|
||||||
|
semantic_info_str += f'已存语义信息:{self.infoCount}' + "\n"
|
||||||
|
|
||||||
self.infoCount = added_info
|
self.infoCount = added_info
|
||||||
|
|
||||||
|
# print("======semantic_info_str===========")
|
||||||
|
|
||||||
|
self.ui_func(("get_semantic_info", semantic_info_str))
|
||||||
plt.axis("off")
|
plt.axis("off")
|
||||||
# plt.show()
|
# plt.show()
|
||||||
print("------------当前检测到的物品信息--------------")
|
print("------------当前检测到的物品信息--------------")
|
||||||
|
|
|
@ -344,7 +344,7 @@ class Ui_MainWindow(object):
|
||||||
self.btn_VLN.setText(_translate("MainWindow", "视觉语言导航"))
|
self.btn_VLN.setText(_translate("MainWindow", "视觉语言导航"))
|
||||||
self.btn_VLM.setText(_translate("MainWindow", "视觉语言操作"))
|
self.btn_VLM.setText(_translate("MainWindow", "视觉语言操作"))
|
||||||
self.btn_GQA.setText(_translate("MainWindow", "具身多轮对话"))
|
self.btn_GQA.setText(_translate("MainWindow", "具身多轮对话"))
|
||||||
self.btn_OT.setText(_translate("MainWindow", "开放具身任务"))
|
self.btn_OT.setText(_translate("MainWindow", "复杂具身任务"))
|
||||||
self.btn_AT.setText(_translate("MainWindow", "自主具身任务"))
|
self.btn_AT.setText(_translate("MainWindow", "自主具身任务"))
|
||||||
self.cb_task.setPlaceholderText(_translate("MainWindow", "其他任务"))
|
self.cb_task.setPlaceholderText(_translate("MainWindow", "其他任务"))
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>开放具身任务</string>
|
<string>复杂具身任务</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue