Skip to content

Commit

Permalink
bugfix: when using configure, update observation space
Browse files Browse the repository at this point in the history
  • Loading branch information
Berducci, Luigi committed Apr 5, 2024
1 parent 7ed8521 commit 83355aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gym/f110_gym/envs/f110_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ def configure(self, config: dict) -> None:
self.action_type.space, self.num_agents
)

if hasattr(self, "observation_space"):
self.observation_type = observation_factory(
env=self, **self.config["observation_config"]
)
self.observation_space = self.observation_type.space()

def _check_done(self):
"""Check if the current rollout is done
Expand Down

0 comments on commit 83355aa

Please sign in to comment.