Merge pull request #2933 from AiRuiChen/fix-pybullet-gym-envs

Fix pybullet gym envs
This commit is contained in:
erwincoumans
2020-08-13 19:33:21 -07:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -102,6 +102,9 @@ class KukaDiverseObjectEnv(KukaGymEnv):
self.action_space = spaces.Box(low=-1, high=1, shape=(3,)) # dx, dy, da
if self._removeHeightHack:
self.action_space = spaces.Box(low=-1, high=1, shape=(4,)) # dx, dy, dz, da
self.observation_space = spaces.Box(low=0, high=255, shape=(self._height,
self._width,
3))
self.viewer = None
def reset(self):

View File

@@ -167,7 +167,7 @@ class MinitaurStandGymEnv(minitaur_gym_env.MinitaurGymEnv):
# Use the one dimensional action to rotate both bottom legs.
action_delta = [0, 0, -action, action, 0, 0, action, -action]
action_all_legs = map(add, action_all_legs, action_delta)
return action_all_legs
return list(action_all_legs)
def _policy_flip(self, time_step, orientation):
"""Hand coded policy to make the minitaur stand up to its two legs.