ROS is initially designed for Linux system and heavily uses bash commands. Previously, the closest thing of this on Windows in PowerShell, but now, you can install Windows Subsystem Linux (WSL), with Ubuntu distribution and then install Robostack similarly to how you will install it on a native Linux device. Refer to Install Linux on Windows with WSL for more information.
Your Windows device must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 to continue with this instruction. If you are on an earlier version, please refer to the manual install page for more information on how to get WSL running on your device.
Open a terminal from your Windows device by pressing Windows + R
, then type in cmd
to run the Windows Command Prompt and enter.
In the Windows Command Prompt, enter wsl --list --online
to see a list of Linux distributions that you can install.
Enter the wsl --install
command with flag -d
to choose your distribution. We will be using Ubuntu 20.04 LTS.
wsl --install -d Ubuntu-20.04
Once Ubuntu is installed, a screen will pop up and ask you for your UNIX username and password. Enter a username and password for this Ubuntu distribution.
Your Ubuntu is now installed. You can close the Windows Command Prompt now.
Open a new Windows Command Prompt (Windows + R
, then type in cmd
). List your installed Linux distributions and check the version of WSL each is set to by entering the command wsl -l -v
.
If your VERSION
of Ubuntu is 2 instead of 1, you can skip the next step.
We will be using WSL2 as it provides better support for GUI applications and runs generally faster than WSL1. If your Windows version met the prerequisite, and that you are installing your Linux distribution with wsl --install
command, then WSL2 is used by default. Move to the next step if you are already using version 2 of WSL.
If you see that your installed Linux distribution is running WSL1, run the following command to update from WSL1 to WSL2 for that distribution:
wsl --set-version <distro name> 2
Example wsl --set-version Ubuntu-20.04 2
will set your Ubuntu 20.04 distribution to use WSL2.
In your Windows Command Prompt, enter either wsl
or bash
, your Ubuntu CLI will be launched.
Let us first clone a local repo in your WSL under your favorite directory
cd <some directory. eg: ~>
git clone --recurse-submodules <URL of your forked repo>
Navigate to Host_Setup/RoboStack
then run:
cd <Path of your repo>/Host_Setup/RoboStack
chmod +x ros_conda_install_unix.sh
./ros_conda_install_unix.sh
Open a new terminal, and run activate your ROS environment by conda activate ros_base
.
Then run roscore
to start the ROS master. If everything works, you will seee
Check it out here!
You can think of Ubuntu WSL2 is a native Linux distribution running on top of your Windows OS. Meaning that, you can run basically everything that will run on a Linux device, including vscode directly inside WSL. Your vscode windows will show something like this at the bottom left corner indicating that the vscode server is hosted within WSL.