Difference between revisions of "Getting Started with ROS on Embedded Systems/User Guide/C++/Topics"

From RidgeRun Developer Connection
Jump to: navigation, search
(Created page with "{{Getting Started with ROS on Embedded Systems/Head|previous=User Guide/C++/Initialization|next=User Guide/C++/Messages|keywords=ROS}} == Introduction == This wiki is based o...")
 
m
Line 19: Line 19:
 
rostopic list
 
rostopic list
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
{{Getting Started with ROS on Embedded Systems/Foot||}}

Revision as of 01:25, 25 February 2022




Previous: User Guide/C++/Initialization Index Next: User Guide/C++/Messages




Introduction

This wiki is based on the following ROS page: http://wiki.ros.org/Topics

Topics are buses that have a name in which nodes can exchange information. This information is normally messages (we will cover them shortly). Different nodes will use multiple different topics to communicate, there is no limit on this. This method of exchanging information decouples the production of the information from its consumption, therefore a node can produce for example images and another node can receive them and process them, this way of receiving is made by using ROS subscribers to a topic, and the method of sending information is made by using ROS publishers to a topic. There is no limit on the amount of subscribers and publishers in a topic, so that the information can have multiple sources of information and it can be processed in multiple different way by many subscribers.

Topics are intended for unidirectional, streaming communication. Nodes that need to perform remote procedure calls, i.e. receive a response to a request, should use services instead. There is also the Parameter Server for maintaining small amounts of state.

Types

Each topic will have a ROS message type assigned to publish. It is not complete necessary to have all publishers using the same type of message on the same topic, but the subscribers will not establish any connection if the message type does not match. This match is performed by computing the MD5 of the msg files used. This check ensures the consistency between the same code bases. We will cover more on the messages section of the guide.

Tools

See current topics:

rostopic list
  Index