A comprehensive autonomous drone project using ArduPilot, Raspberry Pi 5, and Python-based trajectory planning with Vicon motion capture tracking.
This project demonstrates autonomous drone flight capabilities through progressive exercises, from basic construction to advanced trajectory planning. The drone uses ArduPilot firmware with Python-based control via DroneKit or MAVSDK libraries, integrated with Vicon motion capture for precise indoor positioning.
Key Features:
- QAV250 quadcopter frame assembly
- ArduPilot flight controller integration
- Raspberry Pi 5 companion computer
- Python-based autonomous flight control
- Vicon motion capture integration
- Spiral trajectory implementation
- Safety-first design approach
- Frame: QAV250 Mini Quadcopter Frame
- Flight Controller: Pixhawk 4 Mini with ArduPilot firmware
- Companion Computer: Raspberry Pi 5
- ESCs: Electronic Speed Controllers (4x)
- Motors: Brushless motors (4x)
- Propellers: Matched set (DO NOT install until tutor approval)
- Battery: LiPo battery with appropriate charger
- Power Distribution Board
- Remote Controller: For manual flight
- Safety glasses
- LiPo safety bag
- Protective net for testing area
- SD Card (64-bit) for Raspberry Pi OS
- WiFi access (Zyxel recommended)
- Raspberry Pi OS (64-bit)
- ArduPilot - Flight control firmware
- Python 3.x with the following libraries:
- DroneKit (
dronekit-python) - Recommended - MAVSDK (alternative)
- PyVicon datastream
- DroneKit (
- VS Code with Remote Explorer extension (for SSH)
LiPo Battery Safety:
- β Only use approved chargers
- β Always use fire-resistant LiPo bag during charging
- β Never leave batteries charging unattended
- β Store at 3.8-3.85V per cell when not in use for >24 hours
- β Store in cool, dry location inside LiPo bag
- β Never drop, puncture, or bend batteries
- π¨ Immediately report puffed, swollen, or damaged batteries
Workshop & Flight Safety:
- β Safety glasses required when working on drone
- β DO NOT install propellers until tutor approval
- β Always put drone behind protective net when powered on
- β Keep workspace clean and organized
- β Be mindful of other groups in the lab
- β Never test motors/propellers without tutor inspection
WARNING: Failure to follow safety protocols may result in equipment damage, personal injury, and lab access revocation.
The project is organized into three progressive exercises:
- Kit inspection and inventory verification
- Lab access setup
- Safety protocol review
- Frame assembly (QAV250)
- Electronic component installation
- Software configuration (ArduPilot)
- First manual flight
- Raspberry Pi 5 integration
- Vicon motion capture setup
- Autonomous flight programming
- Spiral trajectory implementation
- Create a checklist of all components
- Verify nothing is broken or missing
- Report any issues to tutors immediately
- Obtain lab access card
- Designate one group member to sign for card
- Store card securely
-
Plan Component Placement
- Consider wire routing
- Center of gravity
- Accessibility for maintenance
- Review plan with tutor before assembly
-
Assemble QAV250 Frame
- Follow Pixhawk 4 Mini QAV250 Kit Quick Start Guide
- Consult online build log for detailed visual guide
-
Connect Electronic Components
- ESCs
- Motors
- Power Distribution Board
- Ensure neat and secure wiring
-
Verify Motor Configuration
- Check motor layout matches guide diagram
- Confirm spin directions
- Critical for flight stability
-
β οΈ STOP - DO NOT ATTACH PROPELLERS- Get tutor inspection and approval first
- Only install propellers after explicit permission
Follow the ArduPilot first setup guide for complete configuration including software setup, calibration, and radio controller configuration.
- Present complete assembly to tutor
- Get final check-up approval
- Fly manually with remote controller
Steps:
- Flash Raspberry Pi OS (64-bit) to SD Card
- Enable SSH and connect to WiFi (Zyxel recommended)
- Update system packages
- Install Python dependencies (dronekit, pymavlink)
- Test DroneKit installation
VS Code Remote Development:
- Install "Remote Explorer" extension in VS Code
- Connect to RPI 5 via SSH for remote development
Install PyVicon datastream library on Raspberry Pi.
Request tutor assistance for:
- Vicon Tracker software setup
- Streaming object data configuration
- Code example for receiving Vicon data
Recommended: DroneKit
- DroneKit Documentation
- Interfaces Raspberry Pi with Pixhawk
- Allows position commands and velocity control
Objective: Program autonomous upward spiral (helical) trajectory
Trajectory Specifications:
- Radius: 1 meter
- Starting Height: 0.5 meters
- Final Height: 1.5 meters
- Mindful of lab ceiling constraints
Mathematical Implementation:
Generate waypoints using trigonometric functions (sine and cosine) for the circular path in the xy-plane, while linearly increasing the z-component for the ascent. The number of windings is up to you to decide and implement.
Execution Requirements:
- Smooth waypoint transitions
- Safe takeoff to starting height
- Smooth landing after trajectory completion
- Code must include safety features (safe takeoff and landing)
Battery not charging:
- Check charger settings
- Verify correct LiPo balance mode
- Inspect battery for damage
Motors not spinning:
- Check ESC connections
- Verify motor direction configuration
- Ensure proper PWM signals from flight controller
DroneKit connection failed:
- Verify serial port:
/dev/ttyAMA0or/dev/ttyUSB0 - Check baud rate (typically 57600 or 115200)
- Ensure Raspberry Pi is powered properly
Vicon data not streaming:
- Verify network connection
- Check Vicon Tracker software configuration
- Request tutor assistance for setup
Unstable flight:
- Re-check motor directions
- Verify propeller installation (correct orientation)
- Recalibrate IMU and compass
- Check center of gravity
This project is developed as part of an academic course. Please check with your institution regarding usage and distribution rights.
- Course instructors and tutors
- ArduPilot development community
- DroneKit developers