Step-by-step Workflow to Install Docker and ROS on Windows PC
KT

Kshitij Tiwari

Created Feb 17, 2023

Step-by-step Workflow to Install Docker and ROS on Windows PC

83
    g

Google

7 Steps
1

Go to www.google.com

2

Type "docker install windows"

3

Click on Install Docker Desktop on Windows

Click on Install Docker Desktop on Windows
4

Click on Docker Desktop for Windows

Click on Docker Desktop for Windows
5

Download and Install Docker for Windows

After installation, there is a Mandatory Restart required to finish installation.

Download and Install Docker for Windows
6

Type "download xlaunch "

Type "download xlaunch "
7

Click on VcXsrv Windows X Server download | SourceForge.net

Click on VcXsrv Windows X Server download | SourceForge.net
    d

Docker

2 Steps
8

Click on Download

Click on Download
9

Download and Install to be able to GUIs inside Docker

Download and Install to be able to GUIs inside Docker
    g

Google

2 Steps
10

Open Terminal to check if Docker is installed

Hit the Windows Icon > CMD > Docker

This will show you a bunch of available Docker commands which is a sign that you have successfully installed Docker.

Open Terminal to check if Docker is installed
11

Hit Windows > Docker Desktop to launch

You might get the access denied error. If so, fix it using the next step otherwise skip to the Launch step.

Hit Windows > Docker Desktop to launch
    s

Sourceforge

5 Steps
12

Add yourself to the Docker User group using the command shown below

Be sure to run the Command Prompt as Admin

Add yourself to the Docker User group using the command shown below
13

Update WSL Kernel, if prompted

Update WSL Kernel, if prompted
14

Verify that the Windows Subsystem for Linux is installed

Verify that the Windows Subsystem for Linux is installed
15

Launch Docker Desktop

Launch Docker Desktop
16

Click on Google Search

Click on Google Search
    s

Stackoverflow

5 Steps
17

Click on osrf/ros - Docker Image

Click on osrf/ros - Docker Image
18

Click on docker pull osrf/ros2:<tag_name>…

Click on docker pull osrf/ros2:<tag_name>…
19

Pull OSRF Ros2 Foxy Image from Docker

docker pull osrf/ros:foxy-desktop

Pull OSRF Ros2 Foxy Image from Docker
20

Test that ROS image has been successfully added to Docker

Docker > Images

You can pull multiple images of ROS1 and ROS 2 which will all be listed here and you can easily manage them here. This is the power of Docker.

Test that ROS image has been successfully added to Docker
21

Launch a new docker Container with respective ROS Image

docker run --name ros2-foxy -it osrf/ros:foxy-desktop

For all available Docker commands, check out: https://docs.docker.com/engine/reference/run/

Launch a new docker Container with respective ROS Image
    g

Google

2 Steps
22

Launch your Nodes and enjoy using ROS/ ROS2

Depending on the corresponding version of ROS you use, you can execute your respective nodes.

Remember "roscore" doesn't exist in ROS2

Launch your Nodes and enjoy using ROS/ ROS2
23

Single OS, multiple ROS Version, No version conflict

On a single Ubuntu 20.04 on top of your Windows PC, you can now easily run ROS1 and ROS2 without having to mess around with Ubuntu Versions and ROS Version incompatibilities.

Single OS, multiple ROS Version, No version conflict
Well done!
Create how-to guides like this in a snap. Get Tango now.