Closed bhairavmehta95 closed 6 years ago
So, I think we aren't quite going in the direction you suggested, but we did do some refactoring with the object refactoring. One possibility would be to convert the agent itself into a world object class. Might make some sense. Though the agent will always require some special treatment by the simulator.
I'd actually say we've made some good progress in this direction, closing.
simplesim_env.py
is over 1000 lines now, so I propose that we pull some code out into some other files:env_utils.py
- Handles loading of the grid / obstacles from the map file providedagent_utils.py
- Helper functions that help with things regarding the agent (getting and updating current position, heading vectors)collision.py
- Handles everything regarding collisionsgeometry.py
- Currently, not everything incollision.py
still has to do with collisions and some functions written for collisions have been repurposed to do other things as well.Ideally, we keep
step()
,render()
(and its helper functions),reset()
, andinit()
(which can also become a bit more modularized) inside of simplesim, and move everything else out.