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

Is it possible to subscribe and publish same topic in a node?

asked 2021-03-04 02:17:16 -0500

munhoney gravatar image

Hi,

I want to publish and subscribe same topic in a node.

Is it possbile?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-03-05 00:54:49 -0500

loguna gravatar image

updated 2021-03-05 00:56:11 -0500

Technically yes is possible.

The example: A chatter node is publishing and subscribing to a "talker" topic

But the question is why will you do that? image description

edit flag offensive delete link more

Comments

I have a usecase where a received message needs to be echoed back. So I publish the received message on a topic that is being subscribed by the current node.

crnewton gravatar image crnewton  ( 2021-03-05 07:01:48 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-03-04 02:17:16 -0500

Seen: 230 times

Last updated: Mar 05 '21