diff --git a/columbus/entities.py b/columbus/entities.py index 2ec78c4..bd9bbbe 100644 --- a/columbus/entities.py +++ b/columbus/entities.py @@ -15,9 +15,9 @@ class Entity(object): self.solid = False self.movable = False # False = Non movable, True = Movable, x>1: lighter movable self.elasticity = 1 - self.collision_changes_speed = False + self.collision_changes_speed = True self._crash_list = [] - self._coll_add_pushback = 0.05 + self._coll_add_pushback = 0 def physics_step(self): x, y = self.pos diff --git a/columbus/env.py b/columbus/env.py index d23f196..22b1761 100644 --- a/columbus/env.py +++ b/columbus/env.py @@ -563,7 +563,10 @@ def parseObs(obsConf): obs = [] for i, c in enumerate(obsConf): obs.append(parseObs(c)) - return observables.CompositionalObservable(obs) + if len(obs) == 1: + return obs[0] + else: + return observables.CompositionalObservable(obs) if obsConf['type'] == 'State': conf = {k: v for k, v in obsConf.items() if k not in ['type']} diff --git a/columbus/observables.py b/columbus/observables.py index 4eeef7d..77bc3a4 100644 --- a/columbus/observables.py +++ b/columbus/observables.py @@ -9,18 +9,17 @@ import torch as th class Observable(): def __init__(self): self.obs = None - pass def _set_env(self, env): self.env = env def get_observation_space(): print("[!] Using dummyObservable. Env won't output anything") - return spaces.Box(low=0, high=255, - shape=(1,), dtype=np.uint8) + return spaces.Box(low=0, high=1, + shape=(1,), dtype=np.float32) def get_observation(self): - return False + return np.array([0]) def draw(self): pass