Introduction to ROS (Robot Operating System)
Advertisement
Ad
What is ROS?
ROS (Robot Operating System) is an open-source framework for building robot software. Despite the name, it's not an OS — it's middleware that helps robot components communicate.
Why ROS?
- Reusable packages for common tasks (navigation, vision).
- Hardware abstraction — same code, different robots.
- Huge community and tools.
Core Concepts
| Concept | Meaning |
|---|---|
| Node | A program doing one task |
| Topic | Channel for messages |
| Publisher | Sends messages |
| Subscriber | Receives messages |
How Nodes Communicate
Camera Node → publishes → /image topic → Vision Node subscribes
Vision Node → publishes → /commands → Motor Node subscribes
A Simple Publisher (Python)
import rospy
from std_msgs.msg import String
rospy.init_node("talker")
pub = rospy.Publisher("/chatter", String, queue_size=10)
pub.publish("Hello robot!")
FAQs
ROS 1 or ROS 2?
ROS 2 is the modern version with better real-time and security. Learn ROS 2. More in our Robotics section.
What languages does ROS use?
Mainly C++ and Python.
