ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Names of topics

asked 2020-11-17 04:14:51 -0500

Kansai gravatar image

Beginners question about topics:

When doing a rostopic list for example I found topics such as:

/acme_interface/my_component/sensor_image

What is "acme_interface" or "my_component" or "sensor_image"?
Is all the string considered the name of the topic, or do these elements denote a different thing? (like namespaces or something?)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-11-17 05:37:57 -0500

In a way, all of the string is considered the name of that topic. So for example if you would want to querry what is published on that topic you would do:

rostopic echo /acme_interface/my_component/sensor_image

So in order to reference this topic anywhere, may it be in code or just in console you need that full string to refer it. Now, about each component of that string, it usually goes like this: the first component is usually the name you have given to a namespace that includes the node that is publishing the topic. Same goes for the second component of the string...it is the specific node that publishes the topic...and the third component, you can look at that as the actual topic name (good to remember if you are looking after a specific topic). But still, whenever you want to reference that topic, you need the full string.

To get more info about this topic or any other topic you can also run:

rostopic info <topic_string>

Hope this answer helped you somehow! :)

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-11-17 04:14:51 -0500

Seen: 427 times

Last updated: Nov 17 '20