Autopilot "BEE", installed on the companion computer on the FPV Combat Drone, has the ability to locate and track targets autonomously. It can approach targets, prepare for an attack, execute the attack (releasing the bomb), and safely fallback to complete the mission — all without operator involvement. The system operates in automatic mode. It can also detect anti-drone systems and switch into KILL mode to neutralize threat.
OFF
- autopilot is inactive, awaiting operator input to switch to any of the modes. Only telemetry monitoring and logging are active.
READY
- in addition to the functionalities of the previous mode, the Anti-Drone system recognition is activated, with the option to switch to the KILL
mode.
KILL
- automatically activates when the Anti-Drone system detects a threat. Tasks align with the DESTROY
mode.
DESTROY
- locates and neutralizes a target. Autopilot activates the camera, scans for targets, captures them upon detection, and proceeds with destruction.
Simulator version is designed to develop and debug computer vision with target following and entire Autopilot work using Microsoft AirSim
, ArduCopter SITL
and Mission Planner
running on Linux.
For the development and debugging process, a robust computer is necessary due to the requirements for Microsoft AirSim
. During the Autopilot development I used an Ubuntu 23.10 - based computer
equipped with a 16-Core processor
and 16 GB RAM
.
Set up the environment:
Copy files from the folder env
to their destinations:
- File
gc.sh
to the folder~/Apps/MissionPlanner
- File
settings.json
to the folder~/Documents/AirSim
- File
run.py
to the folder~/Apps/AirSim
Run the environment:
cd ~/Apps/AirSim
python3 run.py
If all three programs have started successfully, you'll be able to see the copter in the AirSim Simulator
and control its motors arming/disarming using Mission Planner
. This indicates that the installation was successful, and you can proceed.
Before starting the Autopilot, ensure the copter is properly configured using Mission Planner
.
-
Navigate to the
Actions
tab and switch the copter toGuided
mode. -
In the
Actions
tab, ARM the motors. -
Perform a takeoff with an altitude of 4m.
-
In the
Servo\Relay
tab, setLow
forservo 5
. This indicates that the Autopilot is in theOFF
mode. -
In the
Servo\Relay
tab, setHigh
forservo 6
. This indicates that the bomb is armed and onboard.
Go to the AirSim game
and ensure that the copter is at an altitude of 4m. Press Ctrl+3
to show the front camera view (which Autopilot uses in the target following process).
- Install the required dependencies using
requirements.txt
.
pip install -r requirements.txt
- Run the Autopilot, using
python3 main.py
command.
python3 main.py
Afterward, monitor the Autopilot's activity in your Terminal
and logs. At its start, the autopilot is in OFF
mode, meaning it won't locate or follow the target. To activate this function, switch servo 5
to High
, indicating a transition to DESTROY
mode. Now, go to the AirSim game
and observe the Autopilot in action.
The primary objective of sharing this source code is to initiate discussions within the developer community in Ukraine about automated combat drones. This initiative aims to establish a strategic advantage on the battlefield by implementing automated flight systems equipped with computer vision on homeborn FPV drones to bolster support for the Ukrainian army.
If you are a developer or possess developer skills, feel free to utilize this code to develop your own Autopilots integrated with Computer Vision capabilities. For more detailed instructions, please refer to README_DEV.md. Share your creations with those involved in the production and supply of FPV drones for the Ukrainian military and #SupportUkraine in such way.
Be patient while setting up the environment and familiarizing yourself with each component. There are plenty of pitfalls that may demand your attention and time to resolve. This is normal. It took me a few weeks to set up and run the environment.
Text me on Twitter if you have any questions. https://twitter.com/dmytro_sazonov