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

Publish and subscribe multi topics on the same node through different machines

asked 2021-04-15 02:15:14 -0500

sgttrieu gravatar image

updated 2021-04-22 11:09:04 -0500

miura gravatar image

Hi, This is a common topic and I know some resources talking about it. I just want to know some additional information. This is for ROS communication across multiple machines.

http://wiki.ros.org/ROS/Tutorials/Mul...

They mention in session 4, to establish the communication in the other direction we need to kill the talker and listener, then bring them up on opposite machines. Does it mean one machine can be only either talker and a listener at the time? Can we do both direct at the same time? This is a video about one node publish and subscribe simultaneously.

https://www.youtube.com/watch?v=lR3cK...

If I implement it like that can I use the multiple machines method? In this case, I do not need to think which machine is a listener and which machine is a talker anymore right? My application is a Simulator that connects with autonomous software and I use ROS1.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-15 02:51:24 -0500

Delb gravatar image

They mention in session 4, to establish the communication in the other direction we need to kill the talker and listener,

It's just an example to show that you can launch the nodes on any machine, there is no relation to a machine being "talker" or "listener".

A machine being "talker" just means that it publishes to topic(s) and "listener" just means it subscribes to topic(s). Any ros node can be subscriber (listener) and publisher (talker) at the same time, either susbcribing and publishing to the same or different topics.

The relevant thing in the tutorial you mention is to properly set ROS_MASTER_URI on the different machines to allow communication accross multiple machines.

edit flag offensive delete link more

Comments

I got it thanks

sgttrieu gravatar image sgttrieu  ( 2021-04-22 09:22:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-04-15 02:15:14 -0500

Seen: 397 times

Last updated: Apr 15 '21