alireza787b / mavsdk_drone_show

All in one Drone Show and Smart Swarm Solutin for PX4
86 stars 22 forks source link
drone mavlinkk mavsdk px4 swarm swarm-robotics

<!DOCTYPE html>

PX4 Based Drone Show and Smart Swarm cooperative missions using MAVSDK

Introduction to the Project Welcome to our drone programming project, a wild and ongoing journey from the simple to the complex. We started with basic offboard trajectory following and creating static drone formations in the sky. Over time, we've ramped up to creating multiple dynamic shapes and orchestrating impressive sky drone shows using SkyBrush. Our attention then turned to developing intelligent drone swarm behaviors based on a multi-level leader/follower model. With every version, we're pushing the envelope, enhancing the world of drone programming and swarm control bit by bit. And here's the fun part, we're far from done. Every new release peels back another layer, revealing more complexities and pushing our abilities further. We're pretty stoked about what's coming up and we hope you're too! We've built this project hoping it'll make a dent in the drone programming universe, enabling anyone to create breathtaking drone shows and foster a community where we share, learn, and grow together. We encourage you to check out our previous versions to get a feel for our journey so far. And hey, we absolutely love hearing from you all - your thoughts, ideas, questions - bring 'em on! They fuel our drive to keep pushing. Enjoy exploring and happy coding!

Version 0.8: Major GUI Improvements and Enhanced Swarm Intelligence

In version 0.8, we have made significant improvements to the GUI and drone dashboard, which is a web-based React application. We have also introduced smarter and smoother drone swarm behaviors using a Kalman Filter implementation.

follow the step-by-step instructions to run this version.

YouTube Demo of Version 0.8

New Features:

Improvements:

Known Bugs:

As always, we welcome your feedback, suggestions, and contributions!

## Version 0.7: React GUI for Swarm Monitoring & Real-World and SITL Environment Scenario Automization Improvements In version 0.7, we have implemented a React-based graphical user interface (GUI) for real-time drone swarm monitoring. This allows for an intuitive centralized dashboard to track and command multiple drones in a swarm. Additionally, we have further optimized and automated the PX4 Docker environment startup and configuration. These improvements enhance the user experience and streamline swarm orchestration.

YouTube Demo of Version 0.7

**New Features:** - Implemented React GUI for real-time swarm monitoring - Automated PX4 Docker and virtual machine environment startup and configuration - Automized scenario with startup scripts both for SITL environment and Real Drone Hardware - Optimized codebase and fixed bugs - Added documentation As always, we welcome your feedback, suggestions, and contributions! ## Version 0.6: Enhanced Complex Leader/Follower Swarm Control & Docker-Based SITL As we progress in our drone programming journey, version 0.6 of our project brings more advanced features and improvements, with enhanced swarm control and dockerized SITL demonstrations. In this release, we aim to increase efficiency and automation in managing larger numbers of drones with complex mission dynamics. The demonstration of these features can be found in the link to the YouTube video below.

YouTube Tutorial Demonstrating Enhanced Leader/Follower Swarm Control & Docker-Based SITL V0.6

Changelogs: For demonstrations, we've run two demos: Docker Image Backupfile. You can import it easily using Portainer and create drone instances from that. It includes PX4 SITL, JMAVSIM, Gazebo, MAVLink Router,mavsdk, Mavsdk_drone_show , ...
https://www.mediafire.com/file/g9m5gyx4ru8ndzv/drone-template-1.tar/file ## Version 0.5: Implementing Leader Follower Swarm Mission In this release, we're stepping beyond simple drone shows and implementing real drone swarm capabilities, like leader/follower missions, using PX4 and MAVSDK in Python. v0.5 introduces the following features and improvements:

YouTube Tutorial Demonstrating Leader Follower Swarm PX4 V0.5

v0.5 Changelogs: Limitations in v0.5 We're excited to continue developing this project and exploring the possibilities of drone swarm intelligence. As always, we welcome collaboration, suggestions, and questions from the community. ## Version 0.4: Advanced Swarm Control and Feature Enhancements In version 0.4, we've made some major enhancements that will significantly improve the capabilities of our Drone Show system:

YouTube Tutorial Demonstrating Coordinated SITL Real-World Scenario V0.4

- **Coordinator.py:** This Python script acts as the conductor of our drone orchestra, managing a host of tasks: - Synchronizes each drone's system time with a global clock. - Downloads the configuration file (`config.csv`) from our web server to ensure that each drone follows the most up-to-date flight plan. - Initiates the MAVLink-router (please ensure to download and install it separately from [here](https://github.com/mavlink-router/mavlink-router)). - Manages MAVLink routing between serial, UDP, GCS, and the Swarm Control app. - Generates telemetry packets about the state of each drone, which are sent to the Swarm Control app. - Listens to command packets from the ground station, which set a future trigger time for coordinated show starts. - **Debug_gcs_test.py:** This Python script provides the interface for ground control, with the following responsibilities: - Listens to telemetry from all drones, decoding and displaying the packets in real time. - Can initiate a "trigger" command, setting a future timestamp for each drone and altering their states for coordinated maneuvers. - While currently a command-line app, it is designed with a future graphical user interface (GUI) in mind. - **Multi-Drone Testing:** To demonstrate the system's capabilities, we've configured a four-drone test. Each drone operates on its own VMware node with individual PX4 SITL instances running in JMAVSim. Meanwhile, the ground station (Swarm Control app) runs on a Windows system, receiving telemetry from all drones and issuing commands. - **Bug Fixes and Documentation:** Various bugs identified in previous versions have been fixed, and we've added substantial documentation to help users understand the functionality better and resolve potential issues.

Version 0.3: Enhanced Drone Show Control and Optimizations

With the new v0.3 update, we have made significant improvements and added several new features:

As always, exercise caution and ensure you have the necessary expertise before using offboard mode in a real-world setting. Happy drone programming!

Introduction:

MAVSDK (MAVLink SDK) is a powerful tool for interacting with drones using the MAVLink communication protocol. This tutorial focuses on the offboard mode in PX4, which enables external systems to directly control a drone's position and velocity. Offboard mode allows for autonomous flight and finds applications in research, development, and testing scenarios.

MAVSDK Documentation

Prerequisites:

To run the code and follow along with the tutorial, ensure that you have the following prerequisites in place:

Note: When using offboard mode with a real drone, it is essential to have a companion computer (such as a Raspberry Pi) onboard the drone or a reliable telemetry system. Please exercise caution and ensure you have the necessary expertise and understanding of offboard mode before attempting to use it with a real drone. Consider safety measures and be prepared for failsafe scenarios.

Tutorial Highlights:

In this tutorial, we will guide you through a simulated environment using SITL PX4 in Gazebo. The demonstration includes a single drone performing captivating shapes such as circles, squares, hearts, and even a helix. While the current implementation in MAVSDK may not provide the same level of performance as using MAVROS with feedforwarded accelerations, this tutorial serves as an educational starting point for understanding offboard control.

Make sure to check out the complete code, resources, and sample CSV files in our GitHub repository. Additionally, we invite you to subscribe to our YouTube channel for more exciting tutorials and drone-related content.

Useful Tutorials:

Usage:

Follow the YouTube Tutorial for this project:

You can use csvCreator.py to create different shape setpoints. active.csv and a screenshot of the drone's 3D trajectory will be saved to the shapes folder. The next step is to run offboard_from_csv.py and see the drone following the actions.

Disclaimer:

Using offboard mode with a real drone involves risks and should be approached with caution. Understand the safety implications, consider failsafe scenarios, and ensure you have the necessary expertise before using offboard mode in a real-world setting.