From 153f16bcc0ba467681979adf0d6dc244c7ddcd41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20Szama=C5=82ek?= Date: Thu, 9 Jun 2022 21:33:57 +0200 Subject: [PATCH] visual changes --- ForkliftAgent.py | 6 +++--- GameModel.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ForkliftAgent.py b/ForkliftAgent.py index b2bf5f0..2791a5b 100644 --- a/ForkliftAgent.py +++ b/ForkliftAgent.py @@ -31,7 +31,7 @@ class ForkliftAgent(AgentBase): self.current_order: Order = None self.current_item = None self.item_station_completed = False - self.provided_items: List[Item] = [] + self.current_order_delivered_items: List[Item] = [] self.ready_for_execution = False def queue_movement_actions(self, movement_actions: List[Action]): @@ -79,7 +79,7 @@ class ForkliftAgent(AgentBase): if len(self.current_order.items) > 0: i = self.current_order.items.pop(0) if self.current_item is None: - self.provided_items.clear() + self.current_order_delivered_items.clear() self.current_item = i print("PLAN MOVEMENT") @@ -142,7 +142,7 @@ class ForkliftAgent(AgentBase): ) self.current_item = None - self.provided_items.append(self.current_item) + self.current_order_delivered_items.append(self.current_item) self.item_station_completed = False def step(self) -> None: diff --git a/GameModel.py b/GameModel.py index 78630a7..e7e14d0 100644 --- a/GameModel.py +++ b/GameModel.py @@ -85,6 +85,8 @@ class GameModel(Model): self.items_for_recognization = copy.deepcopy(self.provided_items) self.recognised_items: List[Item] = [] + self.current_order_delivered_items = self.forklift_agent.current_order_delivered_items + print("Relocate forklift agent to loading area for item recognition") pathFinder = PathFinderOnStates( @@ -208,7 +210,6 @@ class GameModel(Model): print("Execution") def recognise_item(self, item: Item): - # TODO IMAGE PROCESSING val = image_classification(self.picture_visualization.img, self.classificator) print("VAL: {}".format(val))