Installing ROS on Windows 10

Good afternoon, dear readers.

After a long break, I return to the coverage of the Robotic Operating System (ROS) robotic platform.

ROS provides a powerful platform for creating robotic systems, including a large number of packages for solving various problems (from navigation and localization to computer vision and simulation), tools for high-level interaction with the robot’s hardware, protocols for data exchange, and much more. Thus, ROS greatly facilitates the development of projects for robotics, providing a universal development tool that is independent of the specific hardware platform of the robot. Learn more about the ROS platform here.

Not so long ago, ROS received support on Windows 10. Before that, ROS was officially supported only on Linux (specifically Ubuntu). So with ROS you can now In this article, I’ll show you how you can install ROS on the Windows Linux Subsystem (WLS). To whom it is interesting I ask under kat.

Installing ROS

To install on WLS, run the following commands

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop ros-noetic-agni-tf-tools
sudo apt install python3-rosdep python3-catkin-tools
sudo rosdep init
rosdep update

Add the following command to the .bashrc file so that the ROS packages are loaded automatically when a new terminal window is opened:

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc

There may be problems running graphical programs in WLS. To solve them, install the XLaunch utility. You can download it from here.

Let’s go through all the installation steps. Use the settings as shown in the images below

Let’s check that the icon of running Xming has appeared in the system tray

You also need to set several environment variables to run graphical programs. We need to determine the IP address of the computer. It must be specified in the $DISPLAY environment variable. Run the following commands:

export DISPLAY=192.168.1.3:0.0
export LIBGL_ALWAYS_INDIRECT=0

The DISPLAY value specifies our IP address.

Let’s check that ROS has been successfully installed:

roscore

We will get the standard output of rviz:

[ INFO] [1651946723.335614300]: rviz version 1.13.23 [ INFO] [1651946723.336733300]: compiled against Qt version 5.9.5 [ INFO] [1651946723.336822800]: compiled against OGRE version 1.9.0 (Ghadamon) [ INFO] [1651946723.507490400]: Forcing OpenGl version 0.

Running rviz and Gazebo

Run rviz

rosrun rviz rviz

The rviz window will appear:

Launch Gazebo

rosrun gazebo_ros gazebo

ROS has been successfully installed and we are ready to start developing with it.

By the way, for VS Code there is extension to work with ROS. That’s all for now. See you soon!

PS: Subscribe to our community vkontakte and group In Telegram.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *