From 9e0a2a6bdf7751a181fd5c40dfa01f7acaf4b06f Mon Sep 17 00:00:00 2001 From: fheinrich <fheinrich@techfak.uni-bielefeld.de> Date: Tue, 6 Feb 2024 13:49:38 +0100 Subject: [PATCH] Changed counters slightly --- overcooked_simulator/gui_2d_vis/drawing.py | 7 ++-- .../gui_2d_vis/visualization.yaml | 39 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/overcooked_simulator/gui_2d_vis/drawing.py b/overcooked_simulator/gui_2d_vis/drawing.py index 20523ae2..632b8f1f 100644 --- a/overcooked_simulator/gui_2d_vis/drawing.py +++ b/overcooked_simulator/gui_2d_vis/drawing.py @@ -531,11 +531,12 @@ class Visualizer: for counter in counters: if counter["occupied_by"]: - item_pos = counter["pos"] + item_pos = np.array(counter["pos"]) item_scale = 1.0 counter_type = counter["type"] - if counter_type.endswith("Dispenser"): + + if counter_type.endswith("Dispenser") and "Plate" not in counter_type: if "item_offset" in self.config["Dispenser"].keys(): offset_vec = pygame.math.Vector2( self.config["Dispenser"]["item_offset"] @@ -554,7 +555,7 @@ class Visualizer: screen=screen, occupied_by=counter["occupied_by"], grid_size=grid_size, - pos=np.array(counter["pos"]) * grid_size + (grid_size / 2), + pos=item_pos * grid_size + (grid_size / 2), item_scale=item_scale, ) diff --git a/overcooked_simulator/gui_2d_vis/visualization.yaml b/overcooked_simulator/gui_2d_vis/visualization.yaml index ce510e72..afc39737 100644 --- a/overcooked_simulator/gui_2d_vis/visualization.yaml +++ b/overcooked_simulator/gui_2d_vis/visualization.yaml @@ -27,19 +27,19 @@ Counter: # width: 1 # color: whitesmoke - type: image - path: images/counter4.png + path: images/counter5.png size: 1 CuttingBoard: parts: - type: image path: images/cutting_board_large.png - size: 0.7 - center_offset: [ 0, 0.1 ] + size: 0.75 + center_offset: [ 0, 0.05 ] -#PlateDispenser: -# parts: +PlateDispenser: + parts: [ ] # - type: rect # height: 0.95 # width: 0.95 @@ -49,8 +49,8 @@ Trashcan: parts: - type: image path: images/trash3.png - size: 0.8 - center_offset: [ 0, -0.15 ] + size: 0.88 + center_offset: [ 0, -0.05 ] #TomatoDispenser: # parts: @@ -89,17 +89,18 @@ Trashcan: Dispenser: parts: - - type: circle - color: gray83 - radius: 0.3 - center_offset: [ 0, -0.15 ] - type: circle color: black - radius: 0.25 - center_offset: [ 0, -0.15 ] + radius: 0.35 + center_offset: [ 0, -0.05 ] + - type: circle + color: gray83 + radius: 0.33 + center_offset: [ 0, -0.05 ] - item_offset: [ 0, -0.15 ] - item_scale: 0.75 + + item_offset: [ 0, -0.05 ] + item_scale: 0.9 ServingWindow: parts: @@ -127,15 +128,15 @@ Sink: parts: - type: image path: images/sink1.png - size: 0.8 - center_offset: [ 0, -0.15 ] + size: 0.85 + center_offset: [ 0, -0.12 ] SinkAddon: parts: - type: image path: images/drip2.png - size: 0.65 - center_offset: [ 0, -0.13 ] + size: 0.75 + center_offset: [ 0, -0.05 ] # Items Tomato: -- GitLab