order_visualization #5

Merged
s464919 merged 7 commits from order_visualization into master 2022-06-10 08:56:02 +02:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 153f16bcc0 - Show all commits

View File

@ -31,7 +31,7 @@ class ForkliftAgent(AgentBase):
self.current_order: Order = None self.current_order: Order = None
self.current_item = None self.current_item = None
self.item_station_completed = False self.item_station_completed = False
self.provided_items: List[Item] = [] self.current_order_delivered_items: List[Item] = []
self.ready_for_execution = False self.ready_for_execution = False
def queue_movement_actions(self, movement_actions: List[Action]): def queue_movement_actions(self, movement_actions: List[Action]):
@ -79,7 +79,7 @@ class ForkliftAgent(AgentBase):
if len(self.current_order.items) > 0: if len(self.current_order.items) > 0:
i = self.current_order.items.pop(0) i = self.current_order.items.pop(0)
if self.current_item is None: if self.current_item is None:
self.provided_items.clear() self.current_order_delivered_items.clear()
self.current_item = i self.current_item = i
print("PLAN MOVEMENT") print("PLAN MOVEMENT")
@ -142,7 +142,7 @@ class ForkliftAgent(AgentBase):
) )
self.current_item = None 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 self.item_station_completed = False
def step(self) -> None: def step(self) -> None:

View File

@ -85,6 +85,8 @@ class GameModel(Model):
self.items_for_recognization = copy.deepcopy(self.provided_items) self.items_for_recognization = copy.deepcopy(self.provided_items)
self.recognised_items: List[Item] = [] 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") print("Relocate forklift agent to loading area for item recognition")
pathFinder = PathFinderOnStates( pathFinder = PathFinderOnStates(
@ -208,7 +210,6 @@ class GameModel(Model):
print("Execution") print("Execution")
def recognise_item(self, item: Item): def recognise_item(self, item: Item):
# TODO IMAGE PROCESSING
val = image_classification(self.picture_visualization.img, self.classificator) val = image_classification(self.picture_visualization.img, self.classificator)
print("VAL: {}".format(val)) print("VAL: {}".format(val))