Created
June 14, 2020 14:19
-
-
Save youngsoul/50dcfe1c726085b4995dc38294f1f554 to your computer and use it in GitHub Desktop.
Main Tello Process Script to start other processes: See https://github.com/youngsoul/tello-sandbox.git Tello_face_tracking.py for larger context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if __name__ == '__main__': | |
| signal.signal(signal.SIGINT, signal_handler) | |
| signal.signal(signal.SIGTERM, signal_handler) | |
| run_pid = True | |
| track_face = True # True - cause the Tello to start to track/follow a face | |
| save_video = True | |
| fly = True | |
| parent_conn, child_conn = Pipe() | |
| parent2_conn, child2_conn = Pipe() | |
| exit_event = Event() | |
| with Manager() as manager: | |
| p1 = Process(target=track_face_in_video_feed, | |
| args=(exit_event, child_conn, child2_conn, run_pid, track_face, fly,)) | |
| p2 = Process(target=show_video, args=(exit_event, parent_conn,)) | |
| p3 = Process(target=video_recorder, args=(parent2_conn, save_video,)) | |
| p2.start() | |
| p3.start() | |
| p1.start() | |
| p1.join() | |
| p2.terminate() | |
| p3.terminate() | |
| p2.join() | |
| p3.join() | |
| print("Complete...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment