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

Temporary Fix for Simulator #14

Closed
bhairavmehta95 opened this issue Oct 31, 2018 · 3 comments
Closed

Temporary Fix for Simulator #14

bhairavmehta95 opened this issue Oct 31, 2018 · 3 comments

Comments

@bhairavmehta95
Copy link
Collaborator

bhairavmehta95 commented Oct 31, 2018

The UdeM students have reported that the instructions to launch the simulator launch a different version of the simulator.

We can fix this by not running the server via Docker, but rather than throwing this code inside of the training scripts:

You will not want to start the Docker container as cited in the instructions, if you've already started it, please run: docker stop gym-duckietown-server.

Then, replace gym.make(...) in your training script with:

Note: Do not replace the gym.make(params['env']) inside of solution.py!

from gym_duckietown.simulator import Simulator

env = Simulator(
    seed=123, # random seed
    map_name="loop_empty",
    max_steps=500001, # we don't want the gym to reset itself
    domain_rand=0,
    camera_width=640,
    camera_height=480,
    accept_start_angle_deg=4, # start close to straight
    full_transparency=True,
    distortion=True,
)

# Wrappers
env = ResizeWrapper(env)
env = NormalizeWrapper(env)
env = ImgWrapper(env) # to make the images from 160x120x3 into 3x160x120
env = ActionWrapper(env)
# env = DtRewardWrapper(env) # not during testing

and then, the output of the environment will match exactly what we have inside of the evaluator.

This is a hot fix while I work on Dockerizing this, but this should work for the students to get back on track.

@liampaull @fgolemo

@placaille
Copy link

Wasn't that on purpose? Now we (as a student UdeM) have the description of the environment used for evaluation... feel kind of like cheating, isn't?

@bhairavmehta95
Copy link
Collaborator Author

bhairavmehta95 commented Oct 31, 2018

@placaille so when I say

different version of the simulator

I actually mean that the images were undistorted and the actions were different in the simulator when using the old instructions.

We still make sure on our end (i.e the evaluation) that we randomize the environments, so its not cheating, but this will give you the correct type of environment (i.e distorted / fish eye images + wheel velocities as actions).

Please let me know if you have more questions!

@bhairavmehta95
Copy link
Collaborator Author

Fixed in #15

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