Windows 11 : Setting Up Your Computer with Docker, WSL and VS Code

Downloads:

You need to download Docker Desktop for Windows here: https://www.docker.com/products/docker-desktop/

As well as VS Code from here: https://code.visualstudio.com/download

Setting Up WSL (Windows Subsystem For Linux):

Make sure you are running Windows 11 and have the latest updates.

Open a Command Prompt and enter the following commands:

wsl.exe --set-version Ubuntu 2
wsl.exe --update
wsl.exe --install

Clone The Workspace Repo

After the final wsl.exe is finished, it should drop you into a ubuntu shell. If not type ubuntu

Now we will clone the workspace repository with the following command:

git clone https://github.com/johnny555/4robots_ws.git

Next we will move into the new directory created by that command

cd 4robots_ws

And now we will start vs code from inside that folder. This will open vscode inside the repository we just cloned from the internet.

code .

Start Docker Desktop

Install and open docker desktop.

Go to the settings -> Resources -> WSL Integration

Make sure that "Enable Integration with Default WSL" is checked, and make sure to toggle on "Ubuntu".

Install the "Dev Containers" extension

Back in VS Code, install the Dev Containers extension. Either click the extension icon on the left, or use the keyboard shortcut Ctrl+Shift+X.

Search for the "Dev Containers" extension and install it.

Open Folder In Dev Container

In VS Code hit Ctrl+Shift+P and then search for/select

Dev Containers: Open Folder In Container...

To open the current folder in a dev container. Look for the green Dev Container text in the bottom left to know you have completed the step:

Start Gazebo

Use the command Ctl+Shift+P and then "Tasks: Run Task" and run the task named "Day 2" to start gazebo:

Congratulations! Your computer is setup and ready!