Skip to content

Commit 56e6d33

Browse files
author
Ruo-Ping Dong
authored
Add rendering to Gym wrapper limitations (#5389)
1 parent 39da84f commit 56e6d33

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

gym-unity/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ The returned environment `env` will function as a gym.
6767
be accessed from the `info` provided by `env.step(action)`.
6868
- Stacked vector observations are not supported.
6969
- Environment registration for use with `gym.make()` is currently not supported.
70+
- Calling env.render() will not render a new frame of the environment. It will
71+
return the latest visual observation if using visual observations.
7072

7173
## Running OpenAI Baselines Algorithms
7274

gym-unity/gym_unity/envs/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ def _get_vec_obs_size(self) -> int:
278278
return result
279279

280280
def render(self, mode="rgb_array"):
281+
"""
282+
Return the latest visual observations.
283+
Note that it will not render a new frame of the environment.
284+
"""
281285
return self.visual_obs
282286

283287
def close(self) -> None:

0 commit comments

Comments
 (0)