Pārlūkot izejas kodu

修复双车场景下时间戳和playerid号对不上的问题v2.0

XGJ_zhaoyuan 1 mēnesi atpakaļ
vecāks
revīzija
b0f6a76c94
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      core/processors/built_in/lst.py

+ 1 - 1
core/processors/built_in/lst.py

@@ -567,7 +567,7 @@ class ZipCSVProcessor:
         # df_vehicle.dropna(subset=[col for col in required_pos if col in df_vehicle.columns], inplace=True)
 
         try:
-            df_vehicle["simTime"] = np.round(np.arange(df_raw["simTime"].tolist()[0], df_raw["simTime"].tolist()[0] + 0.01*(len(df_vehicle)), 0.01), 2)
+            df_vehicle["simTime"] = np.round(np.arange(df_raw["simTime"].tolist()[0], df_raw["simTime"].tolist()[0] + 0.01*(len(df_vehicle)-1), 0.01), 2)
             df_vehicle["simFrame"] = np.arange(1, len(df_vehicle) + 1)
             df_vehicle["playerId"] = int(player_id)
             df_vehicle['playerId'] = pd.to_numeric(df_vehicle['playerId']).astype(int)