MultipleMachines: cannot work with bi-direction communication

asked 2016-09-19 15:34:46 -0500

demi H gravatar image

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/Mul... , and I've already check whether there is misspelled topic or not.

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

edit retag flag offensive close merge delete

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.)

Mark Rose gravatar image Mark Rose  ( 2016-09-19 17:00:05 -0500 )edit

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.

Mark Rose gravatar image Mark Rose  ( 2016-09-19 17:00:51 -0500 )edit

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

lieberrhl gravatar image lieberrhl  ( 2017-03-04 15:38:50 -0500 )edit