R

ROS (Robot Operating System)

Definition

ROS (Robot Operating System) is an open-source middleware framework for robot software development. Despite its name, ROS is not a traditional operating system — it provides tools, libraries, and conventions that simplify the creation of complex and reusable robot software across a wide variety of robotic platforms.

Formula

In-Depth Explanation

ROS was originally developed at Stanford University and later at Willow Garage, with its first stable release in 2010. It has become the de facto standard framework for robotics research and increasingly for commercial applications. ROS 2, released in 2017, introduced real-time support, improved security, and better multi-robot capabilities. Core ROS concepts: 1. Nodes: Independent processes that perform specific tasks (e.g., a camera driver node, a path planning node). Each node is a separate executable. 2. Topics: Named communication channels. Nodes publish messages to topics and subscribe to receive messages. This is asynchronous, one-to-many communication. - Example: /camera/image_raw, /cmd_vel, /odom 3. Messages: Strongly typed data structures exchanged over topics. - Example: geometry_msgs/Twist for velocity commands 4. Services: Synchronous request-response communication between nodes. - Example: A node requests a map from a map server and waits for the response. 5. Actions (ROS 2): Long-running tasks with feedback and cancellation support. - Example: Navigate to a goal position while receiving progress updates. 6. Parameter Server: Stores configuration values accessible by all nodes. 7. roslaunch / ros2 launch: Launch multiple nodes with a single configuration file. ROS ecosystem tools: - RViz: 3D visualization of robot state, sensor data, maps - Gazebo: Physics-based robot simulation environment - rosbag / ros2 bag: Record and replay topic data for debugging - tf2: Coordinate frame transformation library - MoveIt: Motion planning framework for robotic arms - Nav2: Navigation stack for autonomous mobile robots Practical example: In an autonomous robot, a LiDAR driver node publishes sensor data to /scan. A SLAM node subscribes to /scan to build a map. A navigation node subscribes to the map and publishes velocity commands to /cmd_vel. A motor controller node subscribes to /cmd_vel and drives the wheels. Each component is independent and reusable. ROS 2 vs ROS 1: - ROS 2 uses DDS (Data Distribution Service) instead of a central ROS Master - Supports real-time systems, embedded hardware (micro-ROS), and multi-robot setups - Better suited for production and safety-critical deployments

Related Terms