Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HighD dataset #37

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

HighD dataset #37

wants to merge 10 commits into from

Conversation

yair-schiff
Copy link
Collaborator

Enable code base to incorporate highD dataset into project pipeline

New scripts and files:

  • map_highD.py: Main script that creates environment and car classes for highD dataset
  • scripts/run_generate_data_highD.sh
  • scripts/submit_generate_data_highD.slurm

Modified files:

  • play_maps.py: Enable playback of highD map
  • extract_car_size.py and generate_trajectories.py: Enable data processing of highD
  • dataloader.py: Enable batch loading of highD

@yair-schiff yair-schiff requested a review from Atcold August 2, 2019 00:07
@Atcold
Copy link
Owner

Atcold commented Aug 6, 2019

My merging commit is weird... I had to edit manually stuff that was not supposed to be there. Maybe a GitHub bug?

'Right Alongside ID',
'Right Following ID',
'Lane Identification'
),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, I think you could have used an ordered dict, and then you could have simply dumped the keys 😜

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Do you want me to change this, or should we leave it for now?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to change it, I can wait before merging.


car_sizes = dict()
for ts in time_slots:
d = df[ts]
car = lambda i: d[d['Vehicle ID'] == i]
def car(i): return d[d['Vehicle ID'] == i]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8's fault not mine...

@@ -47,4 +109,5 @@
car_sizes[ts][c] = size
print(c)

torch.save(car_sizes, 'traffic-data/state-action-cost/data_{}_v0/car_sizes.pth'.format(opt.map))
torch.save(car_sizes, f'traffic-data/state-action-cost/data_{opt.map}_v0/car_sizes.pth')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

parser.add_argument('-delta_t', type=float, default=0.1)
parser.add_argument('-recording', type=str, default="01",
Copy link
Owner

@Atcold Atcold Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use time_slot instead? They are used for the exact same purpose, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I think this is an artifact of me trying to keep this new script as similar to map_i80 as possible

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use time_slot for highd too.

@@ -43,6 +44,10 @@
delta_t=opt.delta_t,
)

# HighD dataset will use recordings IDs rather than time slots
if opt.map == 'highD':
kwargs['rec'] = opt.recording
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this would be unnecessary.

#SBATCH --mail-type=FAIL # notifications for job fail
#SBATCH [email protected]

source activate PPUU
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not supposed to work... unless there's this before:

eval "$(conda shell.bash hook)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants