Closed MuteJack closed 5 months ago
Dear MuteJack,
Thanks for your comments! You are correct and I have updated the code.
The data df_sur
is a slice of data_sur
, which is processed in processing_100Car.py
by the function process_surrounding
stored in data_utils.py
. In the function, the filtered speed is named v_ekf
rather than speed_ekf
. This mistake was because I adjusted the naming of the filtered surrounding vehicle speed but forgot to change it in event matching.
Thank you again for pointing this out and helping the code be more useful.
Good luck with your research! Yiru
Dear Yiru-Jiao.
Thank you for providing a good script. However, I had some problem using this code.
In 'event_matching.py' 57~58th line.
veh_j = df_sur[df_sur['target_id']==target_id][['time','x_ekf','y_ekf','psi_ekf','speed_ekf','target_id','range','forward']].copy() veh_j = veh_j.rename(columns={'x_ekf':'x','y_ekf':'y','psi_ekf':'psi','speed_ekf':'speed'})
Those lines are using a tag named 'speed_efk' and that cause the error like:
============================================================================== PS C:\Users\coldm\OneDrive\바탕 화면\100CarNDS 재현\Reconstruct100CarNDSData-main (2)\Reconstruct100CarNDSData-main> & C:/Users/coldm/AppData/Local/Microsoft/WindowsApps/python3.12.exe "c:/Users/coldm/OneDrive/바탕 화면/100CarNDS 재현/Reconstruct100CarNDSData-main (2)/Reconstruct100CarNDSData-main/event_matching.py" Processing Crash data... There are 34 trips processed Trip 8313 has no surrounding data available
Trip 8322 has 1 surrounding vehicles
Traceback (most recent call last): File "c:\Users\coldm\OneDrive\바탕 화면\100CarNDS 재현\Reconstruct100CarNDSData-main (2)\Reconstruct100CarNDSData-main\event_matching.py", line 57, in
veh_j = df_sur[df_sur['target_id']==target_id][['time','x_ekf','y_ekf','psi_ekf','speed_ekf','target_id','range','forward']].copy()