A comprehensive drone management and AI assistant system that connects to UAVs via MAVLink, provides real-time monitoring, and offers AI-powered diagnostics and assistance.
- Drone Connection: Connect to drones using MAVLink protocol over serial connections
- Hardware Validation: Automatically validate drone hardware and parameters
- Real-time Monitoring: Track drone status, battery levels, GPS, and other critical systems
- Web Interface: User-friendly web dashboard for monitoring and control
- AI Assistant: Integrated JARVIS AI assistant powered by Google's Gemini API
- Diagnostic Capabilities: Identify and suggest fixes for common drone issues
- Logging System: Comprehensive logging of all activities and communications
- Python 3.8 or higher
- Windows/Linux/macOS
- Internet connection (for AI features)
- Serial port access for drone connection
-
Clone this repository:
git clone https://github.com/yourusername/UAV-AI.git cd UAV-AI -
Create and activate a virtual environment:
# Windows python -m venv winenv winenv\Scripts\activate # Linux/macOS python -m venv myenv source myenv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt -
Set up environment variables: Create a
.envfile in the project root with the following:GEMINI_API_KEY=your_gemini_api_key_here
-
Start the UAV-AI Assistant:
python main.py -
The web interface will be available at http://localhost:5000
-
Connect to your drone by selecting the appropriate COM port and baud rate in the web interface
-
Use the terminal interface for direct commands:
query:your question here- Ask the AI assistant a questionexit- Exit the application
main.py- Main entry point and application controllerdrone_validator.py- Handles drone connection and hardware validationweb_server.py- Web interface and API endpointsJARVIS.py- AI assistant powered by Google's Gemini APIMavlink_rx_handler.py- MAVLink message handlinglogging_config.py- Logging configurationlogs/- Directory containing all log filesstatic/- Web interface static files
The system maintains several log files in the logs/ directory:
mavlink_log.txt- MAVLink communication logsAgent.log- AI agent/assistant activitieswebserver.log- Web server activities
- Connection Issues: Ensure the correct COM port and baud rate are selected
- Missing Logs: Check that the
logsdirectory exists and has write permissions - AI Not Responding: Verify your Gemini API key is correctly set in the
.envfile - Web Interface Not Loading: Ensure port 5000 is not in use by another application
[Your License Here]
- PyMAVLink for MAVLink protocol support
- Flask for the web framework
- Google Generative AI for the Gemini API