Skip to content

[Bug Report] Composing RGBImgPartialObsWrapper with ViewSizeWrapper doesn't give the correct observation. #468

@NishanthVAnand

Description

@NishanthVAnand

Describe the bug
The default view of the agent is 7x7 which can be changed using the ViewSizeWrapper by passing the agent_view_size argument. But, when it is used alongside with the RGBImgPartialObsWrapper, ViewSizeWrapper doesn't have any effect and the observation defaults to 7x7

Code example

import gymnasium as gym
from minigrid.wrappers import *

from PIL import Image

env = gym.make("BabyAI-GoToRedBall-v0")
env = ViewSizeWrapper(env, 5)
env = RGBImgPartialObsWrapper(env)
observation, info = env.reset()
Image.fromarray(observation["image"])

image

System Info
Describe the characteristic of your environment:

  • Minigrid was installed using pip and I am using the latest version (3.0.0).
  • Python version: Python 3.9.15

Additional context
Add any other context about the problem here.

Checklist

  • I have checked that there is no similar issue in the repo (required)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions