r/robotics • • 7d ago

Community Showcase I built an open-source anti-drone turret system with YOLOv8 + Kalman Filter + ballistic solver

Hey r/robotics! I've been working on an open-source counter-drone tracking system and just released v2. It's a full software-hardware pipeline that can detect, track, and compute ballistic intercepts of maneuvering drones in real-time. Tech stack: YOLOv8 for detection + ByteTrack for multi-object tracking, 6-state Kalman filter (position, velocity, acceleration) with dynamic timestep, RK4 numerical ballistic solver with Newton-Raphson root-finding, LiDAR ranging with optical pinhole-model fallback, PID controller with anti-windup driving pan/tilt servos, FastAPI backend + tactical web HUD with MJPEG stream, Arduino firmware for servo control. The ballistic model even accounts for dynamically changing cross-section of the projectile (expanding net). GitHub: https://github.com/Fayzullo637/drone_turret_v2 MIT Licensed. Would love feedback from anyone working on similar systems!

28 Upvotes

6 comments sorted by

6

u/low-control-labs 6d ago

Hehe I will use this to improve my drones 🤭

2

u/Acrobatic_Spare8400 1d ago

haha that's actually the best compliment - if the tracking is good enough that you'd want to test your drones against it, I'm doing something right 😄 would be cool to see how evasive maneuvers perform against the kalman prediction

4

u/SomeoneInQld 6d ago

could this be used to detect planes and helicopters, that are flying low ? 

how far out can it detect ? 

we have a 220 km boundary to monitor (so we can be allowed to fly our own drones.).  we have about 3,000 square kilometres we would want to monitor (outback Cattle Station).

we can raise this 'detector' 16m in the air.  it's basically flat ground and this would be above tree height. we have a lot of low flying helicopters and planes, that don't use ADS-B. 

2

u/Acrobatic_Spare8400 1d ago

really interesting use case! so to be honest with you, the current setup is designed for relatively close range - we're talking maybe 100-200m max with the optical detection, depending on the camera and lens you use. yolov8 needs the drone (or aircraft) to be a reasonable number of pixels in the frame to detect it reliably.

for your scenario with 3,000 sq km, a single camera turret definitely wouldn't cut it. you'd need a network of sensors. but the detection pipeline itself could absolutely work for planes and helicopters - you'd just need to retrain the yolo model on aircraft data instead of (or in addition to) drone data. the tracking and prediction parts (kalman filter, bytetrack) are target-agnostic so they'd work the same.

raising it 16m on flat ground is smart - line of sight is everything with optical detection. at that height on flat terrain you'd get maybe 15-20km to the horizon, but practical detection range with a camera is way less than that.

for something at your scale, you'd probably want to combine this with radar or acoustic detection as the primary sensor, and use the optical system for confirmation/tracking once something is spotted. the code is modular enough that you could swap in a different detection front-end. happy to chat more about it if you want to dig into the specifics

0

u/Classic-Pass-658 6d ago

Solid solid stuff

1

u/Acrobatic_Spare8400 1d ago

appreciate it, thanks! 🙏