System for interacting with drone actuators based off sensor data and mission plans
The controls team on UAS@UCLA deals with designing the commands framework and routing algorithms for accomplishing the inputted mission objectives. This system consists of a PX4 autopilot flight controller and a Raspberry Pi offboard computer running custom control code to send high-level commands to the PX4 when conducting a mission.
Note: Our team has already completed two technical documentation paper (for Flappy 2017 and Spinny 2018) outlining all of the fundamental components that make our drones fly, so please check out those resources for an in-depth understanding about the platform we work upon.
Avionics Wiring Layout (Spinny)
This diagram outlines the power system and signal lines connecting the PX4 flight controller to the motors. It also showcases the communication links between the PX4 flight controller and the Raspberry Pi offboard computer running our custom control scripts.
Multi-Process Software Layout and Distributed Networking (Spinny)
This diagram outlines the main processes operating on the drone, and shows how they are linked using shared memory and inter-process messaging. Additionally, it shows the communication links to the groundstation via TCP socket transport. Communication between the PX4 flight controller and our custom control code on the Raspberry Pi is done using MAVLink messages. In the case of simulations, the physical PX4 is replaced with a mock flight controller (running within a Docker image), which accepts and outputs all of the same messages that a real flight controller would relay.
Mission Calculation, Message Format, and Synchronization
How do I get involved with controls?
The controls team relies heavily on 3rd party frameworks, namely the PX4 flight controller software suite. There are many tutorials online for how to get started with this platform, along with internal team projects that will teach the basics. Please refer to the projects/assignments section below for links to these.
See the software overview page for getting a core platform installed for developing UAS@UCLA software.
Also see the Guide to Running Controls Code.
Control Theory for Drones
Autopilot details (PX4)
- PX4 General Reference
- PX4 Architecture Overview
- PX4 full parameter reference
- Understand the difference between parameter prefixes, such as MC_* (attitude control), MPC_* (position control), PWM_* (output signal range setting), etc.
- Consult our team's spreadsheet for tracking parameters here for more information about the meaning behind these configuration settings (and feel free to add additional notes as you learn what the parameters do)
- PX4 firmware source code for seeing how the firmware works internally
- Suggestion: Clone that git repository, navigate to it using cd, and search for the parameter names above to see where they are referenced using "grep -r [[search string]]"
- Offboard computer setup with a PX4