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()