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

Revision history [back]

click to hide/show revision 1
initial version

Hi Maxime,

I'm subscribing on /telemetry & publishing the SAME message back

Though you're publishing the same message you received, you're actually publishing a "new" message.

As Node_2 is subscribing and publishing in the same topic, the message are going back and forth inside the node.

There's a [ignore_local_publication]https://github.com/ros2/rmw/blob/343de2ad1edf293522ef3e42b07dce6d088081f7/rmw/include/rmw/types.h#L142) option, but that flag was always ignored in rmw_fastrtps. So, yes you're going to receive the same message you published back and forth.

How do I make Node_2 not sending back to himself the message transferred ? I thought messages were not received twice so I assumed it would work. Seems like not.

I would recommend using a different topic.

Node_1 & Node_2 are in Network_A. Node_2 & Node_3 are in Network_B.

Are you sure Node_3 isn't receiving messages from Node_1 directly? In the case the answer is no, is Node_3 receiving messages from Node_2? I don't recall how FastRTPS handled multiple network interfaces.

Best, Ivan