Skip to content

Commit

Permalink
fix: set traci default view if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
KevynKelso committed Mar 2, 2024
1 parent a134ebb commit a49f3da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sumo_rl/environment/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def _start_simulation(self):
self.sumo = traci.getConnection(self.label)

if self.use_gui or self.render_mode is not None:
if "DEFAULT_VIEW" not in dir(traci.gui):
traci.gui.DEFAULT_VIEW = 'View #0'
self.sumo.gui.setSchema(traci.gui.DEFAULT_VIEW, "real world")

def reset(self, seed: Optional[int] = None, **kwargs):
Expand Down

0 comments on commit a49f3da

Please sign in to comment.