Is WSL Sufficient for Learning and Using ROS?

Hey everyone,

I’m currently diving into learning and working with ROS (Robot Operating System) for my robotics projects, and I’m considering using Windows Subsystem for Linux (WSL) as my primary development environment. From what I’ve read, WSL is a great option to run Linux tools directly on Windows without the need for dual-booting or setting up a VM, but I’m wondering if it’s fully sufficient for all aspects of ROS development.

Has anyone used WSL for ROS before? Specifically, I’m curious to know if it can handle all the required dependencies, the ROS graphical tools, and simulations like Gazebo or RViz, and whether there are any limitations that might come up. Also, is it good for working with robots like Baxter or other hardware interfaces that might require low-latency communication or more complex setups?

Any tips or experiences you can share would be really helpful!

Thanks in advance!

4 Likes

There are a lot opinions on this topic, my opinion is based on what I’ve seen working with new users.

You can certainly run most ROS tools on Windows but I would not recommend new users use Windows to learn ROS fundamentals. We recently updated some of the documentation to make this clearer. The reality of the world is that most robots running ROS do so using an embedded Linux system, usually Ubuntu.

5 Likes

I have worked with WSL for ROS applications and it’s pretty good for mainstream packages. I’d say it’s good for getting started and experimenting with basics of ROS, however if you want to do development of ROS based modules, it may not be an ideal situation. You’ll encounter unexpected issues that you won’t have solutions to and also working with hardware with WSL is not very practical (I wasn’t able to get hardware working with it, but others may have different experiences). So for a better development experience in the long run, I’ll suggest sticking with a native Ubuntu setup.

1 Like

@Adham_Abdelmaguid your timing on this question could not be better. The last two weeks of my life essentially spending 18hrs/day has been werestling with WSL2 and ROS while at the same time trying to learn ROS. WSL2 while very cool and convenient has just got in the way. The summery is, I now am setting up a decided ubuntu box just for ROS. Here is where I got to those conslusions.

  1. WSL is great for learning but I found some issues with the simulator and with Platform IO/Python.
  2. I needed to get MicroROS running via PlatformIO and WSL and PlatformIO have an extremely annoying issues that seems to have zero support at the moment except for hacks. see: Windows WSL: I can't open any files(projects) in the PIO open browser. · Issue #2316 · platformio/platformio-home · GitHub
  3. I reached the conclusion that if your going to use WSL, you better completely stay in the WSL environment and not switch back an fourth in your stack. With that being said, I am coming across issues just connecting to my devices to upload firmware (a Teensy in my case).

as @Katherine_Scott mentioned, its becoming abundantly clear that a native linux based environemnt is what is best for robotics / ROS / Embedded development.

As such , you can put ROS2 on a Raspberry PI/ Jetson or just on a PC. For me I have a Raspberry PI4 and I am setting up a dedicated PC as a “Master”. Im configuring this machine with a decent GPU (RTX2080) as it seems simulation and training is whats next in robotics .

In the end, why let these things get in the way of learning , its better to just be in the safest most reliable environment.

Just my 2 cents.

2 Likes

If you are only working on software, WSL works fine, usually, but there are known unresolved issues with GPU, such as this:

If you need access to hardware, WSL makes it very complicated for certain kinds of devices. You might spend weeks figuring out how to recompile the kernel to give access to a USB device that Ubuntu supports just by plugging it in.

Overall, if you can, I’d avoid WSL unless you can avoid GPU+Hardware.

1 Like

Hello,

I use WSL daily with ROS2, micro-ROS running in a Docker container on my Windows laptop. That includes GUI.

Here is my software setup described in a video https://youtu.be/IOQBNl0O_tI?list=PLOSXKDW70aR8uA1IFahSKVuk5ODDfjTZV

Here is ROS2, micro-ROS in action, running on my Windows laptop inside WSL2 Docker container

4 Likes

From the last one month, I have also tried WSL and Docker-Desktop on Windows 11 Home version. And what I found is this:

  • If you aim to use for simulation, then it is working fine. Gazebo 11 classic and Rviz is working fine. Observed some data loss for depth-camera visualization in Rviz.
  • Till now, I have not connected with any hardware, so can’t comment on it. I will update it later as I will progress on it. Maybe you have to know the work-arounds or hacks for this.
  • There is a good learning material available in youtube. Thanks to @joshnewans . Link is here: https://youtu.be/XcJzOYe3E6M?si=gJ5hu5z9qMKzVspr

Thanks.

1 Like

This looks awesome, so you are setting up a docker for the WSL environment, I thought a docker container can only work and install versions of the device’s innate OS.

You can run Linux on a Windows PC thanks to Microsoft WSL2 (Windows Subsystem for Linux).

Think of WSL2 as a lightweight virtual machine that runs an actual Linux kernel inside. That Linux kernel supports “containerization” necessary for Docker to work. So you can run all kinds of Linux distros side-by-side on your Windows PC.

There are two options running Linux distros - using Docker for Windows vs. using Linux distributions that come with WSL2. I always use the former (Docker for Windows).

As far as speed, I just tried running my setup on a VMware Workstation Player 17.x on my Windows PC (as opposed to running it on Docker for Windows). I do feel that VM GUI lags compared to my setup using Docker for Windows. So I’m sticking with my setup for now.