Sep 5, 2026 · ros2 · middleware · beginners · linux
Is ROS 2 an Operating System? Clearing Up the Name
No. ROS 2 is middleware plus tools that run on top of a real operating system, normally Ubuntu Linux, and the name is a historical description of the job.
No, ROS 2 is not an operating system: ROS 2 is middleware and a toolset that runs on top of Linux, usually Ubuntu. The name is historical, since ROS supplies services an operating system would give a robot, such as message passing, drivers and packaging, without owning the machine. The answer only bends on microcontrollers, where the small variant of ROS 2 lives inside a real-time operating system rather than above one. This post is for beginners who want to know what to install, what sits where on a robot, and where ROS 2 and HORUS fit in that stack.
The confusion is reasonable, and nearly everyone arrives at it in the same order. You read that ROS stands for Robot Operating System. Then the install page tells you to install Ubuntu first, which is definitely an operating system, and now you have two of them and no idea which one is in charge. Then someone in a thread says it is "just middleware", someone else says "a framework", a third person says "a set of libraries and tools", and none of them tells you what the robot actually boots into.
Underneath the naming question there is always a practical one. You want to know what to install and in what order. You want to know whether it will run on the board you already own, or on your laptop, or on the little microcontroller in your drawer. And you want to know whether choosing ROS 2 hands away control of the things an operating system decides: which program runs next, what happens when two of them want the processor at the same instant, whether a motor update can be interrupted by something as unimportant as writing a log line to disk.
Is ROS 2 an operating system?
No. ROS 2 is a middleware layer plus a large collection of tools and packages, and it requires a real operating system beneath it, in practice a Linux distribution and most often Ubuntu. When you power up a robot, the thing that boots is Linux. Linux owns the memory, the processes, the drivers for your USB devices and the decision about which program gets the processor next. ROS 2 is a set of programs that Linux runs, plus libraries your own programs link against, plus command-line tools you use to inspect what is happening. The name comes from the original project's ambition: to give robotics the shared services that an operating system gives an application developer, so that every lab would stop writing its own message bus and its own driver layer. Judged as a description of that job, the name is fair. Judged literally it is wrong, and the literal reading is the one that causes trouble, because it makes people expect guarantees about timing that only the actual operating system can give.
What does the word middleware mean for a robot?
Middleware is the layer that lets separate programs on a robot talk to each other without knowing where each other are. Your camera driver, your obstacle detector, your motion planner and your motor interface are usually four separate programs. Middleware gives them a shared vocabulary of named channels, agreed message shapes and a common clock, so the obstacle detector can announce that something solid is ahead without knowing whether the camera driver sits on the same board or the next one. Around that core, a robotics middleware bundles the things every robot needs anyway: a way to describe the physical layout of the machine so a sensor reading becomes a position on the chassis, a launcher that starts twenty programs in the right order, recording and replay so you can debug yesterday's crash, and somewhere sensible to keep configuration. That bundle is what people mean when they say framework. The operating system underneath knows nothing about any of it and would happily run a completely different design instead.
What can go in the slot ROS 2 occupies on a robot?
Four things commonly fill that slot, and the operating system underneath does not care which one you choose. ROS 2 is the default: the broadest package ecosystem, the most tutorials, and the safest bet if you want other people's code to work on your machine. A vendor stack is the alternative when you bought a robot rather than built one, since the maker's own libraries are usually excellent on that machine and useless off it. On microcontrollers, micro-ROS or plain firmware fills the slot, because a bare board has no processes to connect in the first place. And there are focused real-time middlewares such as HORUS, an open-source Apache-2.0 project where Rust, Python and C++ nodes share the same shared-memory ring buffers, so a message handed between two processes on one machine is not serialised on the way, which is a much narrower job than the one ROS 2 does. You can also run no middleware at all and keep everything in a single program, which is the right call more often than beginners expect.
How do these options compare side by side?
The table compares the things that can fill the middleware slot, not the operating systems underneath them. Read the last two columns first, since most people choose correctly by eliminating the failure they cannot live with.
| Option | Who it is for | What it assumes you know | When to pick it | When not to |
|---|---|---|---|---|
| ROS 2 on standard Ubuntu | Most robots with a Linux computer | Basic Linux and Python | The default for a new build | Bare microcontrollers |
| ROS 2 on a real-time kernel | Teams with deadlines and Linux skills | Kernel setup and thread priorities | Machines that damage things when late | A first robot on a hobby board |
| A vendor stack | Owners of a bought robot | The maker's own tools | Demos on that one machine | Anything you must port later |
| micro-ROS | Firmware on small boards | Embedded C and memory limits | Sensor and motor boards | The robot's main computer |
| HORUS | Mixed-language teams with tight loops | Rust, Python or C++ on Linux | Loops where copying between processes hurts | Projects needing a big package catalogue |
| No middleware, one program | Simple single-purpose machines | One language and a loop | Line followers, simple sensors | The moment a second program appears |
Every row still needs an operating system under it, apart from the firmware rows, where your program is the only thing running.
What do you need to install if you are a hobbyist starting on a laptop?
Three things, in this order: Ubuntu, then ROS 2, then a simulator. Install the Ubuntu version that your chosen ROS 2 release names as its target, either directly on a spare machine, in a virtual machine, or in a container if you already know what a container is. Then install ROS 2 from the official binary packages rather than building from source, because building from source on your first day turns a half-hour job into a weekend. Then add the simulator the tutorials use, so you have a robot to command before you own one. If your laptop runs Windows or macOS and you would rather not repartition anything, a virtual machine is completely adequate for learning, and you can move to a dedicated Linux machine later when real hardware arrives. What you should not do is install a newer Ubuntu than the release expects, because that single mismatch causes more abandoned first attempts than any concept in robotics does. For which release to learn in the first place, see ROS 1 or ROS 2 as a starting point.
Which operating system should you put underneath ROS 2?
The Ubuntu release that your ROS 2 version names as its target, and nothing more adventurous than that until you have a reason. Each ROS 2 release is built and tested against one Ubuntu version, and so are most third-party drivers, so matching the pair means the packages you install actually work together. On a small single-board computer, use the board maker's Ubuntu image if there is one, because the vendor image contains the drivers for the board's own hardware and a generic image often does not. If your robot must respond within a hard time limit, there is a further choice underneath: a kernel built for real-time behaviour, which changes how the scheduler treats your most important program. That is a decision for later, and one you should make with a specific failure in front of you rather than in advance. On a microcontroller there is no Linux at all. Either your firmware is the only thing running, or a small real-time operating system schedules a handful of tasks, and ROS 2 proper does not enter the picture.
What can you realistically get running in a weekend?
An install, a simulated robot, and one node you wrote yourself. That is a genuinely full weekend for a beginner, and it is the right target. Saturday morning goes on Ubuntu and ROS 2, and it will be less smooth than the install page implies. Saturday afternoon is the introductory tutorial where two toy programs talk to each other, which is where the mental model of channels and messages arrives. Sunday is a simulated mobile robot that you drive with keyboard commands, then a small program of your own that reads the distance sensor and stops before the wall. If you get that far, you understand more than most people who have read about ROS 2 for a month. What will not fit in a weekend is mapping, navigation tuning, or getting a physical robot moving, because hardware brings power, wiring and driver problems that have nothing to do with the framework and take their own weekend to survive.
Do you need Linux skills before ROS 2 makes sense?
Some, and less than you fear. You need to be comfortable opening a terminal, moving between directories, installing packages and reading an error message without panicking. You do not need to understand kernels, permissions in depth, or how to write shell scripts. The one Linux idea worth learning early is environment setup, because ROS 2 works by adding things to your shell's environment, and the classic beginner failure is a terminal where the tools are simply not visible because that step was skipped. If you learn one habit, make it this: when something is not found, check which environment your terminal is in before you reinstall anything. Everything else you can pick up as it bites you. Plenty of people learn Linux and ROS 2 together, and the combination is normal rather than reckless, as long as you accept that some evenings will be spent on the operating system rather than on the robot.
What breaks when you treat ROS 2 as the operating system?
Your assumptions about timing break first, and they break quietly. If you believe ROS 2 owns the machine, you expect that marking a node as important makes it run when you asked. It does not, because the operating system underneath decides that, and it is also running your logger, your network stack and whatever else is on the machine. The result is a robot that behaves perfectly in a demo and hesitates once an hour in the field. The second thing that breaks is your model of failure. When a message does not arrive, beginners look inside their own code, when the cause is often a mismatched delivery setting, a device the operating system never enumerated, or a full disk. The third is portability. People assume that anything ROS 2 runs on will behave alike, then discover that the same code on a smaller board behaves differently because the machine underneath is different. The names of the layers matter for exactly this reason.
What do you give up by running ROS 2 on top of general-purpose Linux?
You give up control of the exact moments that matter most. A general-purpose operating system is built to be fair and responsive across everything running on it, not to guarantee that one particular program gets the processor at the instant a motor needs an update. Most of the time you never notice. Then you build a machine with real momentum, and the difference between a command arriving in this cycle and the next one becomes the difference between an arm stopping at the edge of the table and an arm pushing a mug off it. You also inherit the cost of moving messages between processes: each one is packed, copied and unpacked, which is fine when a robot is gentle and becomes the thing you fight when the loop tightens. That is precisely the wall people hit when fusing an IMU with odometry in a tight loop. None of this argues against ROS 2. It argues for knowing which layer owns which promise before you need the answer urgently.
When is ROS 2 the better choice?
ROS 2 is the better choice for nearly everyone reading a post about what the name means, and saying anything else would be dishonest. If you want a package for mapping, a driver for the sensor you just bought, a simulator with real robot models in it, and a search result for your exact error message, that is ROS 2, and no alternative comes close on any of those. It is also the better choice for teaching, for teams whose members change every year, and for any project where the robot itself is the point and the plumbing is not. HORUS is not the answer for that reader: it is middleware for passing messages between processes on one machine without serialising them, not a package catalogue, not a simulator, not an operating system, and not a full replacement for what ROS 2 provides. Reach for a specialised layer when a specific, repeatable timing failure is in front of you, and use the ecosystem everyone else uses until that day arrives. To see the difference in style at the code level, look at a small Python node next to its ROS 2 equivalent.
Is ROS 2 really just a library you import?
No, and here is why: a library is something your program calls, whereas ROS 2 is a set of running programs, a build system, a launch system and a command-line toolbox that surrounds your code. Yes, there is a library part, and your node does import it to publish and subscribe. But the moment you have two nodes, you are also using the discovery mechanism that lets them find each other, the build tool that assembles your workspace, the launch files that start everything in order, and the inspection tools you use to ask what is actually being published. None of that is a function call. This is why installing ROS 2 changes your shell environment and why people talk about a workspace rather than a project. Thinking of ROS 2 as a library sets you up to be confused when your program compiles perfectly and still does nothing, because the missing piece is usually outside your source file entirely.
Does installing a real-time kernel make ROS 2 real-time?
Partly, but not the way you think. A real-time kernel changes the operating system's scheduling behaviour so that a program marked as urgent is interrupted less by everything else, and on a machine with hard deadlines that is a real improvement worth making. What it does not do is change what happens above the kernel. Messages between processes are still packed, copied and unpacked, memory is still allocated at moments you did not choose, and a single badly written node can still hold up everything waiting on it. So a real-time kernel narrows the worst case without removing its causes. The practical order is: first find out whether your timing failure comes from the operating system, from the message path, or from your own code, because the fix is different for each. Installing a real-time kernel because a forum recommended it, without knowing which of the three you have, generally produces a more complicated machine with the same symptom.
How do you decide what to install on your robot?
Work from the bottom up, and the decision resolves in three steps. First, decide what the machine is: a computer that can run Linux, or a microcontroller that cannot. That single answer eliminates half the options, because everything with a package ecosystem needs an operating system underneath and a bare board has none. Second, install the operating system your framework expects rather than the newest one available, since matching versions removes the most common class of beginner failure entirely. Third, choose the middleware by what you need from other people: if you need their drivers, their navigation and their answers, take ROS 2; if you are building one focused machine and the loop is what you care about, a narrower layer may suit better. Then stop deciding and start building, because the fourth step, the one that actually teaches you the difference between these layers, is watching a real robot behave in a way your model did not predict.
The short version, by situation:
- If you are a beginner with a laptop -> Ubuntu, then ROS 2, then a simulator, because that order removes most first-week failures.
- If your computer is a microcontroller -> firmware or micro-ROS, because a graph of separate programs needs an operating system to run in.
- If you bought a finished robot -> the vendor stack first, because the maker's drivers are the part you cannot easily rewrite.
- If a late message would let the machine break something -> look below the middleware as well, because the operating system owns the ordering.
- If you want other people's packages -> ROS 2 on the Ubuntu version it names, because matching versions is most of the battle.
When you compare two layers, the HORUS Fit Framework keeps the comparison honest by asking five questions with no numbers in them: ecosystem size, setup effort, team size fit, deployment target, and licence. ROS 2 wins ecosystem size outright, and for a first robot that axis decides the whole thing. Deployment target and licence are where the answer changes later, once your machine has momentum and your loop has stopped forgiving you.
If deployment target is where you expect to land eventually, keep HORUS on the shelf beside your ROS 2 install and star it so it is in your list when you start building.