Skip to main content

ROS installation in Microsoft Windows 10

 

Dear Windows users who have never used Ubuntu or not having an Ubuntu machine but are so passionate about Robotics, this may help you.


Earlier, ROS (Robot Operating System) was available only in Ubuntu. Now it is also available for Windows. 

Today let's know about configuring ROS in our Windows Machine.

What do you need actually?

  • You must have a 64-bit Windows 10 system
  • Also, it is recommended to have at least 10GB of free space in your C:\ drive for the installation and development.

To build ROS projects for Windows, you must have Visual Studio and the Microsoft SDKs for Windows. You can download a version of Visual Studio (Visual Studio 2019) here. There are three options to be selected while installing.

  • Visual Studio Community (Free)
  • Visual Studio Professional
  • Visual Studio Enterprise

Remember your selection which is very important in near future (I've selected Visual Studio Community)

While installing you have to include Desktop development with C++ in your workload. For this, you may have to spend around 2.5GB of your internet data. If you are also building Microsoft Windows Machine Learning (WinML), you have to include the Universal Windows Platform development in your workload.

After installing Visual Studio, in a feasible folder (say Desktop), create a shortcut (Right Click > New > Shortcut). Once you create it, a new window will open and will ask you to fill the location of the item. Now we have to copy one of the following paths as per our installed Visual Studio and paste it to that shortcut path.

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Approve any prompts if arose and once it has been completed, close the command prompt to complete the install.

Re-open the ROS file again and run the following command to install Git.

choco upgrade git -y

You can check whether the installation is successful using this command.

git --version

You can close that window once done. 

There are two ROS installations available for now and you can choose one.

  • ROS Last Known Good (LKG) Build Installation
  • ROS 2 Nightly Build Installation

To install any of it, first, you have to open the ROS file again.

Copy the following commands one by one or all together and execute.

mkdir c:\opt\chocolatey

set ChocolateyInstall=c:\opt\chocolatey

choco source add -n=ros-win -s="https://roswin.azurewebsites.net/api/v2" --priority=1

Now, to install your ROS file, you have to choose one of the two. Copy the following command to install ROS Last Known Good (LKG) Build Installation.

choco upgrade ros-melodic-desktop_full -y --execution-timeout=0

Copy the following commands one by one or all together to install ROS 2 Nightly Build Installation.

choco upgrade ros-eloquent-desktop -y --execution-timeout=0 --pre

Then you have to name the shortcut as ROS and set that shortcut as Administrator (Right Click on the shortcut and choose Properties > Select the Shortcut tab if not already selected > Press the Advanced button > Check the button Run as Administrator > Press OK on the Advanced properties dialog > Press OK on the ROS Properties shortcut dialog).

If you are using Community: 

C:\Windows\System32\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64&& set ChocolateyInstall=c:\opt\chocolatey&& c:\opt\ros\melodic\x64\setup.bat

If you are using Professional: 

C:\Windows\System32\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64&& set ChocolateyInstall=c:\opt\chocolatey&& c:\opt\ros\melodic\x64\setup.bat

If you are using Enterprise: 

C:\Windows\System32\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64&& set ChocolateyInstall=c:\opt\chocolatey&& c:\opt\ros\melodic\x64\setup.bat

Now open it (ROS - created Shortcut) and run the following command.

Wait until the installation gives you success. You must keep a healthy internet connection while installing it.

Once it is done with no error, you can execute roscore to confirm whether you have installed ROS perfectly.

If you get any error, close the ROS file and re-open it, and then copy the following command.

c:\opt\ros\melodic\x64\setup.bat

Then you can copy roscore again and you will get no error. You can try rostopic in another ROS command prompt to see whether you have installed ROS perfectly.

Once it is done, add &&c:\opt\ros\melodic\x64\setup.bat in target behind the existing path (Right-click on ROS command prompt file > Properties, you can see the target).

Feel free to ask questions if you get any issues while installing it. 

Hope this helps. Share your thoughts too. Good luck!

Comments

Popular posts from this blog

A 3000 Years Old Love Story

Pharaoh Ramesses the Great and Queen Nefertari Pharaoh Ramesses II the Great ruled ancient Egypt during the 19th dynasty (1292-1190 BCE). His reign was the second-longest in Egyptian history, lasting from 1279 to 1213 BCE. He assumed the throne in 1279 BC as a royal member of the Nineteenth Dynasty and ruled for 67 years. In Greek sources, Ramesses II was also known as Ozymandias, with the first half of the appellation deriving from Ramesses' regnal name, Usermaatre Setepenre, which means 'The Maat of Ra is mighty, Chosen of Ra'.  He is also recognized as the Egyptian Empire's greatest, most renowned, and most dominating pharaoh. His successors and subsequent Egyptians are reported to have referred to him as the Great Ancestor. Ramesses II was a famous explorer, monarch, and warrior who conducted multiple military excursions to the Levant to reestablish Egyptian dominance over Canaan. He is also supposed to have conducted journeys south to Nubia, which are documented in

Parallel A* Search on GPU

A* search is a fundamental topic in Artificial Intelligence. In this article, let’s see how we can implement this marvelous algorithm in parallel on Graphics Processing Unit (GPU). Traditional A* Search Classical A* search implementations typically use two lists, the open list, and the closed list, to store the states during expansion. The closed list stores all of the visited states and is used to prevent the same state from being expanded multiple times. To detect duplicated nodes, this list is frequently implemented by a linked hash table. The open list normally contains states whose successors have not yet been thoroughly investigated. The open list’s data structure is a priority queue, which is typically implemented by a binary heap. The open list of states is sorted using the heuristic function  f(x) : f(x) = g(x) + h(x). The distance or cost from the starting node to the current state  x  is defined by the function  g(x) , and the estimated distance or cost from the current stat

Sorting Algorithms  : A Comprehensive Guide

Sorting Algorithms  : Explained With Illustrations Sorting is the process of structuring data in a specific format. The sorting algorithm explicitly states how to arrange data in a specific order. The most popular orders are numerical or lexicographical. When humans understood the importance of searching speedily, they coined the term sorting. The significance of sorting stems from the fact that if data is stored in a sorted manner, data searching can be optimized to a very high level. Sorting is also used to make data more readable. The following are a few examples of sorting in real-world scenarios. 1. Telephone Directory: The telephone directory stores people’s phone numbers alphabetically so that the names can be easily searched. 2. Dictionary: Words are stored in alphabetical order in the dictionary, making it easy to find any word. Sorting algorithms can be classified into two types. Integer sorts Comparison sorts Integer sorts Counting sorts are another name for integer sorts (t