Skip to content

Instruction for Windows users

Stacy edited this page Jan 23, 2023 · 11 revisions

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. Make sure you installed WSL1, because in that version your network adapter is bridged and WSL is in the same local network as your robot. WSL2 on the contrary uses NAT. Open Microsoft Store and install Ubuntu 20.04.
  4. Download and install VcXsrv Windows X Server. Open and set:
    • check multiple windows and set display number to 0;
    • in next window check start no client;
    • finally check all extra settings;
    • enable Outgoing Connection from Windows Firewall
  5. In WSL run
export DISPLAY=127.0.0.1:0.0 #  you can also add it to ~/.bashrc.
  1. Create a .xsession file in the user home directory e.g.
echo xfce4-session > ~/.xsession
  1. Open ubuntu, update and test
sudo apt update
sudo apt upgrade
sudo apt install x11-apps -y # install for test purposes simple apps
xcalc # if it has some issues with display, set $DISPLAY=:0 and reload WSL

Install ROS Noetic on Windows

In order to use Tensorflow with GPU in ROS I had to install ROS also on Windows, because it cannot be installed on WSL1:(

  1. Install ROS Noetic

  2. Install Ninja and add its installation folder to the PATH

  3. Install GeForce Nvidia driver

  4. Install CUDA Toolkit 10.1

  5. Install CuDNN. Unzip to a suitable location and copy files to corresponding folders in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1 Check with python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

  6. Install Tensorflow 2.2 with pip install tensorflow==2.2 DependanciesPreviously I had installed Tensorflow 2.11, but unfortunately GPU acceleration is not supported in Windows, only if WSL2 is used, but unfortunately I need to use WSL1, so it is not my choice. Tensorflow 2.2 is installed on DonkeyCar, so it is good choice to install same version and train model in it.