Made quadrotor gymnasium env compatible with Gymnasium 1.0.0 (Issue #11)
This commit is contained in:
@@ -48,7 +48,7 @@ env = gym.make("Quadrotor-v0",
|
||||
# Now reset the quadrotor.
|
||||
# Setting initial_state to 'random' will randomly place the vehicle in the map near the origin.
|
||||
# But you can also set the environment resetting to be deterministic.
|
||||
observation, info = env.reset(initial_state='random')
|
||||
observation, info = env.reset(options={'initial_state': 'random'})
|
||||
|
||||
# Number of timesteps
|
||||
T = 300
|
||||
|
||||
@@ -59,7 +59,7 @@ env = gym.make("Quadrotor-v0",
|
||||
# check_env(env, warn=True) # you can check the environment using built-in tools
|
||||
|
||||
# Reset the environment
|
||||
observation, info = env.reset(initial_state='random', options={'pos_bound': 2, 'vel_bound': 0})
|
||||
observation, info = env.reset(options={'initial_state': 'random', 'pos_bound': 2, 'vel_bound': 0})
|
||||
|
||||
# Create a new model
|
||||
model = PPO(MlpPolicy, env, verbose=1, ent_coef=0.01, tensorboard_log=log_dir)
|
||||
|
||||
Reference in New Issue
Block a user