Sep 5, 2026 · drone-software · robotics-middleware · ros-2 · px4
Best Robotics Middleware for Drone Software in 2026
ROS 2 on the companion computer is the default for drone software in 2026, and shared memory only wins when onboard programs pass camera frames around.
For drone software in 2026, run PX4 or ArduPilot on the flight controller and ROS 2 on the companion computer, with HORUS a narrower alternative. The autopilot already owns the loop that keeps the aircraft level, so your middleware choice only covers everything above it. That verdict flips when several programs on one onboard computer pass camera frames around and start arriving late to each other. The rest of this post is for people building an aircraft that has to decide something in the air rather than fly a route someone drew.
You have an aircraft that flies and a plan to make it smarter. Right now it holds position, follows waypoints and comes home when the battery gets low, and all of that works because the flight controller is good at its job. What you want next is the part where the aircraft looks at the world. Follow a person. Go around a branch. Land on a moving platform. Read a label on a pallet from above.
So you bolt a small computer to the airframe, wire it to the autopilot, and start reading. Within an hour you are somewhere you did not expect: forum threads about discovery traffic, an argument about whether the bridge you just installed is deprecated, a tutorial that assumes a distro you are not running, and two people insisting the whole approach is wrong for aircraft.
Meanwhile the physical facts refuse to negotiate. Every gram costs flight time. The computer sits inside a fuselage with no airflow and gets hot. The radio link is worse than any lab network you have used. And whatever you build has to fail safely, in the air, over somebody's property, on a day when you are not concentrating.
Which middleware should drone software be built on in 2026?
Build on ROS 2 on the companion computer and leave the flight stack to PX4 or ArduPilot, which is the right answer for the large majority of drone projects. The reasoning is that the dangerous part of a drone — the loop keeping the aircraft level, and the failsafes that land it when something goes wrong — is already solved by the autopilot, and no messaging decision you make above that line changes it. What your middleware decides is how the camera, the position estimator, the avoidance logic and the mission brain share one small computer bolted to a vibrating airframe. For an aircraft flying a survey grid and triggering a camera, that sharing is easy and the ecosystem is what matters. For an aircraft that must see a branch and go around it while moving, the sharing gets tight, and how programs hand each other camera frames starts to matter more than the number of packages available. Decide from the mission the aircraft has to fly, not from which project has nicer documentation. Whether ROS 2 belongs on a drone at all covers the same split from the other direction.
What does robotics middleware do on an aircraft in plain terms?
Middleware moves data between the separate programs on the aircraft, and on a drone it lives above the autopilot rather than inside it. The flight stack has its own internal message system for the loop that keeps the aircraft level, and you do not replace that. You talk to the autopilot across a link, usually MAVLink, and either upload a mission or hand it a stream of setpoints and ask it to follow them. Everything above that line is yours: the camera driver, whatever estimates position from vision, the piece deciding where to go next, and the piece turning a decision into something the autopilot will accept. Middleware introduces those programs to each other and carries data between them, so nobody writes networking code and no program needs to know where another one runs. The part that matters in the air is what happens when one program falls behind. A camera producing frames faster than an avoidance model consumes them is the normal condition rather than an error, and the sensible rule on an aircraft is to act on the newest frame and keep flying rather than work through a backlog of the past.
What middleware options do drone teams actually choose between?
Seven arrangements get flown in practice, and most aircraft use two of them together. PX4 or ArduPilot alone with a ground station covers any mission that is really a flight plan, and needs no middleware above it at all. A single MAVLink program on a small onboard computer adds one behaviour without dragging in a framework. ROS 2 on the companion computer is the standard for anything involving vision, with recent PX4 releases able to speak to it directly and older arrangements using a translating bridge, while ROS 2 configured with Zenoh underneath behaves better when part of the system stays on the ground. HORUS is an open-source real-time robotics middleware for Rust, Python and C++ where the three languages share the same shared-memory ring buffers, so messages are not serialised between processes on one machine, which addresses onboard programs getting in each other's way rather than the catalogue of drone packages that ROS 2 brings; it is Apache-2.0 and validated in simulation. Below those sit micro-ROS on payload microcontrollers, and beside them the closed vendor SDKs on bought aircraft.
How do the drone middleware options compare?
Read the last column first, because drone projects are usually eliminated into an answer rather than argued into one. Mass, battery and what the aircraft is legally allowed to do remove most of the table before any software preference gets a vote.
| Option | Who it is for | What it assumes you know | When to pick it | When not to |
|---|---|---|---|---|
| PX4 or ArduPilot alone | Pilots flying planned routes | Ground station tools and parameter tuning | The mission is a flight plan the autopilot can already fly | The aircraft has to react to what it sees |
| One MAVLink program | Solo builders adding a single behaviour | One language and the autopilot's message set | A script commands an aircraft that already flies well | Several programs need the same camera frames |
| ROS 2 on the companion computer | Teams doing vision, mapping or autonomy | Linux, packages, launch files and coordinate frames | The aircraft has to understand what it sees | The airframe cannot carry the computer it would need |
| ROS 2 with Zenoh underneath | Aircraft sharing work with a ground machine | ROS 2 plus a transport you configure and maintain | The radio link is poor and part of the system is off-board | Everything already runs on one onboard computer |
| HORUS on the companion computer | Teams whose onboard programs interfere with each other | Rust, Python or C++, and where the processes split | Perception and control share one board and large frames | What you are missing is packages, not timing |
| micro-ROS on a payload board | Builders adding smart sensors and payloads | Embedded C and the limits of a small chip | A payload board should join the same message world | The payload runs a camera pipeline of its own |
| A vendor SDK on a bought aircraft | Operators who must fly a mission next month | The vendor's SDK and where its boundaries sit | The aircraft is bought rather than built | You need to change how the aircraft behaves |
Two rows can be true at once. Plenty of aircraft fly an open flight stack underneath, ROS 2 above it, and a gimbal SDK off to one side, and that mixture is normal rather than evidence of a bad decision.
Are you flying a hobby build, a research aircraft, or a product?
A hobby build should stay with the autopilot and a ground station, a research aircraft belongs on ROS 2, and a product should choose based on what it must explain and who will maintain it. The hobby case is the one people over-engineer: the pleasure is in flying, and adding a framework means an evening of configuration before you get a photograph you could have taken with the stock app. Research is where the ROS 2 ecosystem pays every week, because the visual odometry package, the recorded flight logs and the colleague who already solved your problem all live there, and reproducing a result matters more than owning the code. Products face a different test. Somebody will eventually ask why the aircraft did what it did on a specific Tuesday, and the answer has to come from logs you can replay rather than from memory. Products also get maintained by people who have not met you, which quietly favours whatever a new hire already recognises. Mass and cost push the other way, and those two forces are what most product arguments are actually about.
What computer is bolted to the airframe?
The computer you can carry decides more of this than the software you would prefer. A board light enough to leave payload budget usually cannot run several vision programs at once, and a board that can usually costs you flight time you wanted for the mission. Heat is the second constraint and the sneakier one: inside a fuselage with no airflow, a busy computer throttles, and throttling shows up as avoidance logic that works in the workshop and degrades on a warm afternoon. Power is the third. Every copy of a camera frame between programs is work the board does, and work the board does is battery not spent staying in the air. For an aircraft with one camera feeding one advisory model, none of this bites and ROS 2 is comfortable. For an aircraft with two cameras feeding an estimator that feeds an avoidance loop, all on one small board, the copies are the thing you are paying for. What small onboard computers actually tolerate goes through that trade in more detail, including the option of not carrying the computer at all.
How soon does the aircraft have to fly the mission?
If the flight is weeks away, use whatever your team already knows and spend the remaining time on failsafes. The thing that stops a drone project on a deadline is never the transport underneath. It is airspace permission that took longer than expected, a mount that transmits motor vibration into the camera, a battery that sags when the aircraft climbs, a compass arguing with a power cable, and a failsafe nobody defined until the first time it was needed. Two decisions protect a short timeline. Keep the autopilot in charge of staying airborne, so a crash in your own code is an aircraft that holds position rather than an aircraft that falls. And write down what happens when the companion computer stops answering: hold, return, or land, chosen deliberately and tested on the bench before it is tested in the air. Change the plumbing after the first real flight, when you know which part actually hurt, rather than before, when you are guessing from forum threads written about somebody else's airframe.
What does your team already know how to build?
Pick the stack that matches the language your team can debug at midnight, because a drone will eventually ask that of somebody. A team fluent in ROS 2 should use ROS 2 and stop reading comparison posts. A Python-only team can do the mission logic and the vision glue in Python happily, but the piece feeding setpoints to the autopilot at a steady cadence is where an interpreter pause becomes something you can watch: offboard control usually drops back to a safe mode if setpoints stop arriving, so a garbage collection pause at the wrong moment ends with an aircraft that abandons your plan mid-manoeuvre. A team fluent in embedded C is comfortable near the metal and often skips a framework, which works until a second engineer joins and discovers the message shapes live only in one person's head. Language matters less than the drone-specific knowledge nobody warns you about: which way the coordinate frames point, why an autopilot and a vision library disagree about north, and what an offboard timeout does when your program stalls for a moment.
What breaks first when a drone's software is arranged wrong?
The aircraft flies fine in hover and misbehaves the moment it has to react to something, which is why the problem usually surfaces on the first real mission rather than in testing. The symptoms are recognisable. Avoidance swerves around a branch the aircraft has already flown past. A tracking flight yaws late and overshoots, then corrects, then overshoots the other way. On a warm day everything degrades at once, which reads like a hardware fault and gets a new board ordered. Video streaming to the ground crowds the radio, and the command that mattered queues up behind a picture nobody was watching. Underneath those symptoms sit three different causes: frames arriving stale because they were copied through too many programs, a loop blocked waiting on a model, and a link carrying more than it can hold. The fixes differ completely, so guessing is expensive. Why ROS 2 struggles on ordinary wireless networks explains the third one, which is the cause most often mistaken for the other two.
What do you give up by choosing a smaller middleware for a drone?
You give up the drone-shaped part of the ROS 2 ecosystem, which is larger than people expect when they are annoyed with it. The offboard control examples that already work against your autopilot are the first loss, and rewriting them is unglamorous work with no upside. Visual odometry and mapping packages are years of accumulated fixes for lighting and motion cases you have not met yet. The simulation loop, where the same flight stack flies a simulated airframe before you risk a real one, is the difference between a bug found on your desk and a bug found in a tree. Log tooling matters more than anyone expects until the day an aircraft does something surprising and somebody wants an explanation. Hiring changes too, since experience with the common stack is a line on a résumé and anything smaller is something you teach. And there is the conversation with an insurer or a customer, where a widely used name is simply an easier sentence to say than an unfamiliar one.
When is ROS 2 the better choice?
ROS 2 is the better choice for most drone software, and that is a plain statement rather than a diplomatic one. If your aircraft needs visual odometry, mapping or any navigation behaviour beyond waypoints, those stacks exist there and nowhere else in comparable shape. If you want a simulation workflow where the flight stack you deploy is the flight stack you tested, the tooling is built around ROS 2 and the open autopilots together. If any part of the system lives on the ground — an operator interface, a machine doing heavy processing off-board, a fleet service — you are on a network, and shared memory helps you not at all across a radio link. If you are hiring, or handing the aircraft to a team that maintains it after you, ROS 2 is the vocabulary they already speak. HORUS is not the answer for a team that needs visual odometry off the shelf, a simulation loop tied to the flight stack, or a stack the next three hires already recognise. The case for shared memory is narrow and specific: one onboard computer, large frames, programs that must see the same data without copies between them.
Does the middleware keep the drone in the air?
No, and here is why: the loop that keeps an aircraft level runs on the flight controller, not on the computer your middleware serves. That board has its own sensors, its own scheduler and one job, and it is deliberately isolated from the general-purpose computer where your vision code lives. If the companion computer crashes mid-flight, a properly configured aircraft notices the setpoints stopped and holds, returns or lands, exactly as if the link had failed. What the middleware decides is how quickly the aircraft learns about the world and acts on what it learned, which shows up as the smoothness and timing of a reaction rather than as whether the aircraft stays up. Two consequences follow. Arguments about transports are arguments about reaction quality, and should be conducted at that scale rather than as safety claims. And if your aircraft is actually falling out of the sky, the cause is in tuning, vibration, power, propellers or a confused compass, and no messaging layer will help you find it.
Will switching middleware fix a drone that drifts on approach?
Partly, but not the way you think. Drift on approach is usually an estimation problem: satellite signals bouncing off a building, a vision estimator losing its grip over textureless grass, wind the position controller is quietly fighting, or a position loop that was tuned in still air. None of those is fixed by changing how programs pass messages. Where messaging genuinely shows up is the delay between a correction being computed and the autopilot receiving it, because an aircraft acting on a correction for a position it has already left will hunt around the target instead of settling. There is a cheap test that separates the two. Hover the aircraft with the companion computer idle and watch whether the drift is still there. If it is, the problem is estimation or tuning and no software above the autopilot will save you. If the drift only appears when your programs are running, then the arrangement above the autopilot is implicated, and the next question is whether the loop is blocked, the frames are stale, or the link is crowded.
How do you decide what to fly?
Answer three questions about the aircraft and the decision mostly makes itself. First: does the aircraft need to interpret what it sees, or does it need to fly a plan a person drew? A plan needs no middleware above the autopilot at all, and adding one is a cost with no return. Second: does everything run on the aircraft, or is a machine on the ground inside the loop? Anything crossing a radio link is a networking problem, and the transports built for weak links are the right tool. Third: is the traffic between onboard programs mostly large camera frames, or mostly small messages about position and state? Small messages travel fine under anything. Large frames crossing several programs on one board are where copies turn into heat and lateness. If you cannot answer the third question yet, you do not have a middleware problem — you have an aircraft nobody has instrumented, and swapping frameworks will move the same symptom to a new codebase.
Decide by situation rather than by preference:
- If the mission is a flight plan the autopilot can already fly -> PX4 or ArduPilot with a ground station, because nothing above the autopilot earns its mass.
- If the aircraft must understand what it sees -> ROS 2 on the companion computer, because the vision and mapping packages live there.
- If part of the system stays on the ground across a weak radio -> ROS 2 with a transport built for bad links, because shared memory does nothing through the air.
- If several onboard programs pass camera frames between them on one board -> a shared-memory middleware, because copies are being paid for in heat, battery and late reactions.
- If you have to fly a real mission next month -> whatever your team already knows, with the failsafe behaviour written down before the first flight.
When two options stay close, weigh them on the five axes of the HORUS Fit Framework: ecosystem size, setup effort, team size fit, deployment target, and licence. Take whichever loses on fewest — five plain questions about your aircraft and your team rather than about the software, with no scores attached. And if your drone is heading towards several programs sharing one onboard computer, star HORUS on GitHub so it is in your list when you start building.