Giter VIP home page Giter VIP logo

yiru-jiao / reconstruct100carndsdata Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 24.95 MB

This repository reconstructs bird's eye view trajectories of vehicles involved in crashes and near-crashes from 100-Car Naturalistic Driving Study (NDS) radar data.

License: MIT License

Python 90.41% Jupyter Notebook 9.59%
autonomous-driving crash-data driving-safety naturalistic-driving-study trajectory-reconstruction

reconstruct100carndsdata's People

Contributors

yiru-jiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

reconstruct100carndsdata's Issues

Tag named 'speed_ekf' or 'v_efk'?

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()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\coldm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pandas\core\frame.py", line 4108, in getitem
indexer = self.columns._get_indexer_strict(key, "columns")[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\coldm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pandas\core\indexes\base.py", line 6200, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "C:\Users\coldm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pandas\core\indexes\base.py", line 6252, in _raise_if_missing
raise KeyError(f"{not_found} not in index")
KeyError: "['speed_ekf'] not in index"

================================================================================

And I think we have to use 'v_efk' insted speed_ekf'.
So I changed it and it seems works very well.

Did I misunderstand something while reading the document?
Or was it just a mistake that occurred while writing the script?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.