Course contents(2/4)
Getting Started with ROS 2
Lesson 1.2 — ROS 2 and Intelligent Agents
10 min readWhat you'll learn
What an "intelligent agent" is in robotics
How the Perception → Reasoning → Action loop maps onto ROS 2
Why an agent is many programs, not one
The agent loop
An intelligent agent is defined by a repeating cycle:
Perception → Reasoning → Action → (repeat)
A robot senses the world, decides what to do, acts, and then senses again. ROS 2 has a natural home for each phase.
Agent phaseROS 2 equivalentPerceptionSubscribers — reading LiDAR, Camera, IMU dataReasoningServices / Actions — processing data, planning pathsActionPublishers — sending velocity / motor commands
Why ROS 2 fits AI agents
An AI agent needs sensing, a world model, planning, and action — all at once, with strict timing. Here is what ROS 2 supplies for each need:
NeedROS 2 mechanismConcurrent processesNodes (backed by DDS)Async communicationTopics (pub/sub), Services (request/response), Actions (long-running with feedback)Real-time guaranteesDDS QoS profiles (reliability, durability, deadline)Distributed computeDDS multicast discovery — transparent across a LANHardware abstractionStandard messages (sensor_msgs, geometry_msgs)Embedded reachmicro-ROS over UDP / serialSim ↔ real paritySame topic graph in simulation and on the real robotEcosystemNav2, MoveIt, PlanSys2, ros2_control
Key idea: In ROS 2, an "agent" is not a single program. It is the emergent behaviour of many nodes interacting over a shared communication bus.
Recap
The agent loop (perceive → reason → act) maps cleanly onto subscribers, services/actions, and publishers.
Intelligence in ROS 2 emerges from many small nodes cooperating, not one big brain.