Robots and ROS

Introduction to ROS2

Last updated: December 20, 2024

1. Introduction

In the previous lesson, we took a broad look at how a robot interacts with the world. Now, let’s break down what’s really happening inside a robot and see why something like ROS is so invaluable.

2. Life of a Typical Robot

Imagine you have a small delivery robot designed to move around your home, fetching items and bringing them back to you. At every moment, this robot is juggling three core responsibilities:

  1. Perception: The robot must understand its world. Using sensors like cameras or LiDAR, it “sees” walls, furniture, and even pets. Without perception, the robot might drive straight into a table or get stuck in a corner.

  2. Decision Making: Once it perceives the environment, the robot must decide what to do next. Should it turn left, right, or pause for a moment? This reasoning might be guided by rules, artificial intelligence, or predefined missions, but the core idea is that it needs to make smart choices to complete its tasks.

  3. Actuation: After making a decision, the robot must turn those decisions into action. Motors spin, wheels rotate, and the robot moves. Actuators translate the robot’s “ideas” into physical reality.

From scanning its surroundings to planning a path and then physically moving, the robot is always cycling through these three steps. But how do we organize this complexity—dozens of sensors, decisions, and actions—into a system that’s easy to build and maintain?

3. Why We Need ROS

Building a robot is more than just wiring sensors and motors. It’s about managing an ecosystem of components that need to work together seamlessly. Sensors feed data into algorithms, those algorithms produce decisions, and those decisions must be delivered to the motors at the right time. Managing these data flows by hand can quickly become complicated and error-prone.

This is where ROS comes into play. The Robot Operating System (ROS) is not an operating system in the traditional sense, but rather a flexible framework that helps you structure your robot’s software. It provides a common language and set of tools that make it easier to get all these pieces—sensors, control logic, and actuators—to play nicely together.

4. Understanding the ROS Graph

The heart of ROS’s organization is something called the ROS Graph. Think of it like a blueprint or a map of your robot’s brain, showing how all the components connect and share information. At a high level, the ROS Graph includes:

By defining a clear way for these components to communicate, ROS lets you focus on making your robot smarter and more capable, rather than fighting with tangled code.

5. Looking Ahead

Don’t worry if you can’t memorize all these details right away. In the upcoming lessons, we will go step-by-step into each part of the ROS Graph, building up your understanding. By the end of this course, you’ll be able to connect perception, decision making, and actuation in your own robot projects, with ROS helping to keep everything organized and running smoothly.

In other words, ROS is the glue that holds your robot’s mind together. It empowers you to build complex systems without getting lost in the complexity—an essential ingredient for creating robots that can confidently move and interact in the real world.

Previous Lesson Next Lesson