In this project, you'll set up a state machine using event-driven programming to autonomously flying a drone. You will be using flying a quadcopter in Unity simulator. After completing this assignment, you'll be familiar with sending commands and receiving incoming data from the drone.
The python code you write is similar to how the drone would be controlled from a ground station computer or an onboard flight computer. Since communication with the drone is done using MAVLink, you will be able to use your code to control an PX4 quadcopter autopilot with very little modification!
Follow the steps mentioned here to get started.
This link provides a great introduction to Facebook's Visdom tool to integrate and plot realtime data for this project.
Here's a plot of the data acquired after executing the code in backyard_flyer.py
.
You can find my submission here.
Thanks to user @fierval for the drone trajectory visualization code. Here's the square trajectory for my drone run: