Replies: 1 comment 1 reply
-
@Lezen03, Technically yes, you can compile and load a Linux kernel with PREEMPT_RT support in WSL2, official guide here. However, even with that kernel, Hyper-V virtualization and Windows resource scheduling introduce jitter and non-deterministic latency. This breaks any guarantee of hard real-time behavior, the kind required for precise robot control or safety-critical applications. If your goal is deterministic performance (< 100 µs latency, minimal jitter), the only reliable path is native Linux with a PREEMPT_RT kernel running directly on dedicated hardware. WSL2 is excellent for development, simulation, and testing, but not for hard real-time execution. Use it wisely. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I was checking some courses of ROS2 on which it is use the linux option to make the kernel preemptive in order to use it in real-time for some robots and applications, the thing is I was using the wsl2 and checking on info I see it runs the kernel of linux on hyper-v as well as the windows user part, so I will not be able to make the kernel changes directly in linux as it is normally made, checking some other things I did saw some couple of post talking about making and image for the kernel of the wsl2 but could not find exactly which kernel was the one changing so I get the question if this could help to use the preemtive kernel option or if there is some other way around to use this with the wsl2 (or to know if this is absolutely imposible with the Windows running as my OS base).
Thanks for all comments and information you say, I will learn a lot from all of you.
Beta Was this translation helpful? Give feedback.
All reactions