Robotics StackExchange | Archived questions

MultipleMachines: cannot work with bi-direction communication

I have 2 robots, robot1(named hal) and robot2(named marvin), and I want to them to communicate.

I set every IP and hostname. robot1 can ping to itself and robot2 by their name(not IP). Also, robot2 can ping to itself and robot1 by their name. Of course, ssh between them works fine.

But there is a problem when they communicate. I'm using publisher-subscriber communicate model, and roscore is run in robot1.

When robot1 publish and robot2 subscribe message, it works fine. But when robot2 publish and robot1 subscribe message a callback function of robot1 isn't called. In 2nd case, publisher's getNumSubscribers always returns 0.

I followed this link : http://wiki.ros.org/ROS/Tutorials/MultipleMachines, and I've already check whether there is misspelled topic or not.

Is there any possibility that this problem is related to firewalls?

Asked by demi H on 2016-09-19 15:34:46 UTC

Comments

Are both robots on the same network or network strand? (Same wireless access point, for example.) Are there any messages in the log showing a problem with subscription on robot1? (For example, it's possible that robot2 is publishing a different type than robot1 is subscribing to.)

Asked by Mark Rose on 2016-09-19 17:00:05 UTC

Also run rostopic list to see that there are not too different topics, one which robot2 is publishing and another, similar one that robot1 is subscribed to. You might also find roswtf gives you some info.

Asked by Mark Rose on 2016-09-19 17:00:51 UTC

I have the same issue. Have you already figured out the solution?

Asked by lieberrhl on 2017-03-04 16:38:50 UTC

Answers