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

ROS Network SetUp

asked 2021-01-06 10:51:01 -0500

adrianabeyta gravatar image

I have a router IP= 192.168.1.1 , A PC IP=192.168.1.2, Magni IP=192.168.1.3, and a Jetson IP = 192.168.1.4

All hosts files on every machine are:

192.168.1.2   adrian 
192.168.1.3   magni
192.168.1.4   jetson

I can ping and shh from all three machines. Magni is running the master and I have the following in all .bashrc's:

PC

export ROS_MASTER_URI=http://magni:11311/
export ROS_IP=192.168.1.2

MAGNI

export ROS_MASTER_URI=http://magni:11311/
export ROS_IP=192.168.1.3

Jetson

export ROS_MASTER_URI=http://magni:11311/
export ROS_IP=192.168.1.4

I run into a problem where when I start a roscore from the Magni it is the correct ROS_MASTER_URI and IP. However, whenever I try to run rostopic list from both the Jetson and PC I get an "ERROR: Unable to communicate with master!" . I have also tried exporting the ROS_HOSTNAME instead of the IP for the Magni but that did not work either. What's confusing is that I can ping and shh into all three. I have also switched out routers as I thought it was an issue but no luck. I was wondering if anyone has encountered this before or you see any red flags in my setup.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-01-06 11:20:50 -0500

gvdhoorn gravatar image

Check whether you have a firewall active.

ICMP (== ping) is nice, but only tells you basic networking is configured. It doesn't mean everything is OK.

edit flag offensive delete link more

Comments

I disabled the firewall and it worked! I realize disabling the firewall is not the safest thing to do. Any suggestions/resources to help with configuring the correct firewall settings?

adrianabeyta gravatar image adrianabeyta  ( 2021-01-06 11:37:30 -0500 )edit

I realize disabling the firewall is not the safest thing to do

seeing as all the IPs you show are local IPs, and you probably have a NAT router between you and the internet, it won't immediately make things completely insecure, but in general: yes, disabling a firewall might not be the best solution.

Any suggestions/resources to help with configuring the correct firewall settings?

unfortunately ROS nodes need quite a few network ports open, and they tend to open random ones (ie: not from a limited subset). Configuring firewalls for such cases is not easy.

gvdhoorn gravatar image gvdhoorn  ( 2021-01-06 11:48:59 -0500 )edit
2

What you could do is configure the firewall to accept all traffic coming from certain hosts. So in this case that would be your adrian, magni and jetson.

Any other traffic would have to be specifically configured.

Still not completely secure, but perhaps better than disabling the firewall completely.

gvdhoorn gravatar image gvdhoorn  ( 2021-01-06 12:17:45 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-01-06 10:51:01 -0500

Seen: 328 times

Last updated: Jan 06 '21