From d6551804db7b8fb599ff59773a498afa9c810cda Mon Sep 17 00:00:00 2001 From: 2929ss <1814754095@qq.com> Date: Fri, 22 Jul 2022 11:42:30 +0800 Subject: [PATCH] rename path name --- .../scripts/combine_detect_obj_img_folder_opt.py | 6 ++++-- .../scripts/combine_detect_obj_img_folder_opt.py | 4 ++-- .../scripts/combine_detect_obj_img_folder_opt.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mycobot_ai/ai_mecharm_270/scripts/combine_detect_obj_img_folder_opt.py b/mycobot_ai/ai_mecharm_270/scripts/combine_detect_obj_img_folder_opt.py index 9f676ca..23432f5 100755 --- a/mycobot_ai/ai_mecharm_270/scripts/combine_detect_obj_img_folder_opt.py +++ b/mycobot_ai/ai_mecharm_270/scripts/combine_detect_obj_img_folder_opt.py @@ -431,14 +431,16 @@ class Object_detect(Movement): # The path to save the image folder def parse_folder(folder): restore = [] - path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/mechArm_270/' + folder - path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/mechArm_270/' + folder + path = '' + path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mecharm_270/' + folder + path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mecharm_270/' + folder if os.path.exists(path1): path = path1 elif os.path.exists(path2): path = path2 + # print("path:",path) for i, j, k in os.walk(path): for l in k: restore.append(cv2.imread(folder + '/{}'.format(l))) diff --git a/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py b/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py index 9122ded..91913a3 100644 --- a/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py +++ b/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py @@ -425,8 +425,8 @@ class Object_detect(Movement): # The path to save the image folder def parse_folder(folder): restore = [] - path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/myCobot_280' + folder - path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/myCobot_280/' + folder + path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mycobot_280' + folder + path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mycobot_280/' + folder if os.path.exists(path1): path = path1 elif os.path.exists(path2): diff --git a/mycobot_ai/ai_mypalletizer_260/scripts/combine_detect_obj_img_folder_opt.py b/mycobot_ai/ai_mypalletizer_260/scripts/combine_detect_obj_img_folder_opt.py index c40ffbe..fc051b6 100755 --- a/mycobot_ai/ai_mypalletizer_260/scripts/combine_detect_obj_img_folder_opt.py +++ b/mycobot_ai/ai_mypalletizer_260/scripts/combine_detect_obj_img_folder_opt.py @@ -420,8 +420,8 @@ class Object_detect(Movement): # The path to save the image folder def parse_folder(folder): restore = [] - path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/myPalletizer_260/' + folder - path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/myPalletizer_260/' + folder + path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mypalletizer_260/' + folder + path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mypalletizer_260/' + folder if os.path.exists(path1): path = path1