Skip to content

Commit

Permalink
fix bug caused by def render func (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanyiLi committed Jul 18, 2023
1 parent 8615563 commit cc8ca5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadrive/envs/base_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def render(self,

if mode != "human" and self.config["image_observation"]:
# fetch img from img stack to be make this func compatible with other render func in RL setting
return self.vehicle.observations.img_obs.get_image()
return self.observations[DEFAULT_AGENT].img_obs.get_image()

if mode == "rgb_array":
assert self.config["use_render"], "You should create a Panda3d window before rendering images!"
Expand Down

0 comments on commit cc8ca5f

Please sign in to comment.