Running Rviz on Windows - chrisl8/ArloBot Wiki

ROS For Windows

  1. Install Chocolatey Here are the condensed steps:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(''))
  1. ROS for Windows I am skipping steps that I don't need. My goal isn't a "full development environment", just to be able to use basic ROS built-in tools.
choco upgrade git -y
mkdir c:\opt\chocolatey
set ChocolateyInstall=c:\opt\chocolatey
choco source add -n=ros-win -s="" --priority=1
choco upgrade ros-noetic-desktop_full -y --execution-timeout=0
  1. Download a copy of the navigation.rviz file for use in Windows

Go to: Click on the "Raw" button. In the browser do what you need to in order to download it:

Check the file and make sure that it does NOT have a .txt extension, if it does, fix it.

  1. Run Rviz
set ROS_MASTER_URI=http://192.168.1.ROBOT:11311
set ROS_HOSTNAME=192.168.1.ME
set ROS_IP=192.168.1.ME

Rviz should load momentarily.

Just like on Linux, if you do NOT have it making a map yet, select "odom" as the "Fixed Frame", or if you do have the map maker running, then leave it or change Fixed From back to "map".

You can make a batch file to run that will start up Rviz easily just by double click it.

Make a file anywhere, like your Desktop, called Rviz.bat. The name has to end in .bat but otherwise anything will work.

Then put these contents in, replacing the IP's with the correct ones for you and replacing the path to navigation.rviz with the correct one:

call c:\opt\ros\noetic\x64\setup.bat
set ROS_IP=
c:\opt\ros\noetic\x64\bin\rviz.exe -d "c:\Users\chris\Downloads\navigation.rviz"

Note the use of call in the first line. This ensures the batch file runs the other batch file "inside" this one. Without using call it will just run the other batch file and exist without doing anything.

Everything else is the same as if you ran it by hand.