Project finished · Drones and artificial intelligence
StratoPilot
We designed the software for a drone that sees, orients itself and chooses its own route.
- of software: deciding, orienting, flying
- 3 levels
- the model for recognising fires
- YOLOv8
- to find the shortest route
- PRM and A*
- to connect the modules
- ROS 2
For people who come from computer science, aerospace engineering
Three levels
StratoPilot wanted a drone able to carry out three kinds of mission by itself, from the simplest to the hardest: monitoring and mapping the environment, carrying medicines or goods, helping with rescues. The software is split into three levels, each followed by at least one master's degree student.
- 01
High level
Decides what to do and looks: vision recognises fires, a state machine chooses the next move.
- 02
Mid level
Builds the map, works out where the drone is and calculates the trajectory.
- 03
Low level
Turns the trajectory into motor currents.
Seeing fires
For vision we chose YOLOv8, a model from Ultralytics that finds and boxes objects in an image, already trained on 80 categories of common objects. We trained it again on satellite images of fires, in colour and infrared.
Training ran on a personal computer: 5 epochs in one night. The confidence of the answers stood between 30 and 40%. Confidence, though, is not a measure of accuracy: it says how sure the model is, not how often it is right, and we did not measure the accuracy numbers.
The map and the route
To know where it is and what the terrain looks like, the drone uses a LiDAR and the DFLIOM algorithm, which builds the map as a point cloud. A neural network picks out only the points useful for aligning one scan with the next, about one in five.
On the map the route is searched for in two stages. The Probabilistic Roadmap scatters free points at random and connects each one to the neighbours it can reach, creating a graph of possible paths. Then A* finds the shortest route on that graph.
open = {partenza}
g(start) = 0
while open is not empty:
n = the node in open with the smallest f(n) = g(n) + h(n)
if n is the goal: rebuild the route and stop
remove n from open
for each neighbour m of n:
cost = g(n) + distance(n, m)
if cost < g(m): g(m) = cost, remember that m comes from n, put m in open
The autopilot
At first we thought we would write the autopilot from scratch too. After talking to some professors we changed our minds: it would have been a huge, useless job, because mature open source autopilots already exist. We compared the two most used, PX4 and ArduPilot.
To make vision, map, planning and autopilot talk to each other, we chose ROS 2, the most widespread system for connecting a robot's modules.
| PX4 | open source | hosted by Dronecode, part of the Linux Foundation |
|---|---|---|
| ArduPilot | open source, GPLv3 | since 2009, on more than a million vehicles |
The outcome
In the summer of 2025 the modules of the basic scheme were ready: vision, map and localisation, route planning. Left out were the decision state machine and coordination with other drones.
The next step was to connect everything with ROS 2 and start simulation tests, which however needed a computer much more powerful than the ones we had; we looked into renting computing power in the cloud. The project ended there.
How it went
- 10 March 2025We presented the project at Palazzo della Borsa.
- March 2025An internal machine learning course: learning theory and neural networks in PyTorch.
- Summer 2025The vision, map and route modules were ready. Still missing were the integration with ROS 2 and the tests, which needed a more powerful computer.
Videos
People on the project
Who we do it with
Sources
- StratoPilot project report, 2025.
- Ultralytics, YOLOv8 documentation.
- Dong and colleagues, LiDAR Inertial Odometry And Mapping Using Learned Registration-Relevant Features, arXiv:2410.02961, 2024.
- Kavraki, Švestka, Latombe and Overmars, Probabilistic roadmaps, IEEE Transactions on Robotics and Automation, 1996.
- Hart, Nilsson and Raphael, A Formal Basis for the Heuristic Determination of Minimum Cost Paths, 1968.
- px4.io; ardupilot.org.
The project is finished
What we learned carries on in the projects under way.
