Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floor object doesn't render #90

Closed
ChaceAshcraft opened this issue Apr 30, 2020 · 3 comments
Closed

Floor object doesn't render #90

ChaceAshcraft opened this issue Apr 30, 2020 · 3 comments
Labels

Comments

@ChaceAshcraft
Copy link

ChaceAshcraft commented Apr 30, 2020

I added colored floor tiles to one of your environments and it failed to render:

self.grid.set(i, j, Floor(color=self._rand_elem(colors)))

  File "site-packages/gym/core.py", line 233, in render
    return self.env.render(mode, **kwargs)
  File "gym-minigrid/gym_minigrid/minigrid.py", line 1279, in render
    highlight_mask=highlight_mask if highlight else None
  File "gym-minigrid/gym_minigrid/minigrid.py", line 527, in render
    tile_size=tile_size
  File "gym-minigrid/gym_minigrid/minigrid.py", line 469, in render_tile
    obj.render(img)
  File "gym-minigrid/gym_minigrid/minigrid.py", line 177, in render
    r.setLineColor(100, 100, 100, 0)
AttributeError: 'numpy.ndarray' object has no attribute 'setLineColor'

Am I using them wrong? Thanks!

@maximecb
Copy link
Contributor

maximecb commented May 1, 2020

Hi there @ChaceAshcraft

You're not doing anything wrong. The issue is that I reimplemented the renderer a few months ago to eliminate the PyQT dependency, and I never fixed the floor tiles to work with the new rendering code. This highlights the problem that there is currently no environment that uses the floor tiles, so this never got tested. That makes me think we should fix this bug and also create a simple environment using floor tiles.

@maximecb maximecb added the bug label May 1, 2020
@ChaceAshcraft
Copy link
Author

Thanks for getting back to me! That sounds awesome!

maximecb added a commit that referenced this issue May 1, 2020
@maximecb
Copy link
Contributor

maximecb commented May 1, 2020

I've fixed the rendering of the floor tile. If you end up creating an environment using them and you think it could make sense to open a PR, please do so :)

@maximecb maximecb closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants