Skip to content

Autopilot "BEE" with target following for FPV Combat Drone (Simulator version)

License

Notifications You must be signed in to change notification settings

under0tech/autopilot_bee_sim

Repository files navigation

Autopilot with Target Following for FPV Combat Drone (Simulator version)

Autopilot "BEE"

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.

MODES:

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

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.

Environment

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:

  1. Microsoft AirSim
  2. ArduCopter SITL
  3. Mission Planner

Copy files from the folder env to their destinations:

  1. File gc.sh to the folder ~/Apps/MissionPlanner
  2. File settings.json to the folder ~/Documents/AirSim
  3. 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.

Be ready for Autopilot run

Before starting the Autopilot, ensure the copter is properly configured using Mission Planner.

  1. Navigate to the Actions tab and switch the copter to Guided mode.

    image

  2. In the Actions tab, ARM the motors.

    image

  3. Perform a takeoff with an altitude of 4m.

    image

  4. In the Servo\Relay tab, set Low for servo 5. This indicates that the Autopilot is in the OFF mode.

  5. In the Servo\Relay tab, set High for servo 6. This indicates that the bomb is armed and onboard.

    image

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).

image

How to Use

  1. Install the required dependencies using requirements.txt.
pip install -r requirements.txt
  1. 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.

image

Customize this Autopilot

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.

Troubleshooting

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.

Get in touch

Text me on Twitter if you have any questions. https://twitter.com/dmytro_sazonov

About

Autopilot "BEE" with target following for FPV Combat Drone (Simulator version)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages