duckietown / gym-duckietown

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

Add fix for free_camera.py #205

Closed CourchesneA closed 4 years ago

CourchesneA commented 4 years ago

Added fix to make the script free_camera.py to be coherent with the move of the gym_duckietown folder in src/gym_duckietown.

The import in src/gym_duckietown/envs/init.py had to be made relative, (not sure why they were absolute, they were not resolved properly)

CourchesneA commented 4 years ago

Seems like the tests are also using absolute imports. From my understanding of the imports, what we have right now (since we changed the directory structure in this commit, import the gym_duckietown that is installed through pip and does not actually test local changes, which would be completely wrong. (Before the refactor in that commit, gym_duckietown was a local directory so I assume it was reolving it locally and it was fine)

AndreaCensi commented 4 years ago

Definitely not the answer.

The good solution is to make this and the others proper CLI executable using the entry_points/console_scripts mechanism in setup.py.

AndreaCensi commented 4 years ago

If you have to do this, likely you did not run "python setup.py develop" or equivalent command.

CourchesneA commented 4 years ago

Awesome, was not aware of this. I'll do the required changes, thanks !