Topic sharing in two different newtworks.
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.
did you set
ROS_IP
?Yes, but no success.