HLTP icon indicating copy to clipboard operation
HLTP copied to clipboard

Preprocessing script for NGSIM data

Open IndefiniteBen opened this issue 11 months ago • 8 comments

I'm trying to reproduce your results. ~~Can you please share a script for converting the NGSIM csv/txt data to the MAT format this repo expects?~~ Edit: conversion script exists, see my next comment.

I tried using the files from BATraj NGSIM release but when I run python evaluate_teacher.py I get the following error:

IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/ben/hubrisDev/HLTP/venv/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/ben/hubrisDev/HLTP/venv/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/ben/hubrisDev/HLTP/venv/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 58, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/ben/hubrisDev/HLTP/loader2.py", line 54, in __getitem__
    lane_stu = self.getLane_stu(vehId, t, vehId, dsId)
  File "/home/ben/hubrisDev/HLTP/loader2.py", line 205, in getLane_stu
    refPos = refTrack[np.where(refTrack[:, 0] == t)][0, 5]
IndexError: index 5 is out of bounds for axis 1 with size 4

I get the same error if I fix the paths and try to run evaluate_teacher.py.

IndefiniteBen avatar Mar 27 '24 13:03 IndefiniteBen