Skip to main content

Listed

, home
FREN

Topic (ROS 2)

Definition

A named channel on which ROS 2 nodes publish messages of a given type and to which other nodes subscribe. Publishers and subscribers do not know each other: they share only the name and type of the topic. It is the communication mode suited to continuous streams, such as sensor data or the robot’s state.

Checked on against the references below. · Written with AI · checked against the sources Source: Official ROS 2 documentation (Jazzy), “Topics”.

Concrete examples

The ROS 2 repository for xArm documents its topics with their types: joint_states is of type sensor_msgs::msg::JointState and robot_states of type xarm_msgs::msg::RobotMsg. The one for Stretch 4 suggests ros2 topic echo /joint_states to watch joint state.

What it changes for you

A publisher and a subscriber only exchange data if their quality of service (QoS) profiles are compatible: otherwise, no message goes through. On xArm, some topics are only available if a specific report_type is set at launch.

Not to be confused with

On a topic, all subscribers receive what the publishers publish. A service, by contrast, is a remote procedure call: there should be only one server per service name, any number of clients, and a response expected quickly.

Additional material checked on .

Related terms

References

Back to the glossary