The most important step in selecting a real-time operating system for a robot happens before you download a single kernel: you classify every software task in your system by what happens when it misses a deadline. Motor torque loops and safety e-stops are hard real-time, where a missed deadline means system failure or physical danger. Sensor fusion is firm real-time, where a late result is useless but survivable. Path planning, perception, and ROS 2 topic publishing are soft real-time, where lateness degrades performance but does not stop the machine. Once you know which categories your tasks fall into, the RTOS decision reduces to matching proven performance in scheduling, interrupt latency, context-switching latency, and jitter against those requirements. This article lays out that classification framework and the evaluation criteria, not a recommendation of one "best" RTOS.
Classifying Robotics Tasks and RTOS Requirements
The central distinction in real-time systems is not speed but consequence. An RTOS that can usually or generally meet a deadline is a soft real-time OS; if it can meet a deadline deterministically, it is a hard real-time OS. A robotics guide by Darsh Menon, a robotics software engineer, captures the practical dividing lines in a table that maps deadline-miss consequences to typical robot workloads, and it makes an uncomfortable point for teams planning to run everything on a commodity kernel: a standard Linux kernel is soft real-time at best.
That is why the classification exercise matters more than any feature list. A robot is not one real-time system; it is several systems with different tolerance for lateness running on shared hardware. A missed motor torque loop deadline can mean physical danger; a late path plan usually just means a suboptimal route. Treating both with the same scheduling policy either wastes engineering effort over-provisioning the soft tasks or, worse, lets a hard task share a queue with nondeterministic work.
The matrix below applies that classification to common robotics tasks and maps each to the RTOS characteristic that matters most for it. The classifications follow the standard three-way split, though specific systems may vary depending on design and applicable safety standards.
| Robotics task | Real-time category | Deadline miss consequence | Key RTOS requirement |
|---|---|---|---|
| Motor torque loops, safety e-stops, surgical robot actuation | Hard real-time | System failure, physically dangerous; zero tolerance for misses | Minimal jitter and preemptive scheduling so the highest-priority control task always runs on time |
| Safety e-stop response to hardware events | Hard real-time | Failure to stop in time is a safety hazard | Low, deterministic interrupt latency so urgent hardware signals are serviced immediately |
| Sensor fusion, encoder reading, servo PWM generation | Firm real-time | Result is useless but system survives; occasional misses acceptable | Predictable scheduling and efficient context switching to keep timing consistent when it matters |
| Path planning | Firm or soft real-time | Degraded performance, suboptimal routes; not immediate failure | Fair scheduling so planner progress continues without starving hard tasks |
| Perception, ROS 2 topic publishing | Soft real-time | Degraded output or stale messages; system remains operational | Throughput and stability under load rather than strict determinism |
The table's analytical value comes from the mapping, not the sorting. Recognizing that a motor control loop sits in the hard row tells you immediately which kernel metrics to scrutinize, while recognizing that perception sits in the soft row tells you it can tolerate a scheduler optimized for something else. The rows also explain why a single robot often combines approaches: hard control loops on a microcontroller RTOS, with soft perception and planning running elsewhere.
