Download version: https://www.microsoft.com/ko-kr/software-download/windows10
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
wsl --set-default-version 2
Open MS store and install Ubuntu 20.04: https://www.microsoft.com/store/apps/9n6svws3rx71
> wsl --list --verbose
wsl --set-version Ubuntu 2
Reference: https://docs.microsoft.com/ko-kr/windows/wsl/install-win10
$ sudo apt update
$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Reference: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
$ docker pull ubuntu:16.04
// Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
// --> means docker service not executed
// check service status
$sudo systemctl status docker
// System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
$sudo /etc/init.d/docker start
Reference: https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Binary/
// Solution Option 1.
apt remove gpg ( follow the instructions) apt install gnupg1 (follow the instructions)
Option 2.
sudo apt remove gpg sudo apt-get update -y sudo apt-get install -y gnupg1
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - //OK ```
$sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
// Update your apt repository caches after setting up the repositories.
$ sudo apt update
// Desktop Install (Recommended): ROS, RViz, demos, tutorials.
$ sudo apt install ros-foxy-desktop
$ source /opt/ros/foxy/setup.bash
// help auto ccomplete (optional)
$ sudo apt install python3-argcomplete
$ sudo apt update
$ sudo apt install ros-foxy-ros
dge
// terminal 1
$ source /opt/ros/foxy/setup.bash
$ ros2 run demo_nodes_cpp talker
// terminal 2
$ source /opt/ros/foxy/setup.bash
$ ros2 run demo_nodes_py listener
Reference: http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter02