LingxinMeng 6 月之前
父节点
当前提交
820f229e03
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 6 7
      src/python2/pjibot/csv-pjibot_guide.py

+ 6 - 7
src/python2/pjibot/csv-pjibot_guide.py

@@ -107,6 +107,9 @@ def parse_csv(costmap_bag, data_bag, parse_prefix, local_parse_dir, local_delete
         # 这里不要删除了,不然无法复现pdf
         # bucket.delete_object(track_png_key)
     except Exception as e2:
+        error_bag_list = parse_json_to_string_array(error_bag_json)
+        error_bag_list.append(parse_prefix)
+        list_to_json_file(error_bag_list, error_bag_json)
         # 当出现异常时执行的代码
         logging.exception("生成csv报错: %s", e2)
 
@@ -136,23 +139,19 @@ if __name__ == '__main__':
                     csv1_done = False
                     csv2_done = False
                     csv3_done = False
-                    callback_undone = False
                     for obj2 in oss2.ObjectIterator(bucket, prefix=parse_prefix_full):
-                        if '/callback.json' in str(obj2.key):
-                            callback_undone = True
                         if '/pos_pji.csv' in str(obj2.key):
                             csv1_done = True
                         if '/EgoState_pji.csv' in str(obj2.key):
                             csv2_done = True
                         if '/merged_obstacles.csv' in str(obj2.key):
                             csv3_done = True
-                    if not callback_undone:  # 没有 callback.json
-                        continue
                     if csv1_done and csv2_done and csv3_done:
                         continue
-
+                    error_bag_list = parse_json_to_string_array(error_bag_json)
+                    if parse_prefix_full in error_bag_list:
+                        continue
                     logging.info("开始生成场景还原csv: %s" % str(obj1.key))
-                    # print(f'需要解析{merged_bag_object_key}')
                     local_merged_bag_path = path1 + 'camera/' + merged_bag_object_key
                     local_merged_dir = '/'.join(local_merged_bag_path.split('/')[:-1])
                     local_parse_dir = local_merged_dir.replace('data_merge', 'data_parse')