-
Notifications
You must be signed in to change notification settings - Fork 1
Instruction for Windows users
Stacy edited this page Jun 3, 2022
·
11 revisions
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.
- You will need to be on Windows 11 Build 22000 or later.
- Install driver for vGPU to run Linux GUI apps
- Install WSL
# open Powershell
wsl --install -d Ubuntu
# Once your machine has finished rebooting,
# installation will continue and you will be asked
# to enter a username and password.
# This will be your Linux credential for the Ubuntu distribution.
- 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
- As I have NVIDIA, I also installed CUDA Support for WSL 2
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, including Webots simulator and all packages you need.
No problems with image_view, you just need to install and run it
sudo apt install ros-$ROS_DISTRO-image-view # or what distribution you have
ros2 run image_view image_view --ros-args --remap image:=/vehicle/camera
Webots simulator is still slow, maybe because of OpenGL and NVIDIA writes that "Applications relying on OpenGL will not work". I will deal with it later.