Skip to content

Commit 5105ce7

Browse files
authored
Fix bug in gym_wrapper.
Added an 'env' parameter to env_step function since one an unreferenced one is used in the function.
1 parent aeb8cfc commit 5105ce7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

research/pcl_rl/gym_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ def all_done(self):
9292

9393
def step(self, actions):
9494

95-
def env_step(action):
95+
def env_step(env, action):
9696
action = self.env_spec.convert_action_to_gym(action)
9797
obs, reward, done, tt = env.step(action)
9898
obs = self.env_spec.convert_obs_to_list(obs)
9999
return obs, reward, done, tt
100100

101101
actions = zip(*actions)
102-
outputs = [env_step(action)
102+
outputs = [env_step(env, action)
103103
if not done else (self.env_spec.initial_obs(None), 0, True, None)
104104
for action, env, done in zip(actions, self.envs, self.dones)]
105105
for i, (_, _, done, _) in enumerate(outputs):

0 commit comments

Comments
 (0)