Skip to content

Instruction for Windows users

Stacy edited this page Oct 20, 2022 · 11 revisions

Do NOT install on Windows

As of today, June 2022, I encourage you NOT to install ROS2 on Windows.

  • Yes, Windows is supported;
  • Yes, installation is cumbersome but successful;
  • Yes, it can be launched;
  • BUT, if you need some packages, which where not included in the distribution, then it will be a nightmare.

For two days I struggled with building just an ordinary image_view package, which shows you what in sensor_msgs/Image topic is. After three trials I installed the correct version of Boost library (image_view depends on cv_bridge, which depends on Boost) only to get some linker errors.

Use WSL - Windows Subsystem for Linux

  1. You will need to be on Windows 11 Build 22000 or later.
  2. Install driver for vGPU to run Linux GUI apps
  3. Install WSL. If you want to run ROS2 on multiple machines, e.g. a robot sends only camera images and all computational staff is made on your pc, install WSL1, because in that version your network adapter is bridged and WSL is in the same local network as your robot. In WSL2 uses NAT.

Open Microsoft Store and install Ubuntu 22.04, because tf2_geometry_msgs, which I need, were finally imported from ROS1 only in ROS2 Humble Hawksbill, which binary packages are only in Ubuntu Linux - Jammy Jellyfish (22.04).

  1. Update and test
sudo apt update
sudo apt upgrade
sudo apt install x11-apps -y # install for test purposes simple apps
xcalc # It had some issues with display, so I set $DISPLAY=:0, reloaded WSL and it worked
  1. As I have NVIDIA, I also installed CUDA Support for WSL
sudo apt-key del 7fa2af80
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda

It takes 1-2 hours to install all you need.

No problems with image_view, you just need to install and run it

sudo apt install ros-humble-image-view
ros2 run image_view image_view --ros-args --remap image:=/vehicle/camera