Get RGB frames of gym environment with wrappers

113 views Asked by At

I'm working with gym environment and stable-baseline3 library. I have wrapped the environment as follows,

    env = AtariWrapper(gym.make(args.env), noop_max=30, frame_skip=4, screen_size=84, terminal_on_life_loss=True, clip_reward=False)
    env = DummyVecEnv([lambda: env]) 
    env = VecFrameStack(env, n_stack=4, channels_order='first')

Now, I woud like to get the RGB images of each steps. I have gone though the code blocks of the library, I have found there is function within DummyVecEnv class called get_images() which returns the rgb images. But when I called the function, I got the following error

TypeError: render() takes 1 positional argument but 2 were given

I can't change the order in which the gym environment is wrapped. Is there any method by which I can get the RGB images from the environment. Thanks in advance.

0

There are 0 answers