Maker.io main logo

Intro to ROS Part 1: What is the Robot Operating System (ROS)?

118

2025-09-04 | By ShawnHymel

Single Board Computers Raspberry Pi SBC

The Robot Operating System (ROS) is an open-source framework designed to simplify the development of robotic systems. And despite the name, ROS is not a full operating system like Windows or Linux. Instead, it acts as middleware: a software layer that sits between your robot's operating system and the applications that control it. It helps developers break down their code into modular, reusable components called nodes, manage communication between those components, and simulate or debug their systems in real time.

In this post, we’ll introduce ROS. We’ll focus specifically on ROS 2, which is the current and actively developed version of the framework. Whether you're new to robotics or looking to understand the tools powering today’s most advanced robots, this is the place to start.

The Docker image and code for this series can be found here: https://github.com/ShawnHymel/introduction-to-ros 

What Exactly Is ROS?

ROS is a collection of libraries, tools, and conventions that simplify the task of creating complex and scalable robot behavior. Rather than writing a monolithic robot control system, you break functionality into nodes, which are individual processes that perform specific tasks, like reading sensor data, controlling motors, or performing object detection.

ROS handles the hard part: making sure these nodes can talk to each other through a structured, flexible messaging system. This communication happens in one of two main ways:

  • Topics: A publisher-subscriber model for continuous data (e.g., sensor streams)
  • Services: A request-response model for one-time actions (e.g., turning on a light)

These nodes, and the data they send, are defined using interfaces, which enforce strict typing so that messages are reliable and consistent.

Why Use ROS?

So, why not just write your robot software from scratch?

Because robots are complicated. They integrate hardware, computer vision, navigation, control loops, and sometimes even machine learning. ROS gives you a proven framework to manage that complexity. It lets you:

  • Break your robot software into maintainable pieces
  • Reuse code across projects
  • Simulate your system before deploying to real hardware
  • Access a rich ecosystem of pre-built packages for navigation, manipulation, vision, and more
  • Most importantly, ROS is widely adopted across academia and industry. Skills you develop with ROS are transferable to real-world robotic systems.

    History of ROS

    Intro to ROS Part 1: What is the Robot Operating System (ROS)?

    The Robot Operating System (ROS) began in the mid-2000s as an internal project by two Stanford PhD students, Eric Berger and Keenan Wyrobek. Frustrated by the fragmented landscape of robotics software (where every research group and company seemed to reinvent the wheel) they envisioned an open-source middleware that could provide common tools and abstractions for building robotic systems. Their vision gained traction when they joined Willow Garage, a robotics incubator founded by Scott Hassan. There, they led the development of both the PR2 robot platform and the early versions of ROS. In 2008, ROS v0.4 was used to demonstrate advanced manipulation and navigation capabilities on the PR2, and by 2010, ROS v1.0 was officially released.

    As the robotics community adopted ROS, the need for a more scalable and robust architecture became clear. In 2012, the Open-Source Robotics Foundation (now Open Robotics) was established to steward its development. This culminated in the launch of ROS 2 in 2017, which introduced major improvements like real-time communication, better security, and a decentralized message-passing system based on the Data Distribution Service (DDS). With ROS 1 reaching end of life in 2025, ROS 2 is now the de facto standard for new robotics projects in research and industry alike.

    ROS 1 vs. ROS 2

    The original version, ROS 1, was built with research use in mind, and it relied on a central server (the “ROS Master”) to manage communication. This limited scalability and made the system brittle in distributed environments.

    ROS 2 solves this by replacing the ROS Master with the Data Distribution Service (DDS), a decentralized communication layer that improves fault tolerance and real-time capabilities. That makes ROS 2 better suited for industrial and commercial robots. It also includes improved support for real-time systems, multi-platform use (including Windows), and better security.

    As of this writing, ROS 1 has officially reached its end of life. If you’re starting a new project, ROS 2 is the way to go.

    Supported Languages: Python or C++?

    Intro to ROS Part 1: What is the Robot Operating System (ROS)?

    ROS 2 officially supports two programming languages: Python (via rclpy) and C++ (via rclcpp). Each has strengths and trade-offs:

    • Python is easier to write and read. It’s great for prototyping and is widely used in machine learning and computer vision communities.
    • C++ offers better performance, lower memory usage, and more control, which is ideal for real-time or resource-constrained environments.

    You’re not limited to just one. Many projects mix and match languages depending on the task. For example, a vision node in Python might publish data to a motor control node written in C++. While Python and C++ are the only officially supported languages, the community has created several ports of the ROS Client Library (RCL) for various languages, including Ada, Java, Node.js, and Rust. You can find the complete list of languages here.

    Limitations and Alternatives

    While ROS is incredibly powerful, it’s not perfect. Some drawbacks include:

    • Steep learning curve for beginners
    • Performance overhead due to message passing
    • Tight coupling with the host OS (usually Ubuntu)
    • Dependency hell when manually installing

    For simpler robots or hard real-time requirements, you might look into alternatives like:

    • Orocos: A real-time robotics framework
    • LCM: Lightweight Communications and Marshalling, a minimal messaging system

    Still, for most medium to large robotics projects, ROS remains the industry go-to standard.

    Industry Use Cases

    Many commercial robots use ROS or ROS-based stacks. For example:

    • Vecna Robotics uses ROS for autonomous warehouse navigation.
    • Omron relies on the MoveIt package in ROS for its robotic arms.
    • NVIDIA Isaac ROS builds accelerated ROS 2 packages for GPU-powered perception.

    Whether you're working on a student project or building the next industrial manipulator, ROS skills are widely applicable.

    Syllabus

    Throughout the series, I will walk you through everything you need to get started with ROS 2. Here’s what you can expect:

    1. Getting Started with ROS 2 - Set up a ROS 2 development environment using Docker for a consistent experience across platforms.
    2. Command-Line Tools - Learn how to inspect topics, services, and nodes using the ROS 2 CLI.
    3. Topics with Python - Write your first publisher and subscriber using rclpy.
    4. Topics with C++ - Implement the same publisher and subscriber demos in C++ with rclcpp.
    5. Services in Python - Create simple server and client demos in Python
    6. Services in C++ - Create simple server and client demos in C++
    7. Custom Interfaces - Define your own message and service types for custom data structures
    8. Parameters - Configure nodes with runtime parameters
    9. Launch Files - Create launch files to run multiple nodes at once and pass in parameters
    10. TF2 and Turtlesim - Dive into the TF2 library, which handles coordinate transforms between reference frames. Discuss the makeup of TF2 and write a broadcaster in Python.
    11. TF2 Listener - Write a custom listener with Python and create a fun demo with Turtlesim where one turtle follows another!
    12. MCU Integration - Discover how to connect ROS to actual hardware via microcontrollers.

    Prerequisites

    You should be familiar with the following concepts before tackling this ROS series:

    • Linux command line usage
    • Either Python or C++
    • Object-oriented programming (OOP) principles
      • Encapsulation
      • Abstraction
      • Inheritance
    • Callback functions
    • Modern C++
      • Templates
      • Smart pointers

    What About micro-ROS?

    Most of the time, ROS runs on a full computer, like a Raspberry Pi, which handles heavy tasks like image processing and navigation. But what if you want to run ROS on a microcontroller?

    That’s where micro-ROS comes in. It’s a lightweight version of ROS designed to run on constrained hardware, like STM32 or ESP32 boards, and integrates with real-time operating systems like Zephyr or FreeRTOS. However, it’s still maturing and not as widely supported, so in this series, I’ll focus on the larger ROS system. At the end of the series, I’ll demonstrate using a microcontroller to accept commands (via USB) from a ROS node to physically drive a robot.

    Ready to Dive In?

    In the next part of this series, we’ll explore ROS 2's command-line tools and begin writing your first custom nodes. Stay tuned, and let’s start building robots together!

    Mfr Part # 28009
    EXPERIENTIAL ROBOTICS PLATFORM (
    SparkFun Electronics
    $984.91
    View More Details
    Mfr Part # SC0194(9)
    SBC 1.5GHZ 4 CORE 4GB RAM
    Raspberry Pi
    $483.63
    View More Details
    Add all DigiKey Parts to Cart
    Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.