Closed JoshYank closed 1 year ago
Hello,
You can try with specified version of SB. stable-baselines3==1.6.1 sb3-contrib==1.6.1
Hope this may help you to solve that issue.
This fixed the error that occurred when running the line to make the model. Then, this error comes up when trying to run model.learn().
I solved the issue. You also have to set. !pip install gym==0.21.0 !pip install highway-env==1.5
Working with the parking-env itself, how do we input a desired goal position and initial position/velocity for the agent?
Hello,
For the goal position, you have to modify the parameter lane.position(lane.length/2, 0) in parking-env and replace it with the desired goal position. https://github.com/eleurent/highway-env/blob/793c8830ae5be9cbce70f55dfcb33d3c5ed762c3/highway_env/envs/parking_env.py#L153
for the initial position of the vehicle, you have to modify the parameter *[i20, 0]** in parking-env and replace it with the desired initial position of the vehicle. https://github.com/eleurent/highway-env/blob/793c8830ae5be9cbce70f55dfcb33d3c5ed762c3/highway_env/envs/parking_env.py#L148
Thanks and Regards, Harshkumar Borad
Is there any way to do this from the created environment rather than from changing the files? The idea is to model uncertainty of the locations within a single script and run multiple simulations.
Something you could do is to manually override env.goal.position
and env.vehicle.position
after every call to env.reset()
@JoshYank in case you want to use latest SB3 and highway env version, you can take a look at the instructions in https://github.com/DLR-RM/stable-baselines3/pull/780
Good afternoon, I was trying to train a policy for the parking-env to test against safety validation methods. When I tried to run the code on colab as it is, I was getting an error when creating the environment. AttributeError: 'ParkingEnv' object has no attribute 'np_random' This error could be solved by reinstalling the highway-env or initially installing an older version of gym and highway. After doing this, an error occurs in creating the model before training. TypeError: init() got an unexpected keyword argument 'create_eval_env'
It would be much appreciated if you have any insight on how to solve this problem. My research focuses more on the verification side than training or developing a controller to test. I don't have as much experience in training controllers with RL.