diff options
author | Eric Yihan Chen <ericyihc@gmail.com> | 2020-07-14 18:07:02 -0700 |
---|---|---|
committer | Eric Yihan Chen <ericyihc@gmail.com> | 2020-07-14 21:08:51 -0700 |
commit | 3a6a279b9a757c4c1306fc55fa6e95df40c89574 (patch) | |
tree | c7054f2f6a61503265ef79681193ed42575a3622 | |
parent | 6b6cfa6f03a54de484e15520f0a86ea81c9831ae (diff) | |
download | bullet3-3a6a279b9a757c4c1306fc55fa6e95df40c89574.tar.gz |
Fix pybullet gym envs
-rw-r--r-- | examples/pybullet/gym/pybullet_envs/bullet/kuka_diverse_object_gym_env.py | 3 | ||||
-rw-r--r-- | examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_stand_gym_env.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/examples/pybullet/gym/pybullet_envs/bullet/kuka_diverse_object_gym_env.py b/examples/pybullet/gym/pybullet_envs/bullet/kuka_diverse_object_gym_env.py index 696dc268a..294a5984a 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/kuka_diverse_object_gym_env.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/kuka_diverse_object_gym_env.py @@ -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): diff --git a/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_stand_gym_env.py b/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_stand_gym_env.py index 8135b7265..446a3156a 100644 --- a/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_stand_gym_env.py +++ b/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_stand_gym_env.py @@ -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. |