This project enables commanding a drone using natural language. Leveraging MAVSDK for drone control and a Large Language Model (LLM) for natural language interpretation, it supports real-time decision-making and drone navigation.
- Natural Language Commands: Use plain English to command the drone to perform tasks such as takeoff, landing, navigation, and returning to the base.
- Real-time Telemetry: Integrates live drone telemetry for informed decision-making.
- Customizable LLM Prompts: Generates context-aware prompts for LLM interpretation.
- Dynamic Maneuver Execution: Executes commands like "goto", "land", "stop", and "rtb" (return to base).
- MAVSDK: For drone communication and control.
- Google GenAI: For natural language command processing.
- Asyncio: To handle concurrent tasks.
- YAML: For secure API key management.
-
Clone the repository:
git clone https://github.com/baileyarzate/NimbusAI.git cd NimbusAI
-
Install the required dependencies:
pip install -r requirements.txt #requirements file yet to be created.
-
Add your Google GenAI API key in api_key.yaml:
api_key: YOUR_API_KEY
-
Ensure your drone is set up and connected to MAVSDK.
-
Start the program:
python main.py
-
Enter natural language commands in the terminal, such as:
- Fly Far North
- Land at the current location
- Return to base
- Takeoff to 30 meters
- Hold location
-
The drone will interpret and execute commands, displaying real-time telemetry and status updates.
Command | Description |
---|---|
goto | Fly to a specified location with latitude, longitude, altitude, and yaw. |
takeoff | Take off to a specified altitude. |
land | Land at the current location. |
stop | Stop current action and hover at the current location. |
rtb | Return to the base location recorded at initialization. |
hold | Hold position and hover in place. |
- Commands: Each maneuver is implemented in modular command files (commands folder).
- Helpers: Utility functions for prompt generation and JSON processing (helper folder).
- Telemetry: Retrieves and formats real-time telemetry data (stateinfo folder).
- Add speech-to-text integration for hands-free commands.
- Enhance error handling for robust operation in diverse scenarios.
- Expand the command set for advanced drone operations.
Contributions are welcome! Please open an issue or submit a pull request with proposed changes.
This project is licensed under the MIT License. See the LICENSE file for details.