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

Publisher and Subscriber using same node!

asked 2016-03-22 16:05:32 -0600

SarSam gravatar image

updated 2016-03-23 05:34:28 -0600

Can anybody provide me an example for using publisher and subscriber with the same node? I want to publish a topic from node 1 and then subscribe to that topic from node 2 and then publish the subscribed data from node 2 to another topic!

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
3

answered 2016-03-22 16:38:27 -0600

ahendrix gravatar image

This is a pretty frequently asked question, with lots of answers. The first four results that I get on Google all have reasonable answers with examples and discussions of the pros and cons of the various approaches:

edit flag offensive delete link more
6

answered 2018-03-15 18:52:21 -0600

KenLafond gravatar image

The above links didn't help me hardly at all, and I kept tripping across this thread while searching on this topic. Sorry for the very late post, but the below link really helped me out, and I wish I hadn't had to dig so much for it:

Hope it helps someone else out too!

edit flag offensive delete link more
1

answered 2019-08-09 08:01:04 -0600

lochlomond gravatar image

I kind of like this one: https://www.youtube.com/watch?v=lR3cK... Hope this may help

edit flag offensive delete link more

Comments

Please trust this guy. His youtube link helped me!

WangTCU gravatar image WangTCU  ( 2020-10-03 17:03:22 -0600 )edit
0

answered 2022-07-29 02:15:58 -0600

I have wrote a demo using c++, it can be reach in my github, Thank you!

The link is below:

This demo enable subscriber and publisher work together in same node.

github: link text

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-22 15:54:13 -0600

Seen: 29,208 times

Last updated: Aug 09 '19