From d4195a3f377ffe9e08d9d74a599956d952330605 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 22 Aug 2022 18:08:01 +0200 Subject: [PATCH] Wrong dimensions given by StateObservable --- columbus/observables.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/columbus/observables.py b/columbus/observables.py index 3a17994..6189ce2 100644 --- a/columbus/observables.py +++ b/columbus/observables.py @@ -219,7 +219,7 @@ class StateObservable(Observable): def get_observation_space(self): self.env.reset() num = len(self.entities)*2+len(self._timeoutEntities) + \ - self.speedAgent + self.include_rand + self.speedAgent*2 + self.include_rand return spaces.Box(low=0-1*self.coordsRelativeToAgent, high=1, shape=(num,), dtype=np.float32) @@ -241,8 +241,8 @@ class StateObservable(Observable): for entity in self._timeoutEntities: obs.append(entity.active) if self.speedAgent: - obs.append(self.env.speed[0]) - obs.append(self.env.speed[1]) + obs.append(self.env.agent.speed[0]) + obs.append(self.env.agent.speed[1]) if self.include_rand: obs.append(self.env.random()) self.obs = obs