ROS Environment Setup for Windows without VirtualBox

Shifatul Islam (Sif)
DX Innovation at Fresno State
3 min readJun 12, 2019
Gazebo Simulator running on Windows

Install Windows Subsystem for Linux (WSL)

The following steps will let you install Bash (Ubuntu) on windows without dual booting or using a virtual box.

First enable Windows-Subsystem in PowerShell (use Administrator)

Use the following command in

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

After running the above command, your computer will restart.

Then install Ubuntu 16/18 LTS from MS Store

Microsoft Store

After done installing, launch it and you will see a CMD with full Ubuntu support. Typing lsb_release -a will print out your installed Ubuntu version information.

thunder@TSINNOVATE-06:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

Install ROS (Robot Operating System)

Depending on the version of Ubuntu you installed, follow the appropriate guide from the links below-

Ubuntu 16http://wiki.ros.org/kinetic/Installation/Ubuntu

Ubuntu 18http://wiki.ros.org/melodic/Installation/Ubuntu

Now, try it out by typing in roscore in the CMD window. You will see something like the screenshot below.

CMD (Ubuntu WSL)

Install VcXsrv

This is where all the magic happens. In order to run any GUI apps (like the Gazebo simulator) we will need a Windows X-server. VcXsrv will provide the host machine with all the necessary support needed to run GUI apps directly from Ubuntu WSL.

Download VcXsrvhttps://sourceforge.net/projects/vcxsrv/

Run VcXsrv from start menu, it should appear as XLaunch. Go through the setup process with everything on default settings except for Native opengl. Uncheck that one.

VcXsrv

Note: Make sure you start VcXsrv every time you restart your computer and want to run GUI apps from Ubuntu WSL.

Finally Configure Ubuntu WSL to use VcXsrv for displaying GUI apps. Just type in the following commands into the CMD. You only have to do it once.

echo "export DISPLAY=:0" >> ~/.bashrc
source ~/.bashrc

Voila, Done! Run rqt_graph command and see a Linux GUI app on your windows machine 😀.

If you want to run the above Gazebo Simulator (from Husarion ROSbot 2.0), just follow instructions on this GitHub page and run the following command.

roslaunch rosbot_description rosbot.launch

Thank you. Have fun 😊.

--

--

Shifatul Islam (Sif)
DX Innovation at Fresno State

Lead Intern Developer at Technology Services, California State University, Fresno