![]() The advantage is that if you are working with other types of drones that are not based on MAVLink messages, you can still keep on using the same GUI frontend. Skybrush Live itself does not need to know what sort of drones it is communicating with – the server provides a module for handling MAVLink-based outdoor drones, and takes care of translating MAVLink-specific commands to a set of messages that Skybrush Live understands. Skybrush is based on a client-server architecture the server is running in the background and managing the communication channels to drones, RTK base stations, weather providers and so on, while a frontend application called Skybrush Live provides a nice graphical user interface that you can interact with. Do not forget to step out of the ap-swarm-launcher folder: cd. Press Ctrl-C to stop the simulated swarm as we will now install Skybrush itself. These SITL instances are configured in a similar way as ordinary show drones would be, broadcasting heartbeat packets into the void until a ground station connects to them. If everything worked well, you should see 9 instances of the ArduCopter SITL starting up. Now you can launch a swarm from the virtualenv using poetry, and point it to the SITL executable we have just compiled to launch a small test swarm: $ poetry run ap-sitl-swarm -n 9. Luckily, the ap-swarm-launcher repository provides us with a pyproject.toml file that lists all the dependencies, so you can just run poetry install to install them as well as the launcher itself into a separated virtualenv: $ git clone Since we are still being nice and tidy, we install it in another Python virtualenv. The Skybrush repositories contain a helper tool written in Python, so let’s check it out. We will need to launch multiple simulated drones on the same machine, configured in a way that the drones are laid out in a grid, just like they are placed on the ground before the takeoff sequence of a drone show. Installing an ArduCopter SITL swarm launcher tool You can now deactivate the virtualenv and step out of the ardupilot folder: $ deactivate If everything went well, you should now have a working SITL executable in build/sitl/bin/arducopter: $ build/sitl/bin/arducopter ![]() $ pip install future empy intelhex pexpect ArduPilot does not contain a pyproject.toml file yet to specify the build-time dependencies, so we just do it manually: $ python3 -m venv. ![]() We will create a Python virtualenv for installing lxml, empy and all the other build-time Python dependencies to keep the system Python nice and tidy. We need to switch to the CMCopter-4.2 branch as the master branch simply tracks upstream: $ git checkout CMCopter-4.2 Check out the source code from Github first: $ git clone Next, we need to compile the software-in-the-loop simulator version of ArduCopter, using the Skybrush fork that adds support for drone light shows. Internally, Skybrush components use Poetry for managing their dependencies, so follow the installation instructions of Poetry before proceeding. To keep things nice and tidy, we will use Python virtualenvs for each project instead of messing up our system Python with the dependencies. We are going to work with multiple Python projects there will be the build-time dependencies of ArduCopter itself, then there will be a Python-based launcher for SITL swarms, and the server component of Skybrush that manages communication with the drones. We assume that all the necessary developer tools (compiler toolchain, Python, waf and so on) are installed on your machine if you can compile the stock ArduPilot firmware, chances are that you already have everything that you will need. The instructions below were tested on macOS Monterey, but most likely it works the same way in Linux as well. Of course if you have 20 or more real quadcopters with the required communication infrastructure, you can try the same thing in reality using the same set of software tools. During the course of this blog post, we will compile ArduCopter’s SITL simulator, then place 20 simulated quadcopters on the CMAC airfield, upload a drone light show (trajectories and light program) to them and launch a simulation. This writeup will demonstrate that it is now possible to run a drone light show based on open-source components only, using a modified version of ArduCopter as the flight controller and Skybrush as the ground control station.
0 Comments
Leave a Reply. |