Software and Connectivity

What Is a ROS Topic? How Robots Publish Sensor Data.

By Rodolfo Garcia Calderoni, CFA ·

On this pageWhat Is a ROS Topic?Key TakeawaysHow Does a ROS Topic Work?Publisher vs. SubscriberWhat Is a ROS Message Type?ROS Topic vs. ROS ServiceWhat Does QoS Mean for ROS Topics?Why Do ROS Topics Matter?Frequently Asked QuestionsThe Bottom LineSourcesRelated terms

What Is a ROS Topic?

A ROS topic is a named communication channel used by software components to exchange messages through publish-subscribe communication.

Topics are commonly used for information that is produced repeatedly, such as camera images, LiDAR measurements, robot positions, or equipment status.

For example, a camera node may publish images to a topic named /camera/image_raw.

A computer vision node can subscribe to that topic and process the images as they arrive.

Key Takeaways

  • ROS topics allow nodes to publish and subscribe to messages.
  • They are particularly useful for continuous sensor data and operating-state updates.
  • Communication behavior depends on message types, middleware, and Quality of Service settings.

How Does a ROS Topic Work?

Imagine a mobile robot equipped with a LiDAR sensor.

The sensor produces measurements several times per second.

A ROS node receives those measurements and publishes them to a named topic.

The navigation system subscribes to the topic.

Whenever new measurements arrive, the navigation software can use them to update its information about nearby obstacles.

A monitoring application may also subscribe to the same topic.

This allows several components to receive the information without requiring separate custom connections.

Publisher vs. Subscriber

A publisher sends messages to a topic.

A subscriber receives messages from a topic.

For example, an odometry node may publish estimates of the robot's movement.

A localization node subscribes to those measurements.

The localization node can then combine them with other sensor information.

One topic can have multiple publishers or subscribers, subject to the application's design and communication settings.

What Is a ROS Message Type?

A message type defines the structure of the information being exchanged.

For example, a message may contain a timestamp, coordinate values, or an image.

ROS provides standard message definitions for many common robotics applications.

Developers can also create custom message types.

The publisher and subscriber need compatible message interfaces to exchange information correctly.

ROS Topic vs. ROS Service

Topics use publish-subscribe communication.

Services use request-response communication.

For example, a camera may publish images continuously through a topic.

An application asking a device to return its configuration may use a service.

Topics are not intended to provide an individual response confirming that a requested task was completed.

What Does QoS Mean for ROS Topics?

Quality of Service, or QoS, controls selected communication characteristics.

For example, a sensor topic may use best-effort delivery when receiving the newest data is more important than retransmitting older messages.

Other topics may require reliable delivery or particular message-retention behavior.

Publishers and subscribers must use compatible QoS configurations.

Incorrect settings can prevent communication even when the topic name and message type appear correct.

Why Do ROS Topics Matter?

Robots combine many software components and sensors.

Topics help distribute information between those components through a common interface.

A company developing a new perception system may subscribe to existing camera topics without modifying the camera hardware interface.

This supports modular development and reuse.

Frequently Asked Questions

Can a ROS topic carry images or point clouds?

Yes. ROS provides message definitions suitable for images, point clouds, and other sensor information.

Does a subscriber automatically receive every message?

Not necessarily. Delivery depends on QoS, network conditions, processing capacity, and configuration.

The Bottom Line

ROS topics provide the continuous data channels used by many robotics applications. They help sensors, perception systems, and controllers exchange information through a flexible publish-subscribe architecture.

Sources

  1. ROS 2 — Topics, Services, and Actions

Black Scarab Weekly

Follow the physical AI economy

Get Black Scarab news, deep research, and practical analysis in one clear Thursday briefing.

Weekly reporting and deep dives. Unsubscribe anytime. See our privacy notice.