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

Update record.py to use gym #30

Open
bzier opened this issue Apr 1, 2017 · 2 comments
Open

Update record.py to use gym #30

bzier opened this issue Apr 1, 2017 · 2 comments

Comments

@bzier
Copy link
Collaborator

bzier commented Apr 1, 2017

Now that the main play.py program uses the gym environment, record.py should be updated to use this framework as well. This will simplify the setup/recording process and should allow for more consistency between the two aspects of execution.

@bzier
Copy link
Collaborator Author

bzier commented Apr 2, 2017

@kevinhughes27,
When you get the chance, please take a look at my gym-record branch. I have re-written record.py to use the gym environment. On my machine, performance is terrible, and I'd like to have you test it out and see what your experience is. Please experiment with the SAMPLE_RATE at the top of the file too.

For now, I had to get rid of the wx GUI because running a wx.App in DISPLAY :1 for the screenshots of the emulator in XVFB conflicts with running the wx.App in DISPLAY :0 for the record.py GUI. Eventually, I'd like to get rid of wx in the gym environment(9), at which point, the GUI could be restored here.

In the meantime, pay attention to the prompts on the command line. It will load up the environment, and then prompt you to hit enter or quit. Then it will get the window open and prompt for another enter. At this point, you can start driving with the controller and the program will record samples. It will detect the end of the race and then prompt you to record again or quit.

Give it a shot when you have some time and let me know if you have any feedback. Thanks.

@kevinhughes27
Copy link
Owner

I really like the command line prompts - this definitely simplifies the data collection process since the script does most of the setup work (like aligning windows etc).

We don't have to bring back the GUI, instead we could pop open a matplotlib window with the joystick data but even that seems a bit overkill. Another option would be to print the joystick data in the console. The viewer is still there to see the graphs next to the images if required.

The performance wasn't great for me either, it probably ran at 60% - 70% of the real speed. So definitely playable but I wonder why its so slow. (It might actually be easier to train in semi slow motion lol).

I also have to post this meta image of the alignment issue:

img_0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants