From 8924c5487e119138909dc31a18475305c5a62a16 Mon Sep 17 00:00:00 2001 From: jeonghwanPark Date: Wed, 17 Nov 2021 13:43:17 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Brain/Controller.py | 2 +- Brain/RoomMission.py | 4 ++-- Constant.py | 8 ++++---- Sensor/ImageProcessor.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Brain/Controller.py b/Brain/Controller.py index 8097a5d..5cc26cc 100644 --- a/Brain/Controller.py +++ b/Brain/Controller.py @@ -53,7 +53,7 @@ def set_test_mode(cls, mode: Mode) -> None: cls.ROI = True cls.robot.color=LineColor.YELLOW cls.robot.direction = Direction.LEFT - cls.mission_done = 3 + cls.mission_done = 2 @classmethod diff --git a/Brain/RoomMission.py b/Brain/RoomMission.py index fc95c6c..45e8146 100644 --- a/Brain/RoomMission.py +++ b/Brain/RoomMission.py @@ -109,8 +109,8 @@ def detect_alphabet(cls) -> bool: if alphabet_info: cls.alphabet_color, cls.alphabet = "BLUE", alphabet_info return True - elif cls.detect_miss > 8 : - cls.alphabet_color, cls.alphabet = "BLUE", "B" + elif cls.detect_miss > 4 : + cls.alphabet_color, cls.alphabet = "BLUE", "D" return True else: cls.robot.curr_head4room_alphabet.rotate(-1) diff --git a/Constant.py b/Constant.py index 0058982..fbb6ede 100644 --- a/Constant.py +++ b/Constant.py @@ -77,8 +77,8 @@ def __delattr__(self, name): ### GREEN ROOM ### ## 1) BOX -> AREA const.GREEN_ROOM_TURN_FIND_BOX = 3 -const.GREEN_ROOM_DEFAULT_TURN_FIND_AREA = 2 -const.GREEN_ROOM_DEFAULT_WALK_BEFORE_DROP_BOX = 3 +const.GREEN_ROOM_DEFAULT_TURN_FIND_AREA = 1 +const.GREEN_ROOM_DEFAULT_WALK_BEFORE_DROP_BOX = 1 const.GREEN_ROOM_AREA_IN_LIMIT = 460 ## 2) AREA -> CORNER const.GREEN_ROOM_DEFAULT_TURN_FIND_CORNER = 2 @@ -87,8 +87,8 @@ def __delattr__(self, name): ### BLACK ROOM ### const.BLACK_ROOM_ALPHABET = "B" const.BLACK_ROOM_DEFAULT_TURN_FIND_BOX = 3 -const.BLACK_ROOM_DEFAULT_TURN_FIND_CORNER = 4 -const.BLACK_ROOM_DEFAULT_OUT_ROOM_WALK = 0 +const.BLACK_ROOM_DEFAULT_TURN_FIND_CORNER = 3 +const.BLACK_ROOM_DEFAULT_OUT_ROOM_WALK = 2 ### DEBUG MODE ### diff --git a/Sensor/ImageProcessor.py b/Sensor/ImageProcessor.py index 92d3cf8..6a8d23d 100644 --- a/Sensor/ImageProcessor.py +++ b/Sensor/ImageProcessor.py @@ -420,7 +420,7 @@ def is_out_of_black(self, visualization=False) -> bool: cv2.waitKey(1) print(rate) - return rate <= 40 + return rate <= 30 def check_area_color(self): src = self.get_image()