| title | deepdrone-old |
|---|---|
| emoji | 🚁 |
| colorFrom | green |
| colorTo | green |
| sdk | streamlit |
| sdk_version | 1.41.1 |
| app_file | main.py |
| pinned | false |
注意:这是 deepdrone 的 1.0 老版本,不再维护。请使用最新版本的 deepdrone。
Note: This is the 1.0 legacy version of deepdrone and is no longer maintained. Please use the latest version of deepdrone.
A drone chat agent for drone analytics and operations, built on the smolagents framework with DroneKit integration for real drone control. It uses the GLM-4.5 API for natural language understanding and mission generation.
- Drone Chat: Interact with a drone assistant through a chat interface powered by GLM-4.5.
- Visualizations: Generate flight paths and sensor readings visualizations.
- Maintenance Recommendations: Get maintenance suggestions based on flight hours.
- Mission Planning: Generate mission plans for various drone operations.
- Real Drone Control: Connect to and control real drones using DroneKit.
- Take off and land
- Navigate to GPS coordinates
- Return to home
- Execute waypoint missions
- Monitor battery and location
- Clone the repository:
git clone https://github.com/LeaderOnePro/deepdrone-old.git cd deepdrone-old - Install dependencies:
pip install -r requirements.txt
- Python 3.10+ Compatibility:
If you're using Python 3.10 or newer, you need to run the patch script before using DroneKit:
This script fixes the "AttributeError: module 'collections' has no attribute 'MutableMapping'" error by patching the DroneKit library to use collections.abc instead of collections.
python dronekit_patch.py
- Set up your API Key:
Create a file named
.envin the root of the project and add your GLM API key:GLM_API_KEY=your_glm_api_key - Run the application:
streamlit run main.py
The DroneKit integration allows you to control drones running ArduPilot or PX4 firmware.
To test the drone control features in a simulated environment:
- Install the ArduPilot SITL simulator (follow instructions at the ArduPilot dev guide).
- Start a simulated drone:
sim_vehicle.py -v ArduCopter --console --map - Connect to the simulator from the deepdrone-old chat interface by typing:
Connect to simulator at tcp:127.0.0.1:5762orconnect_to_real_drone('tcp:127.0.0.1:5762').
To connect to a real drone, you can either use the chat interface within the application or a command-line script to test your connection first.
- Ensure your drone is running ArduPilot or PX4 firmware.
- Connect your drone to your computer.
- Use natural language commands in the deepdrone-old chat interface. For example:
- "Connect to drone at
tcp:192.168.1.1:5760" - "Connect to drone using USB at
/dev/ttyACM0" (for Linux) - "Connect to the drone at
COM4" (for Windows)
- "Connect to drone at
Before using the main application, you can test your hardware connection using the connection_test.py script. This is useful for verifying that your drone is communicating correctly with your computer.
Run the script from your terminal, providing the appropriate connection string.
# For direct USB connection
python connection_test.py /dev/ttyACM0 # Linux
python connection_test.py COM5 # Windows
# For WiFi/Network connection
python connection_test.py tcp:192.168.1.1:5760
# For telemetry radio connection
python connection_test.py /dev/ttyUSB0The script will attempt to connect and print the drone's status and attributes if successful.
Once connected, you can control the drone with commands like:
- "Take off to 10 meters"
- "Fly to latitude 37.7749, longitude -122.4194, altitude 30 meters"
- "Return to home"
- "Land now"
collections.MutableMappingerror: If you encounter this error, especially on Python 3.10+, run the included patch script:python dronekit_patch.py. This script resolves a compatibility issue in the DroneKit library.- Connection refused error: Ensure the drone or simulator is powered on and the connection string is correct.
- Import errors: Verify that all dependencies are installed by running
pip install -r requirements.txt. - Permission errors: For USB connections on Linux, you may need to add your user to the
dialoutgroup (sudo usermod -a -G dialout $USER) or usesudoto run the application.
IMPORTANT: Always follow safety guidelines when operating real drones.
- smolagents for agent functionality.
- GLM-4.5 API (
glm-4.5model) for natural language understanding and code generation. - DroneKit-Python for real drone control.
- Streamlit for the user interface.
- Pandas, Matplotlib, and Seaborn for data analysis and visualization.

