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.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.
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!
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.
Changelogs:
- Improved CDH subsystem, telemetry, and command handling for supporting a larger number of drones
- Optimized main code and transitioned structures to classes
- Fixed bugs for smoother operations
- Automated mav_sys_id and hwID file generation
- Enabled Docker instances auto-creation for each drone
- Automatic initialization of each instance for user-friendly operation
- 1. Single group, single leader 11 followers with a fixed layout arrangement.
- 2. Three groups, three leaders, each group has three followers maintaining a fixed layout, and each group can be controlled independently.
https://www.mediafire.com/file/g9m5gyx4ru8ndzv/drone-template-1.tar/file
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:
- Node-to-node telemetry and communication using the new CDH subsystem
- Added swarm.csv to arrange our swarm mission prototype
- Improved ground station data handling and reporting
- Improved coordinator app and bug fixes
- Improved logging and debugging capabilities
- Improved Threads management in Coordinator App
- Improved error reporting and handling
- I haven't implemented considerations for telemetry and command acknowledgment yet. will be implemented soon.
- No Smoothing and Estimation algorithm for the following setpoints has been implemented yet. will be quickly implemented.
In version 0.4, we've made some major enhancements that will significantly improve the capabilities of our Drone Show system:
-
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).
- 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.
With the new v0.3 update, we have made significant improvements and added several new features:
- Skybrush CSV Processing: We've added the ability to process Skybrush CSV files and convert them into our template. This feature also includes creating acceleration and velocities for improved path following. A detailed video tutorial for this is available on our YouTube channel .
- YouTube Tutorial on "Using Sky Brush and Blender for PX4 MAVSDK Drone Shows: Improving our Drone Show Project"
- Coordinator.py: This new script manages and times the mission and state telemetry, enhancing the control of the drone show.
- Merged Control Files: We have merged the multiple and single, as well as real and simulation mode control files for a more streamlined user experience.
- Code Optimization: The code has been optimized for better performance and readability.
- Bug Fixes: Various bugs have been identified and resolved in this update.
As always, exercise caution and ensure you have the necessary expertise before using offboard mode in a real-world setting. Happy drone programming!
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.
To run the code and follow along with the tutorial, ensure that you have the following prerequisites in place:
- Python: Install Python and the required dependencies for running the scripts.
- PX4 Development Environment for SITL: Set up a PX4 Software-in-the-Loop simulation environment on either Ubuntu or WSL-2. For detailed instructions, refer to the tutorial available on our YouTube channel.
- MAVSDK: Install MAVSDK, which provides the necessary libraries for communication with the drone. Detailed installation and setup instructions can be found in our MAVSDK tutorial video on YouTube.
- MAVLink-router (please ensure to download and install it separately from here .
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.
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.
- YouTube Tutorial on how to build your WSL-2 PX4 Development Environment
- YouTube Tutorial on how to install and start with MAVSDK
- My PX4 Development YouTube Playlist
- Multiple Drone Show Youtube Demo
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.
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.