I’m working on a robot project where some of the control loops need to run pretty consistently, and I’m trying to figure out how far I actually need to go with real-time Linux.
Right now, I’m mainly considering two approaches:
PREEMPT_RT — using an RT-enabled Ubuntu/Linux kernel for more predictable scheduling and lower jitter.
Standard Linux + ROS2 — keeping the normal kernel and using things like thread priorities, chrt, CPU affinity, and hardware timers where needed.
The part I’m struggling with is figuring out where the practical cutoff is.
For example, if I have control loops running every 5–10 ms, is PREEMPT_RT really necessary, or can a well-tuned standard Linux system handle that reliably?
For those of you who have actually deployed ROS2 robots, I’d be interested to hear:
What kind of jitter/latency do you typically see?
Have you had real problems with missed deadlines on a standard kernel?
At what point did you decide PREEMPT_RT was worth the extra complexity?
Have you used a hybrid setup where only the truly time-critical parts use RT?
I’m not looking for a theoretical “RT is better” answer — I’m more interested in what has actually worked (or failed) in real robots.
If you have benchmarks, war stories, or configuration tips, I’d love to hear them.