if self.render:
self.envs[i].render()
except MujocoException as e:
return self.generate_rollouts()
if np.isnan(o_new).any():
self.logger.warn("NaN caught during rollout generation. Trying again...")
self.reset_all_rollouts()
After Change
ag_new = np.empty((self.rollout_batch_size, self.dims["g"]))
success = np.zeros(self.rollout_batch_size)
// compute new states and observations
obs_dict_new, _, done, info = self.venv.step(u)
o_new = obs_dict_new["observation"]
ag_new = obs_dict_new["achieved_goal"]
success = np.array([i.get("is_success", 0.0) for i in info])