Atcold / pytorch-PPUU

Code for Prediction and Planning Under Uncertainty (PPUU)
https://youtu.be/X2s7gy3wIYw
MIT License
203 stars 54 forks source link

error when generating data #3

Closed mbhenaff closed 6 years ago

mbhenaff commented 6 years ago

This error comes up from time to time when generating the data (after around 100-150 episodes generated):

File "/home/mbhenaff/projects/pytorch-Traffic-Simulator/traffic_gym.py", line 401, in step current_lane_idx = lane_set.pop() KeyError: 'pop from an empty set'

Atcold commented 6 years ago

That's odd. It means the vehicle doesn't belong to any lane. I'll double check for bugs in the implementation.

Atcold commented 6 years ago

Fixed it at https://github.com/Atcold/pytorch-Traffic-Simulator/blob/ff6f00ff7ebee0c254195900adf8c7c38987fcd8/traffic_gym.py#L439-L443