-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
CarRacing corrupt frames when not rendering visually #976
Comments
I am also having this problem. |
Same problem here. Just opened a similar issue #990 before noticing this one. Sorry for that. Thanks for your solution :) |
#MeToo |
Proposed workaround--something like:
At line 354 of gym/envs/box2d/car_racing.py |
I am having a similar problem Issue #1267 . I cannot figure out how to run the modified SAC, which I think offers a solution to the problem. |
@Bhaney44 I don't understand how SAC (modified or not) can offer a solution to a rendering problem in the environment. Moreover, to our best knowledge, the issue as described by @opherlieber should have been fixed by the commit above. If you are still facing the issue, please include the code / commands that you are running, versions of os and gym, and the details of the error - and we'll re-open this issue (or you can create a new one). |
@pzhokhov see issue 1267. According to @jachiam
Josh is right. So, to successfully execute an agent in this environment the user needs to write their own DRL algorithm because the default produces errors. And, users are unable to run the default from the command line. In other words, success in this environment requires looking under the hood, finding where the default code is on the machine, and figuring out how to change the default code so it executes properly. I would love to work more on this, but I have other priorities consuming my time. I do plan to spend some time on this problem in mid-late April. However, if anything new arises in the interim - please let me know. Thanks |
@Bhaney44 @jachiam The code in spinningup can easily be modified to work with image-shaped inputs. Today, I modified PPO to work with environments like vizdoom and miniworld by modifying the following: |
@alexandervandekleut Prove it. OpenAI Leaderboard. |
* change car racing render to fix openai#976 * add retina screen detection
When using CarRacing-v0 and not using render() explicitly, the frames from step() are corrupt. Mainly it's always 4 quadrants with a green or gray L shape regardless of what steps I perform (Attached 2 examples).
I've tracked it down to the call to 'win.dispatch_events()' in the render() function of the CarRacing() class, which isn't called in case of mode="state_pixels".
Calling the dispatch_events() even once after creating the window seems to solve it.
Attached also notebook which shows the issue and workaround.
car_race_consistency.zip
The text was updated successfully, but these errors were encountered: