diff options
author | erwincoumans <erwincoumans@google.com> | 2020-08-13 19:33:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-13 19:33:21 -0700 |
commit | 15041841a56450145d36e25c8e48db2ce4006055 (patch) | |
tree | 9f0d5a7c3f3490aec9211eb036d8cfaa50f8042f | |
parent | 5140815cdd4d708bf071206b5d8f5754c656c344 (diff) | |
parent | 3a6a279b9a757c4c1306fc55fa6e95df40c89574 (diff) | |
download | bullet3-15041841a56450145d36e25c8e48db2ce4006055.tar.gz |
Merge pull request #2933 from AiRuiChen/fix-pybullet-gym-envs
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. |