ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ros running on 2 machines, one master, subscriber not getting any message

asked 2017-02-20 07:54:35 -0600

highWaters gravatar image

Hello,

I have the following configuration with two machines running on Ubuntu: On one machine I run the ros master, and a listener (tutorial one)

On the other I have a talker (again from the tutorial). I set the ROS_MASTER_URI as specified in http://wiki.ros.org/ROS/Tutorials/Mul... . I am able to ping between the machines, and use netcat to send msgs back and forth from the command lines. I have allowed port 11311 with ufw.

If I run the talker, the listener doesn't get any message. If I run rqt_graph it shows the nodes and the topic on which they publish/subscribe. The listener node's color is in red, and nothing changes if I hover on it.

Any idea for what could be the issue?

edit retag flag offensive close merge delete

Comments

It's likely that you don't have your ROS environment variables setup correctly. Please edit your question to describe the exact values for ROS_MASTER_URI, ROS_HOSTNAME, and ROS_IP on both machines.

jarvisschultz gravatar image jarvisschultz  ( 2017-02-20 10:03:22 -0600 )edit

If you are using HOSTNAME, you need to have consistent /etc/hosts files on both machines

dcconner gravatar image dcconner  ( 2017-02-20 10:04:32 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-02-20 10:15:18 -0600

highWaters gravatar image

Disabling ufw completely solved the problem. The weird thing is that, this was working once without the need to disable ufw.

edit flag offensive delete link more

Comments

1

You can simply allow traffic in your LAN, no need to deactivate ufw completely.

$ sudo ufw allow from 192.168.178.0/24

arminf82 gravatar image arminf82  ( 2019-09-07 05:15:27 -0600 )edit
0

answered 2017-02-21 11:44:15 -0600

duck-development gravatar image

You have to open all ports on the subscriber not only the ros core port. Run the both nodes and see the ports with

 netstat -tulpen
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-02-20 07:54:35 -0600

Seen: 1,130 times

Last updated: Feb 21 '17