Skip to content

2. Developing with WSL

ologandavid edited this page Sep 26, 2025 · 1 revision

WSL Setup

ROS 1 distributions of Quad-SDK can also be installed in WSL (Windows Subsystem for Linux) to support development on Windows machines. ROS 2, on the other hand, provides native Windows support. However, we recommend using Docker for ROS 2 development to ensure a consistent, reproducible environment across systems. Installation instructions for Quad-SDK ROS1 and WSL are provided below.

1. Install WSL

Install WSL on your system via MicrosoftStore.

Now, open Turn Windows features on or off:

  • check Windows Subsystem for Linux

2. Set WSL 2 as your default version

Open PowerShell and paste the following command:

wsl --set-default-version 2

To check:

wsl -l -v

The correct output should be:

 NAME            STATE           VERSION
* Ubuntu-20.04    Stopped         2

3. Follow through with the rest of setup repo

Continue with step 2 of setup repo to install ROS Noetic and the necessary dependencies provided through the setup.sh script.

4. Setting up ROS for Graphical Output (GUI)

Install an X Server on Windows to run simulations properly, VcXsrv (recommended).

Then, configure WSL to use it. To do so, modify .bashrc as follows:

export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
source ~/.bashrc

OR

Simply add export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 inside .bashrc file.

Finally, launch VcXsrv from the start menu. Change settings:

  • Check Multiple Windows option
  • Make sure Display Number is set from -1 to 0.
  • Uncheck Native opengl. Otherwise, applications such as rviz do not run as expected.
  • Check Disable access control. Otherwise, applications within WSL cannot access the x server.

Note: These settings might look different depending on when in the future you have downloaded VcXsrv.

Warning: Everytime you re-start your PC, you need to check and un-check the options again (mentioned above).

5. Test installation by launching simulation.

If seg faults,

cd 
roscore

and open another bash

export LIBGL_ALWAYS_INDIRECT=0

Try rviz again.

Clone this wiki locally