ZihaoYANG 9 hónapja
szülő
commit
50437ba9b4
6 módosított fájl, 107 hozzáadás és 37 törlés
  1. 0 0
      config/config_lka_0730.json
  2. 2 1
      custom/center_distance_expectation.py
  3. 69 0
      log.log
  4. 1 1
      single_run_test.py
  5. 16 14
      status.py
  6. 19 21
      status_mapping.py

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
config/config_lka_0730.json


+ 2 - 1
custom/center_distance_expectation.py

@@ -110,7 +110,8 @@ class CustomMetric(object):
         self.result['tableData']['min'] = '-'
 
         zip_vs_time = zip_time_pairs(time_list, line_dist_list)
-        self.result['reportData']['data'] = zip_vs_time
+        self.result['reportData']['data'] = []
+        # self.result['reportData']['data'] = zip_vs_time
 
         self.markline_statistic()
         markline_slices = self.markline_df.to_dict('records')

+ 69 - 0
log.log

@@ -19772,3 +19772,72 @@ ValueError: Merge keys contain null values on left side
 [2024-08-14 17:58:27,118] - [WARNING] [data_process.py] [line:97] - [[case:0710-001] SINGLE_CASE_EVAL: [VehState.csv] data 'APA_status' invalid WARNING!]
 [2024-08-14 17:58:27,119] - [WARNING] [data_process.py] [line:97] - [[case:0710-001] SINGLE_CASE_EVAL: [VehState.csv] data 'MEB_status' invalid WARNING!]
 [2024-08-14 17:58:27,119] - [WARNING] [data_process.py] [line:97] - [[case:0710-001] SINGLE_CASE_EVAL: [VehState.csv] data 'RDA_status' invalid WARNING!]
+[2024-08-15 10:14:58,167] - [INFO] [single_run_test.py] [line:301] - [[case:accident_0716_6] SINGLE_CASE_EVAL: Start evaluating:]
+[2024-08-15 10:14:58,250] - [ERROR] [single_case_eval.py] [line:103] - [[case:accident_0716_6] SINGLE_CASE_EVAL: frame loss statistic ERROR: ParserError('Error tokenizing data. C error: Expected 30 fields in line 2127, saw 31\n')!]
+Traceback (most recent call last):
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/single_case_eval.py", line 100, in data_quality_detect
+    frame_loss_dict = frame_loss_statistic(dataPath)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/data_quality.py", line 122, in frame_loss_statistic
+    df = pd.read_csv(file, index_col=False)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
+    return _read(filepath_or_buffer, kwds)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 626, in _read
+    return parser.read(nrows)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1923, in read
+    ) = self._engine.read(  # type: ignore[attr-defined]
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 234, in read
+    chunks = self._reader.read_low_memory(nrows)
+  File "parsers.pyx", line 838, in pandas._libs.parsers.TextReader.read_low_memory
+  File "parsers.pyx", line 905, in pandas._libs.parsers.TextReader._read_rows
+  File "parsers.pyx", line 874, in pandas._libs.parsers.TextReader._tokenize_rows
+  File "parsers.pyx", line 891, in pandas._libs.parsers.TextReader._check_tokenize_status
+  File "parsers.pyx", line 2061, in pandas._libs.parsers.raise_parser_error
+pandas.errors.ParserError: Error tokenizing data. C error: Expected 30 fields in line 2127, saw 31
+
+[2024-08-15 10:14:58,334] - [ERROR] [single_case_evaluate.py] [line:61] - [[case:accident_0716_6] SINGLE_CASE_EVAL: Data processed ERROR: ParserError('Error tokenizing data. C error: Expected 30 fields in line 2127, saw 31\n')!]
+Traceback (most recent call last):
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/single_case_evaluate.py", line 57, in single_case_evaluate
+    data_processed = DataProcess(dataPath, config, case_name)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/data_process.py", line 66, in __init__
+    self._process()
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/data_process.py", line 70, in _process
+    self._merge_csv()
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/data_process.py", line 159, in _merge_csv
+    df_status = pd.read_csv(os.path.join(self.data_path, 'VehState.csv'), index_col=False).drop_duplicates()  # 状态机
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
+    return _read(filepath_or_buffer, kwds)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 626, in _read
+    return parser.read(nrows)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1923, in read
+    ) = self._engine.read(  # type: ignore[attr-defined]
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 234, in read
+    chunks = self._reader.read_low_memory(nrows)
+  File "parsers.pyx", line 838, in pandas._libs.parsers.TextReader.read_low_memory
+  File "parsers.pyx", line 905, in pandas._libs.parsers.TextReader._read_rows
+  File "parsers.pyx", line 874, in pandas._libs.parsers.TextReader._tokenize_rows
+  File "parsers.pyx", line 891, in pandas._libs.parsers.TextReader._check_tokenize_status
+  File "parsers.pyx", line 2061, in pandas._libs.parsers.raise_parser_error
+pandas.errors.ParserError: Error tokenizing data. C error: Expected 30 fields in line 2127, saw 31
+
+[2024-08-15 10:15:47,648] - [INFO] [single_run_test.py] [line:301] - [[case:accident_0716_6] SINGLE_CASE_EVAL: Start evaluating:]
+[2024-08-15 10:15:47,731] - [ERROR] [single_case_eval.py] [line:103] - [[case:accident_0716_6] SINGLE_CASE_EVAL: frame loss statistic ERROR: ParserError('Error tokenizing data. C error: Expected 30 fields in line 2127, saw 31\n')!]
+Traceback (most recent call last):
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/single_case_eval.py", line 100, in data_quality_detect
+    frame_loss_dict = frame_loss_statistic(dataPath)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/SINGLE_EVALUATE/data_quality.py", line 122, in frame_loss_statistic
+    df = pd.read_csv(file, index_col=False)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
+    return _read(filepath_or_buffer, kwds)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 626, in _read
+    return parser.read(nrows)
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1923, in read
+    ) = self._engine.read(  # type: ignore[attr-defined]
+  File "/home/server/桌面/virtualEnv_yzh/virtual01/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 234, in read
+    chunks = self._reader.read_low_memory(nrows)
+  File "parsers.pyx", line 838, in pandas._libs.parsers.TextReader.read_low_memory
+  File "parsers.pyx", line 905, in pandas._libs.parsers.TextReader._read_rows
+  File "parsers.pyx", line 874, in pandas._libs.parsers.TextReader._tokenize_rows
+  File "parsers.pyx", line 891, in pandas._libs.parsers.TextReader._check_tokenize_status
+  File "parsers.pyx", line 2061, in pandas._libs.parsers.raise_parser_error
+pandas.errors.ParserError: Error tokenizing data. C error: Expected 30 fields in line 2127, saw 31
+

+ 1 - 1
single_run_test.py

@@ -264,7 +264,7 @@ if __name__ == "__main__":
     # dataPath = r"./task_0515/case0530-ica-post/data"
     # dataPath = r"./task_0515/0805-7/data"
     # dataPath = r"./task_0515/0806a-2/data"
-    dataPath = r"./task_0515/0710-001/data"
+    dataPath = r"./task_0515/accident_0716_6/data"
 
     case_name = os.path.basename(os.path.dirname(os.path.normpath(dataPath)))
     casePath = os.path.join("./result", case_name)

+ 16 - 14
status.py

@@ -33,13 +33,13 @@ class ACCStatusType(Enum):
     静止等待           7
     """
     Off = 0
-    Active = auto()
-    Override = auto()
-    Shut_off = auto()
-    Standby = auto()
     Passive = auto()
-    Stand_active = auto()
-    Stand_wait = auto()
+    Standby = auto()
+    Active_Control = auto()
+    Override = auto()
+    Brake_Only = auto()
+    StandStill = auto()
+    Failure = auto()
 
 
 class LDWStatusType(Enum):
@@ -67,11 +67,13 @@ class LKAStatusType(Enum):
     激活              3
     故障              4
     """
-    Off = 0
-    Passive = auto()
-    Standby = auto()
-    Active = auto()
-    Error = auto()
+    Standby = 0
+    Left_Active = auto()
+    Right_Active = auto()
+    # Passive = auto()
+    # Standby = auto()
+    # Active = auto()
+    # Error = auto()
 
 
 class FCWStatusType(Enum):
@@ -120,9 +122,9 @@ class ICAStatusType(Enum):
     Off = 0
     Passive = auto()
     Standby = auto()
-    Only_Longitudinal_Control = auto()
-    LLC_Follow_Line = auto()
-    LLC_Follow_Vehicle = auto()
+    LLC_Follow_Line = auto()  # 无车,定速,居中
+    LLC_Follow_Vehicle = auto()  # 跟车,居中
+    Only_Longitudinal_Control = auto()  # 仅纵向
     Error = auto()
 
 

+ 19 - 21
status_mapping.py

@@ -18,31 +18,29 @@ from status import ACCStatusType, LKAStatusType, LDWStatusType, ICAStatusType, A
 def acc_status_mapping(value):
     if value == ACCStatusType.Off.value:
         return "Off"
-    elif value == ACCStatusType.Active.value:
+    elif value == ACCStatusType.Passive.value:
+        return "Passive"
+    elif value == ACCStatusType.Standby.value:
+        return "Standby"
+    elif value == ACCStatusType.Active_Control.value:
         return "Active"
     elif value == ACCStatusType.Override.value:
         return "Override"
-    elif value == ACCStatusType.Shut_off.value:
-        return "Shut_off"
-    elif value == ACCStatusType.Standby.value:
-        return "Standby"
-    elif value == ACCStatusType.Passive.value:
-        return "Passive"
-    elif value == ACCStatusType.Stand_active.value:
-        return "Stand_active"
+    elif value == ACCStatusType.Brake_Only.value:
+        return "Brake_Only"
+    elif value == ACCStatusType.StandStill.value:
+        return "StandStill"
+    elif value == ACCStatusType.Failure.value:
+        return "Failure"
 
 
 def lka_status_mapping(value):
-    if value == LKAStatusType.Off.value:
-        return "Off"
-    elif value == LKAStatusType.Passive.value:
-        return "Passive"
-    elif value == LKAStatusType.Standby.value:
+    if value == LKAStatusType.Standby.value:
         return "Standby"
-    elif value == LKAStatusType.Active.value:
+    elif value == LKAStatusType.Left_Active.value:
+        return "Active"
+    elif value == LKAStatusType.Right_Active.value:
         return "Active"
-    elif value == LKAStatusType.Error.value:
-        return "Error"
 
 
 def ldw_status_mapping(value):
@@ -65,12 +63,12 @@ def ica_status_mapping(value):
         return "Passive"
     elif value == ICAStatusType.Standby.value:
         return "Standby"
-    elif value == ICAStatusType.Only_Longitudinal_Control.value:
-        return "Only_Longitudinal_Control"
     elif value == ICAStatusType.LLC_Follow_Line.value:
-        return "LLC_Follow_Line"
+        return "LLC_Follow_Line"  # 无车,定速,居中
     elif value == ICAStatusType.LLC_Follow_Vehicle.value:
-        return "LLC_Follow_Vehicle"
+        return "LLC_Follow_Vehicle"  # 跟车,居中
+    elif value == ICAStatusType.Only_Longitudinal_Control.value:
+        return "Only_Longitudinal_Control"  # 仅纵向
     elif value == ICAStatusType.Error.value:
         return "Error"
 

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott