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

where is a topic located?

asked 2022-12-09 16:33:39 -0500

therandom gravatar image

is a topic located in a file somewhere or where is it actually located?

I know you can echo a topic and subscribe to it and publish to it. Still, the layers of abstraction make me question where it actually is located and what publishing and subscribing to it actually does.

is it some kind of in-process buffer that can be found by listening to some process id?

this is a question of genuine curiosity, I have been searching around and all I can find is just the regular tutorial on how to use topics.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-12-12 15:02:50 -0500

gvdhoorn gravatar image

A related question has come up before, but quite some time ago. See #q203129 (or: "ROS Nodes and topics - are nodes really decoupled?").

I would give a similar answer to this question: topics don't really exist. They are a convenient key or identifier which can be used to make matches between publishers and subscribers, which then setup direct connections between them (this is the same in both ROS 1 and ROS 2). There's no central buffer somewhere which is known under that particular name -- or at least, not in ROS 1 nor in ROS 2, as those implement publish-subscribe systems without central brokers (see also this recent Discourse discussion).

Message data is then directly exchanged between the two involved parties. Two, as there's always one sender and one receiver in this setup. Even for "one-to-many" configurations, data is still exchanged directly, so one sender would send message data to N receivers, over N connections.

is it some kind of in-process buffer [..]

Message data is certainly stored in buffers, yes.

that can be found by listening to some process id?

I'm not sure what you mean by this. The buffers would exist as part of the process that's using ROS middleware to communicate with other processes (ie: ROS nodes).

is a topic located in a file somewhere or where is it actually located?

if a topic exists anywhere, I would say you could perhaps consider the combination of the buffers in all the participating (ie: publishing and subscribing) processes / nodes. But it's a bit of a stretch.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2022-12-09 16:33:39 -0500

Seen: 36 times

Last updated: Dec 12 '22