Diagrams - Weber-State-UAV-Program/Documentation-2024-2025 GitHub Wiki
System Overview Diagram
As the diagram illustrates, the system uses a Cube Pilot Orange Cube as the flight controller (FC). The FC handles low level control and stabilization of the drone as well as directly interfacing with some of the drones peripheral sensors.
The on-board raspberry pi acts as a companion computer to assist the flight computer with more complex in flight tasks (such as precision landing). It uses Ubuntu Linux 22.04 to facilitate the ROS2 Humble network, in which control and behavioral algorithms are implemented. Communication between the Co-Computer (PI) and the Flight Computer (Orange Cube) is over a high-rate UART connection between the two. On the FC side, a uXRCE-DDS Agent runs on boot, this agent, in conjunction with the uXRCE-DDS Client that runs on the PI, allow all topics used in the internal uORB network on the flight computer to be seen as ROS2 topics on the raspberry pi. We communicate between PX4 Autopilot and ROS2 by publishing and subscribing to these topics. See more about this bridge here.
Communication and control from the base station to the drone is done entirely using a MAVLink connection over UART. We utilize the MAVLink module within PX4 Autopilot firmware to generate these messages from the Flight Computer, which are then sent to the mLRS LoRa module over UART and broadcasted over LoRa at 915 MHz to then be received by the base station.
Executive Mode Executor FSM Diagram
This FSM diagram illustrates the programmed behavior of the drone as dictated by the Executive Mode Executor, implemented in mode_executor.cpp.
Frame Transforms
This diagram illustrates the different coordinate frames that are tracked within the system.
Frame Transform Tree
This diagram illustrates the coordinate frames and how they relate to each other.
Landing Node Flow Diagram
This diagram shows the flow of logic as implemented in precision_land.cpp
PI Control Loop
We use the above PI control loop in order to help the drone precisely self-center over the AprilTags as it goes through each state of the Precision Landing Mode. The finalized gains that were chosen for the P and I components are 1.2 and 0.05, respectively.
IR Illumination Flow Diagram
This diagram illustrates what conditions need to be met to control the PWM value sent to the AprilTags from the base station. This is implemented using two ROS nodes base_exec and io_controller.
Base Station Doors State Machine
This diagram represents the state machine logic used to open and close the doors of the base station. More details can be found here.