From d03c50726bdbde65c76c1aadaf300260d5ab7952 Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Tue, 3 Jan 2023 14:10:51 +0100 Subject: [PATCH] Fixed brain for memory based models with 3-image input and previous V --- ...ain_carla_bird_eye_deep_learning_x3_previous_v.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/behavior_metrics/brains/CARLA/brain_carla_bird_eye_deep_learning_x3_previous_v.py b/behavior_metrics/brains/CARLA/brain_carla_bird_eye_deep_learning_x3_previous_v.py index 4d109aef..fb6bec29 100644 --- a/behavior_metrics/brains/CARLA/brain_carla_bird_eye_deep_learning_x3_previous_v.py +++ b/behavior_metrics/brains/CARLA/brain_carla_bird_eye_deep_learning_x3_previous_v.py @@ -160,13 +160,12 @@ def execute(self): self.image_1 = self.image_2 self.image_2 = self.image_1 self.image_3 = img - + velocity_dim = np.full((150, 50), self.previous_speed/30) - self.image_1 = np.dstack((self.image_1, velocity_dim)) - self.image_2 = np.dstack((self.image_2, velocity_dim)) - self.image_3 = np.dstack((self.image_3, velocity_dim)) - - img = [self.image_3, self.image_2 , self.image_1] + image_1 = np.dstack((self.image_1, velocity_dim)) + image_2 = np.dstack((self.image_2, velocity_dim)) + image_3 = np.dstack((self.image_3, velocity_dim)) + img = [image_3, image_2 , image_1] img = np.expand_dims(img, axis=0) start_time = time.time() @@ -179,7 +178,6 @@ def execute(self): speed = self.vehicle.get_velocity() vehicle_speed = 3.6 * math.sqrt(speed.x**2 + speed.y**2 + speed.z**2) self.previous_speed = vehicle_speed - if vehicle_speed > 300: self.motors.sendThrottle(0) self.motors.sendSteer(steer)