duckietown / gym-duckietown

Self-driving car simulator for the Duckietown universe
http://duckietown.org
Other
51 stars 19 forks source link

Bug in collision detection, _collidable_object #48

Closed maximecb closed 6 years ago

maximecb commented 6 years ago

This bug was found by Adam while working on his map generator. I've included a map file that reproduces the bug in the colldet_bug branch. The map name is 4way_adam (link). You can reproduce with:

./manual_control.py --map-name 4way_adam

The bug seems to be caused by _collidable_object producing tile coordinates which are outside of the map. This happens when there are objects close to the edge of the map.

@bhairavmehta95 can you take a look? I would like the fix to be in a separate PR, and we should add Adam's map to gym_duckietown/maps so that it will automatically get tested in ./run_tests.py.