def __init__(self, pitch, color, our_side, video_port=0, comm_port='/dev/ttyACM0', quick=False, is_attacker=False): """ Entry point for the SDP system. Params: [int] video_port port number for the camera [string] comm_port port number for the arduino [int] pitch 0 - main pitch, 1 - secondary pitch [string] our_side the side we're on - 'left' or 'right' # """ self.controller = Controller(comm_port) if not quick: print("Waiting 10 seconds for serial to initialise") time.sleep(10) # Kick once to ensure we are in the correct position self.controller.update(CommandDict.kick()) self.pitch = pitch # Set up the vision system self.vision = VisionWrapper(pitch, color, our_side, video_port) # Set up the planner self.planner = Planner(our_side, pitch, attacker=is_attacker) # Set up GUI self.GUI = GUI(calibration=self.vision.calibration, pitch=pitch, launch=self) self.color = color self.side = our_side self.control_loop()