ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Help with foreign_relay subscription

asked 2012-04-16 09:54:44 -0500


I'm having difficulties using foreign_relay. I find that I can use it in advertise mode, to push a topic from my local master to the remote master, ie:

rosrun foreign_relay foreign_relay adv http://other-machine:11311/ /from_other/test /test

However, I can't seem to get it working in subscribe mode, ie:

rosrun foreign_relay foreign_relay sub http://other-machine:11311/ /test /from_other/test

By adding some debug shouts, I can see that the foreign_subscribe() function completes successfully, but in_cb() never gets called and the /from_other/test topic is never created on my local master.

In all cases, I am able to set my ROS_MASTER_URI to the other machine and publish/subscribe with the foreign master using rostopic. So I believe that indicates that my network and environment setup is correct. I can even successfully get a remote subscription by doing this:

export ROS_MASTER_URI=http://other-machine:11311
rosrun foreign_relay foreign_relay adv http://my-machine.local:11311 /other/test /test

This seems like a really awkward hack, though.

Has anyone else had luck getting bidirectional foreign relay working?

I'm using ROS Electric, with the current apt version of multimaster_experimental on a Lucid box, and the current source (r16648) on an Oneiric box. The apt packaged version does not work on my Oneiric machine due to a shared library mismatch issue.

edit retag flag offensive close merge delete


Oh wow, thanks. This seems much more complete and polished than multimaster_experimental. I've added a note to the foreign_relay page directing visitors on to multimaster.

mikepurvis gravatar image mikepurvis  ( 2012-04-18 08:55:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-17 20:12:03 -0500

weiin gravatar image

Not exactly an answer, but I find the multimaster easier to use in publishing/subscribing on another master. It's bidirectional and only the config file requires updating.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-04-16 09:54:44 -0500

Seen: 485 times

Last updated: Apr 16 '12