-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
[Bug Report] render() returns only 0. under MPE env with render_mode='rgb_array' #963
Comments
Would you be interested in contributing a PR to fix this? I can look into it at some point in the future but haven't had much time with other things |
Feel free to reopen if I've made a mistake or you find another problem |
Hi, sorry for the late reply. I would happily contribute a PR in the future. However I am currently working on my thesis(about reinforcement learning) right now. I believe that I am using the newest Pettingzoo so it might be OpenCV that cause the problem. I will try to dig in more in the future. Thank you! |
Sounds good, to figure out the error you might find my script helpful since it seems to isolate the rendering and show that they aren't just black screens. Just FYI if you're interested in examples that use PettingZoo and CV here's a few resources:
|
Ok, I will be sure to look into it. |
Describe the bug
I was trying to render MPE using cv2. The reason for this is that I am running pettingzoo on a remote docker container.
However,
env.render()
always returns all zeros with shape (700, 700, 3). I have tested this for several MPE environments and got the same results. Knights Archers Zombies on the other hand returns the correct RGB array and hence can be rendered using cv2.imshow().Also,
env.render()
displays a correct result if I try to run this on my local machine with render_mode='human'Looks like #874 was supposed to fix this issue, however, I still encounter it.
Adding
env.env.env.draw()
fix it.Advanced apologize if I missed anything.
Code example
System info
PettingZoo 1.22.3 was installed by pip.
Python 3.10.6, Ubuntu 22.04.2 on the local machine.
Python 3.8.5, Ubuntu 22.04.2 on docker container.
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: