This repository contains the codebase for a Raspberry Pi-based drone system designed for educational workshops and competitions. The system supports both simulation (SITL) and real Pixhawk hardware, and enables communication with a Ground Control Station (GCS) via serial, UDP, or TCP. Participants can implement custom drone missions by defining waypoints and tasks.
- Flight Control: Connects to Pixhawk (SITL or physical), arms/disarms, takeoff, land, and waypoint navigation.
- Communication: Supports serial, UDP, and TCP links between the drone and GCS.
- Image Handling: Receives and processes images from a camera module (USB or RPi camera).
- Mission Planning: Participants can define custom missions by specifying waypoints.
- Failsafe Mechanisms: Includes modules for battery drop, disconnect, motor loss, and unstable IMU.
- Extensible: Modular structure for easy extension and customization.
src/
main.py # Entry point for the drone system
comms/ # Communication modules (serial, UDP, TCP)
config/ # YAML configuration files
controllers/ # Flight and communication controllers
failsafe/ # Failsafe modules
participant_codes/ # Participant mission templates and planners
search/ # Image receiving and processing
utils/ # Helper functions, logging, message parsing
Clone the repository from GitHub:
git clone https://github.com/Srish510/drone-workshop-code.git
cd drone-workshop-codeInstall Python 3.8+ and the required packages:
pip install -r requirements.txtEdit the configuration files in src/config/ as needed:
connections.yaml: Set up communication type and camera settings.pixhawk_config.yaml: Choose between SITL or physical Pixhawk and set flight parameters.
python src/main.pyThe system will connect to the Pixhawk, initialize communication, and wait for commands from the GCS.
- Copy the Template:
- In
src/participant_codes/, copyformat.pyto a new file named after your team (e.g.,alpha_team.pyif your team name is Alpha Team).
- In
- Implement Your Mission:
- Edit only the
mission_planfunction in your team file to return a list of waypoints:[(x1, y1, alt1), (x2, y2, alt2), ...]. - Each waypoint is relative to the takeoff point (in meters).
- Edit only the
- Do Not Modify Other Files:
- Only your team file should be changed. Other modifications may result in disqualification.
- Test Your Mission:
- The organizers will run your mission in simulation and on real hardware if selected.
See src/participant_codes/format.py for detailed instructions and requirements.
Submission details will be shared at the venue by the organizers.
- connections.yaml: Communication and camera settings.
- pixhawk_config.yaml: Pixhawk connection and flight parameters.
- Python 3.8+
- pymavlink
- pyserial
- PyYAML
- opencv-python-headless
- numpy
Install all dependencies with:
pip install -r requirements.txt- Always prioritize safety in mission design.
- Do not exceed operational bounds provided by organizers.
- Unsafe or non-compliant missions may be disqualified.
For detailed module descriptions, architecture, configuration, and troubleshooting, see the full documentation.
This project is for educational and competition use. See organizers for licensing details.