// pybullet requires rendering before resetting the environment, but other gym environments (Pendulum) will crash
try:
if self.is_rendered:
self.render()
except:
pass
o = self.reset(True)["observation"]
After Change
self.action_space_low = self.env.action_space.low
self.action_space_abs_range = np.maximum(np.abs(self.action_space_low), np.abs(self.action_space_high))
self.actions = {i: i for i in range(self.action_space_size)}
self.key_to_action = {}
if hasattr(self.env.unwrapped, "get_keys_to_action"):
self.key_to_action = self.env.unwrapped.get_keys_to_action()
// measurements