Multiple masters publishing, one listener subscribing
I have a ROS-kinetic system with many robots, each operating under their own ROS master as they need to be able to act independently.
I want to build a Widget that can listen to each robot master's published topics (say /position) so it can synthesize a result that it can publish which will then be subscribed to by a single robot (say /synthesis).
I made a drawing:
The ROS networking is working fine but, how do I get data collected at my Widget?
I looked at multimasterfkie, topicproxy, and rocongateway but I don't have full access over the robots so installing things there may get difficult. The foreignrelay package seemed good but it isn't supported in kinetic and I'm the sort to worry about those sorts of things.
I think I can echo each position to a bag via:
export ROS_MASTER_URI=http://robot1:11311
rostopic echo -b robot1_position.bag /position &
export ROS_MASTER_URI=http://robot2:11311
rostopic echo -b robot2_positio.bag /position &
I could then read the bag, do what I need to do and publish to the robot getting the bonus information. However, involving bags seems messy (and likely adds latency to my system). I'm using rospy to generate the /synthesis.
I was hoping topic_tools relay would do this but I couldn't figure out how.
Any advice, better ideas, or (even better) an easy package that would do this for me?
Asked by Elecia on 2018-10-18 14:06:04 UTC
Comments
You should be able to build foreign_relay from source on kinetic; the APIs that it uses haven't changed.
Asked by ahendrix on 2018-10-18 14:30:20 UTC
foreign_Relay works fine on kinetic, I have tried it on kinetic .Just check if you have updated /etc/hosts file with the ip's.it should work.
Asked by jithinreju@gmail.com on 2018-12-24 13:27:33 UTC