Overview
This was an assignment for my Robot Mobility course. The task was to write the code for a 6DOF quadcopter controller, and then use it to execute specified trajectories.
Process
The first task was to develop the controller architecture, described by the following diagram. This architecture describes the data that was moving between different parts of the cascaded controller.
Controller-DiagramI then developed a state machine described by this architecture in order to have the drone perform tasks on its own.
State-MachineResults
Here you can see how the controller performs. Given a desired trajectory, the drone flies to the specified positions and orientations.
Here you can see the drone acting with different tasks such as takeoff to height 1, move to two different (x, y) locations, and then hover for a few seconds before smoothly landing.