Skip to content

Commit

Permalink
Merge pull request #50 from jerryz123/observation_fix
Browse files Browse the repository at this point in the history
Removed raw state retrieval through observations
  • Loading branch information
mdlaskey committed Apr 18, 2018
2 parents 7a3af96 + 2d636c3 commit 6dc137a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/observations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Observations are generated for each controlled car in the scene. The type of obs

Raw
^^^
A pointer to the raw environment, giving agents full access to the scene, and all other objects in the scene.
A copy of the the raw environment, giving agents full access to the scene, and all other objects in the scene. Using this observation type should be avoided, as duplicating the environment incurs a significant performance penalty.

Q-LIDAR
^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion gym_urbandriving/envs/urbandriving_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _step(self, action, background_simplified=False,supervisor=False):
info_dict = {"saved_actions": action}

if self.observation_type == 'raw':
observations = [state] * len(state.dynamic_objects['controlled_cars'])
observations = [deepcopy(state) for i in state.dynamic_objects['controlled_cars']]
elif self.observation_type == 'Q-LIDAR':
observations = []
for key in self.current_state.dynamic_objects['controlled_cars'].keys():
Expand Down

0 comments on commit 6dc137a

Please sign in to comment.