-
Notifications
You must be signed in to change notification settings - Fork 161
2. Developing with WSL
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.
Install WSL on your system via MicrosoftStore.
Now, open Turn Windows features on or off:
- check Windows Subsystem for Linux
Open PowerShell and paste the following command:
wsl --set-default-version 2To check:
wsl -l -vThe correct output should be:
NAME STATE VERSION
* Ubuntu-20.04 Stopped 23. 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.
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 ~/.bashrcOR
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).
If seg faults,
cd
roscoreand open another bash
export LIBGL_ALWAYS_INDIRECT=0Try rviz again.