Skip to main content
Technical 18 min read

Introduction to ROS (Robot Operating System)

ROS is the de facto standard for robotics software development. Understanding ROS is essential for anyone working with modern robots.

What is ROS?

The Robot Operating System (ROS) is not actually an operating system—it's a flexible framework for writing robot software. ROS provides tools, libraries, and conventions that simplify creating complex robot behaviors across a wide variety of robotic platforms.

Originally developed at Stanford's Artificial Intelligence Laboratory and later at Willow Garage, ROS is now maintained by Open Robotics (now part of Intrinsic, an Alphabet company). It has become the standard middleware in robotics research and is increasingly used in commercial applications.

ROS in a Nutshell

  • Middleware: A communication layer between robot components
  • Tools: Visualization, debugging, simulation, and logging
  • Libraries: Algorithms for perception, navigation, manipulation
  • Ecosystem: Thousands of reusable packages from the community

Why Use ROS?

Building a robot from scratch requires solving many problems: hardware drivers, sensor processing, motion planning, communication, and more. ROS provides solutions to these common challenges:

Don't Reinvent the Wheel

Need SLAM? Navigation? Object detection? Arm control? Someone has already built it. ROS packages let you use proven implementations instead of starting from zero.

Hardware Abstraction

Write code once, run on different robots. ROS abstracts hardware details so your navigation algorithm works whether you're using a Turtlebot, a custom AMR, or simulation.

Modularity

Build systems from independent components (nodes) that communicate via messages. Replace, upgrade, or debug components without rewriting the whole system.

Rich Tooling

RViz for visualization, rqt for GUIs, rosbag for recording, Gazebo for simulation. The tooling accelerates development and debugging significantly.

"Using ROS reduces development time by 50% or more for complex robotics projects. The combination of reusable packages and robust tooling lets teams focus on their unique value-add instead of infrastructure."

Core Concepts

Understanding these fundamental concepts is key to working with ROS:

Node

A node is a process that performs computation. A robot system typically consists of many nodes: one for controlling the wheels, one for processing camera images, one for path planning, etc. Nodes communicate with each other through topics, services, and actions.

Topic

Topics are named buses for asynchronous, streaming data. Nodes publish messages to topics and subscribe to receive messages. Example: a camera node publishes images to the /camera/image topic; a perception node subscribes to process them.

Message

Messages are the data structures exchanged between nodes. ROS defines standard message types (geometry_msgs/Twist for velocity, sensor_msgs/Image for images, etc.) and you can create custom messages. Messages are language-agnostic, enabling Python and C++ nodes to communicate.

Service

Services are for synchronous request/response communication. A node calls a service, waits for a response, then continues. Example: requesting a map from a mapping node, or asking a gripper to close and waiting for confirmation.

Action

Actions are for long-running tasks with feedback. Like services but non-blocking—you can send a goal, receive periodic feedback, and eventually get a result. Example: sending a navigation goal and receiving progress updates until the robot arrives.

Package

Packages are the organizational unit for ROS code. A package contains nodes, configuration files, launch files, and dependencies. The ROS ecosystem has thousands of packages available through package managers (apt on Ubuntu) or from source.

ROS 1 vs ROS 2

ROS 2 is a major redesign addressing limitations of ROS 1. New projects should use ROS 2.

FeatureROS 1ROS 2
CommunicationCustom TCP/IPDDS (industrial standard)
Real-time supportLimitedBuilt-in support
Multi-robotDifficultNative support
SecurityNone built-inDDS security
PlatformsLinux (Ubuntu)Linux, Windows, macOS
Master nodeRequired (roscore)Not needed (peer-to-peer)
LifecycleEOL (May 2025)Active development

Current Recommendation

Start new projects with ROS 2 Jazzy (LTS) or ROS 2 Iron. ROS 1 Noetic reached end-of-life in May 2025. The ros1_bridge package can help migrate existing ROS 1 systems gradually.

The ROS Ecosystem

Key packages and tools you'll encounter:

Navigation Stack (Nav2)

Complete solution for mobile robot navigation: localization, path planning, obstacle avoidance, and recovery behaviors.

MoveIt

Motion planning framework for robot arms. Handles inverse kinematics, collision checking, trajectory generation, and grasp planning.

Gazebo

Physics simulator for robots. Test algorithms in simulation before deploying on hardware. Supports cameras, LiDAR, and other sensors.

RViz

3D visualization tool. See sensor data, robot models, maps, and planning outputs in a unified interface. Essential for debugging.

tf2

Transform library for tracking coordinate frames over time. Essential for combining sensor data and understanding spatial relationships.

perception_pcl / vision_opencv

Integration with Point Cloud Library and OpenCV for 3D point cloud and image processing.

Getting Started with ROS 2

1

Install ROS 2

Ubuntu 22.04 with ROS 2 Jazzy is the most stable combination. Follow the official installation guide. On Windows or macOS, Docker is recommended.

2

Complete the Tutorials

The official ROS 2 tutorials cover creating packages, writing nodes, and using topics, services, and actions. Essential foundation.

3

Try a Simulation

TurtleBot3 or TurtleBot4 simulation is a great starting point. Practice navigation and SLAM without needing physical hardware.

4

Build a Project

Apply what you've learned: a simple mobile robot that navigates waypoints, or an arm that picks objects. Real projects solidify understanding.

Resources

  • Official Docs: docs.ros.org - Comprehensive reference and tutorials
  • ROS Answers: answers.ros.org - Community Q&A
  • ROS Discourse: discourse.ros.org - Discussion forum
  • The Construct: Online courses with simulation environments
  • GitHub: Explore open-source ROS packages for inspiration