Chapter 01: Introduction to Robot Operating System (ROS)

Section 01: ROS Installation and Coding Basics

In this session, we covers basic introduction on Linux (Ubuntu and ARM), Git (GitHub), docker and ROS.

Why ROS

The Robot Operating System (ROS) is a set of software libraries and tools that help you build robot applications. From drivers to state-of-the-art algorithms, and with powerful developer tools, ROS has what you need for your next robotics project. And it’s all open source.

Linux

Introduction

Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the most popular platforms on the planet, Android, is powered by the Linux operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply, the operating system manages the communication between your software and your hardware. Without the operating system (OS), the software wouldn’t function.

Linux in 100s

The Linux operating system comprises several different pieces:

  • Bootloader – The software that manages the boot process of your computer. For most users, this will simply be a splash screen that pops up and eventually goes away to boot into the operating system.
  • Kernel – This is the one piece of the whole that is actually called ‘Linux’. The kernel is the core of the system and manages the CPU, memory, and peripheral devices. The kernel is the lowest level of the OS.
  • Init system – This is a sub-system that bootstraps the user space and is charged with controlling daemons. One of the most widely used init systems is systemd, which also happens to be one of the most controversial. It is the init system that manages the boot process, once the initial booting is handed over from the bootloader (i.e., GRUB or GRand Unified Bootloader).
  • Daemons – These are background services (printing, sound, scheduling, etc.) that either start up during boot or after you log into the desktop.
  • Graphical server – This is the sub-system that displays the graphics on your monitor. It is commonly referred to as the X server or just X.
  • Desktop environment – This is the piece that the users actually interact with. There are many desktop environments to choose from (GNOME, Cinnamon, Mate, Pantheon, Enlightenment, KDE, Xfce, etc.). Each desktop environment includes built-in applications (such as file managers, configuration tools, web browsers, and games).
  • Applications – Desktop environments do not offer the full array of apps. Just like Windows and macOS, Linux offers thousands upon thousands of high-quality software titles that can be easily found and installed. Most modern Linux distributions (more on this below) include App Store-like tools that centralize and simplify application installation. For example, Ubuntu Linux has the Ubuntu Software Center (a rebrand of GNOME Software) which allows you to quickly search among the thousands of apps and install them from one centralized location.

Ubuntu 20.04

Ubuntu is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: Desktop, Server, and Core for Internet of things devices and robots. All of the editions can run on a computer alone, or in a virtual machine.

Alone Installation

You will need another machine (windows or linux) to download installable media and create bootable USB.

The details can be found in this link

Dual system Installation

The details can be found in this link

Installing ROS

Once your Ubuntu 20.04 is up and running, you can install the ROS following this link.

Please choose to install the full version: Desktop-Full Install.

Coding Basics

Git

Git is a distributed version control system designed to track changes in source code during software development. With Git, multiple developers can work on the same project simultaneously without interfering with one another, ensuring code integrity and flexibility.

  • Repository
    • Working directory
    • Staging area
    • Local repo
    • Remote repo
  • Branch
  • Commit
  • Tag
  • Upstream

Basic Git Commands:

git init : Initializes a new Git repository.

git clone <repository>: Creates a copy of a remote repository on your local machine.

git status: Shows the status of changes in the working directory.

git add <file/folder>: Adds changes in the working directory to the staging area.

git commit -m "message": Captures a snapshot of the staged changes.

git push: Pushes committed changes to a remote repository.

git pull: Fetches changes from a remote repository and merges them into the current branch.

In Conclusion:

Git, as a distributed version control system, has become the industry standard for software development, known for its robustness, flexibility, and ability to handle large-scale projects efficiently. Whether you’re a solo developer or part of a massive development team, mastering Git is essential in the modern coding landscape.