- System Overview
- Architecture
- Module Descriptions
- Configuration
- Participant Mission Guide
- Failsafe Mechanisms
- Troubleshooting
This project provides a modular codebase for controlling a drone using a Raspberry Pi and Pixhawk flight controller. It supports both simulation (SITL) and real hardware, and enables communication with a Ground Control Station (GCS) via serial, UDP, or TCP. The system is extensible for custom missions and includes failsafe features.
+-------------------+ +-------------------+ +-------------------+
| Ground Control |<---->| Communication |<---->| Flight |
| Station (GCS) | | Controller | | Controller |
+-------------------+ +-------------------+ +-------------------+
^ | |
| v v
+-------------------+ +-------------------+ +-------------------+
| Image Handler |<-----| Camera Module | | Failsafe |
+-------------------+ +-------------------+ +-------------------+
- Entry point. Loads configuration, initializes controllers, and starts the system.
- serial_comm.py: Handles serial communication with GCS.
- udp_client.py: Handles UDP communication.
- tcp_client.py: Handles TCP communication.
- flight_controller.py: Manages Pixhawk connection, arming, takeoff, landing, and waypoint navigation.
- comm_controller.py: Manages communication with GCS and relays commands to the flight controller.
- image_rx.py: Receives and processes images from the camera.
- battery_drop.py, disconnect.py, motor_loss.py, unstable_imu.py: Failsafe modules for various emergency scenarios.
- format.py: Template for participant missions.
- mission_planner.py: Loads and executes participant missions.
- helpers.py: Utility functions for config loading and coordinate calculations.
- logging.py: Logger setup.
- message_parser.py: Message encoding/decoding.
- connections.yaml: Communication and camera settings.
- pixhawk_config.yaml: Pixhawk and flight parameters.
- See
src/config/connections.yamlandsrc/config/pixhawk_config.yamlfor all configurable options.
- Copy
src/participant_codes/format.pyto a new file named after your team. - Implement the
mission_planfunction to return a list of waypoints. - Do not modify other files.
- The system includes modules to handle battery drops, disconnects, motor loss, and IMU instability. These modules can be extended as needed.
- Ensure all dependencies are installed (
pip install -r requirements.txt). - Check configuration files for correct connection strings and parameters.
- Use the logger output for debugging system state and errors.
For further details, see the code comments and docstrings in each module.