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

Topic sharing in two different newtworks.

asked 2014-09-04 23:50:31 -0600

enddl22 gravatar image

updated 2014-09-04 23:59:17 -0600

Hello,

I am trying to share a topic between two different networks.

There are three computers and let's call them as PC1,PC2, and PC3. (all are ubuntu and running ROS)

Each PC has the following network settings.

PC1:

wlan0 (obtaining IP from ISP's DHCP) IP: 121.131.88.99

eth0 IP: 192.168.1.1

PC2: eth0 (Static IP address) IP: 192.168.1.30 Gateway: 192.169.1.1

PC3: wlan0 (obtaining IP from ISP's DHCP) IP: 121.131.88.100

For more explanations, I have two network adaptors named: wlan0 and eth0 on PC1.

wlan0 connects to ISP's network (the Internet is connected) and obtain a IP address through ISP's DHCP. (let's say 121.131.88.99)

eth0 is a gateway that has a static IP address (192.168.1.1) and PC2 is connected to PC1 through wired for the Internet sharing. (It works). iptable is properly set up for forwarding from wlan0 to eth0.

ROS master is running on PC2 which has a IP address (192.168.1.30). This machine publish a simple topic such as "/test/topic" with std_msgs/String type.

What I want is that subscribing the topic "/test/topic" from PC3. I can subscribe the topic on PC2 by setting ROS_MASTER_URI to 192.168.1.30 but PC3 can't connect to PC2 since they are belongs to different networks. (192.169.x.x) and (121.131.x.x).

I already attempted ros multimaster_fkie but still couldn't subscribe anything on PC3.

I think I do need some iptable settings from eth0 to wlan0 on PC1 as it done for the Internet sharing (from wlan0 to to eth0).

Any comments on this issue would be appreciate.

Cheers.

PS: I am bit afraid whether the explanation is understandable or deliver my point or not as my network setting environments is messy.

edit retag flag offensive close merge delete

Comments

did you set ROS_IP ?

bvbdort gravatar image bvbdort  ( 2014-09-05 00:15:45 -0600 )edit

Yes, but no success.

enddl22 gravatar image enddl22  ( 2014-09-05 02:05:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-05 01:06:17 -0600

ahendrix gravatar image

ROS does not cross NAT firewalls. You should probably run one ROS master on each network and try to set up some kind of topic forwarding between them.

edit flag offensive delete link more

Comments

Thanks for the comment. Do you know any reference for topic forwarding? I guess you refer to packet forwarding using "iptables". I attempted to forward all packet from PC2 to PC3 by setup iptables rules on PC1. It is possible to send a message using netcat but roscore running on PC3 can't subscirbe.

enddl22 gravatar image enddl22  ( 2014-09-05 02:05:19 -0600 )edit

Hello. I ran into the same problem. Have you solved this?

DufeRob gravatar image DufeRob  ( 2017-05-19 06:18:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-04 23:50:31 -0600

Seen: 740 times

Last updated: Sep 05 '14