1.4 ROS Installation
In this session, we’ll go over how to install ROS 2 Foxy, the version of ROS we will be using throughout the course. Setting up ROS can feel a little intimidating at first, but we’ll guide you through it step by step. The installation process varies depending on which operating system you are using, but ROS 2 supports two main platforms: Linux (Ubuntu) and Windows.
Here’s what you need to know:
Why Install ROS 2 Foxy?
ROS 2 Foxy is a long-term support (LTS) release, meaning it is stable and will receive updates for several years. We use this version because it offers improvements over ROS 1, including better support for real-time applications, improved security, and more flexible communication tools. Foxy also works well with both Ubuntu and Windows, making it versatile for different user needs.
Choosing Your Operating System
ROS 2 can be installed on two primary operating systems:
Ubuntu (Linux): Most ROS developers prefer Ubuntu because ROS was originally developed for Linux, and it integrates smoothly with Ubuntu. We will use Ubuntu 20.04 LTS in this course because it is fully compatible with ROS 2 Foxy and widely used for robotics projects. Ubuntu offers powerful command-line tools, flexibility, and a strong open-source community.
Windows: ROS 2 also supports Windows, which is useful if you’re more familiar with it or have hardware that requires Windows drivers. While the Windows setup is different from Ubuntu, you can still use ROS 2 effectively. However, some tools may not work as seamlessly on Windows compared to Ubuntu.
Which OS Should You Choose?
If you’re comfortable with Linux or want to learn more about it, Ubuntu is the best choice because it provides the most features and compatibility for ROS.
If you’re more comfortable using Windows, you can still follow along with the course, though certain ROS tools are more straightforward on Ubuntu.
Installation Steps Overview
No matter which operating system you choose, there are a few common steps to setting up ROS 2 Foxy:
Set up your environment: Before installing ROS 2, you need to configure your system and make sure you have the necessary tools, such as a terminal (on Ubuntu) or PowerShell (on Windows).
Add ROS package repositories: ROS is open-source software, and its packages are stored in repositories. You need to tell your operating system where to find and download the ROS 2 packages.
Install ROS 2: After configuring your system, you can download and install the ROS 2 Foxy packages.
Set up your workspace: Once ROS is installed, you’ll create a workspace where your ROS projects (nodes, packages, etc.) will live. This is where you’ll write your code and run ROS applications.
Test the installation: After installation, it’s important to verify that everything works correctly by running some simple ROS commands or launching example nodes.
Last updated