from gui.GUI import MainWindow from PyQt5.QtWidgets import QApplication from drone import Drone import signal signal.signal(signal.SIGINT, signal.SIG_DFL) if __name__ == '__main__': drone = Drone("mavros/cmd/arming", "mavros/cmd/land","mavros/set_mode", "/mavros/setpoint_velocity/cmd_vel","/IntrorobROS/Pose3D", "/IntrorobROS/image_raw") algorithm=MyAlgorithm(drone) app = QApplication(sys.argv) frame = MainWindow() frame.setDrone(drone) frame.setAlgorithm(algorithm) frame.show() t2 = ThreadGUI(frame) t2.daemon=True t2.start() sys.exit(app.exec_())
from MyAlgorithm import MyAlgorithm from gui.threadGUI import ThreadGUI from gui.GUI import MainWindow from PyQt5.QtWidgets import QApplication from drone import Drone import signal signal.signal(signal.SIGINT, signal.SIG_DFL) if __name__ == '__main__': drone = Drone("mavros/cmd/arming", "mavros/cmd/land", "mavros/set_mode", "/mavros/setpoint_velocity/cmd_vel", "/IntrorobROS/Pose3D", "/IntrorobROS/image_raw") algorithm = MyAlgorithm(drone) app = QApplication(sys.argv) frame = MainWindow() frame.setDrone(drone) frame.setAlgorithm(algorithm) frame.show() t2 = ThreadGUI(frame) t2.daemon = True t2.start() sys.exit(app.exec_())