Foreign Relay Spams Topic
I have two ROS masters running on the same machine (on different ports) that I want to publish/subscribe a topic between one another. I've been using Foreign Relays for this purpose, since I've successfully used them to communicate between robots on different machines. However, whenever I run my relay and publish once to it on master A, the receiving topic on master B gets spammed with that one message at a rate of approximately 40,000Hz. These are the same parameters I've used in the launch files in packages where foreign relays work as expected, so I'm not sure why they are behaving differently as the only difference is that they're communicating on the same computer.
Master A's .launch file:
<launch>
<node name="generic_msg_foreign_relay" pkg="foreign_relay" type="foreign_relay"
args="adv http: //localhost:11311 /test /test" respawn="true"/>
</launch>
Master B's .launch file:
<launch>
<node name="respond_to_test_topic" pkg="testing"
type="test_topic_node.py" output="screen" respawn="true"/>
</launch>
And to publish I've just manually done rostopic pub /test std_msgs/String 'testing'
once (no change with the -1
argument either).
I have not yet looked into Multimaster because I was hoping to not have to use any new packages (and foreign relay seems more customizable in terms of declaring the masters on startup), but if that's the only solution it'll have to do. However I'd like to know first if anyone can reproduce what I'm seeing, and if anyone has an idea what the problem might be?
Thanks!