pgdrive
pgdrive copied to clipboard
Refactoring Plan
To support future development, here is a refactoring plan. The major challenge is to decouple Pandas from PGDrive, in aspect such as rendering pipeline, vehicle initialization, and so on. Please feel free to change anything here and discuss with me @lqy0057 !
- pgdrive
- component: The elements that should be initialized at the very beginning and combined by managers.
- vehicle
- vehicle
- phyics_vehicle
- render_vehicle
- object
- obstacle
- road
- lane.py
- road.py
- ...
- osm_parser
- block
- base_block.py
- intersection.py
- ...
- policy
- base_rule_based_policy.py
- lane_following.py
- obs
- top_down_obs
- lidar_state_obs.py
- vehicle
- engine: The class that maintain the runtime workflow and pipeline.
- engine.py
- vehicle_manager
- agent_manager
- object_manager
- scene_manager
- algorithm
- BIG.py
- Future road network aggregation methods.
- algorithm
- renderer
- panda3d_renderer
- env: The outer interfaces to users
- general_interface
- base_env
- marl_env
- base_marl_env.py
- tollgate.py
- ...
- utils
- config
- pg_config
- config_parser
- visualization
- top_down_drawing.py
- ...
- ...
- config
- component: The elements that should be initialized at the very beginning and combined by managers.
Functions need to be re-implemented
- [ ] replay and record system
- [ ] step function of Light, Skybox, and Traffic Vehicle
- [x] random function check !
- [ ] do NOT distinguish the configs in Object class and subclasses specific config, like config and vehicle config
- [x] assign class NAME for each object for a quick generation
- [ ] heading theta for object
- [ ] map needs to be re-generated due to the update of random engine
- [ ] reorganize the code by using manager.before_step()/after_step()
- [ ] clean np code in traffic manager
@lqy0057 I have updated the plan according to our discussion (0712), please check. This is simply the code structure, but the conceptual figure is not written here.
I have prepared a complete refactor plan, I will share it with you.