How to set the IP for web, PC and robot in different network

asked 2016-03-29 20:44:44 -0500

MOMO gravatar image

Hi there, I was trying to set the IP between the web, PC(master) and robot(raspberry pi 2). Both PC and robot has ROS sys. PC and robot is connected by Ethernet, and the IP address is 192.168.0.2(PC) & 192.168.0.1(pi 2). Now I need to use web or smartphone to send some command by using WiFi(192.168.1.x) I don't want to set the robot IP to WiFi environment (192.168.1.x) because the WiFi speed for raspberry pi 2 is slow in our environment, the motor encoder data will not correct. I want to set the PC IP address to two channel. One is 192.168.0.2(to raspberry pi 2) and other one is 192.168.1.89(to Web)

The ROS environment setting on PC is

ROS_MASTER_URI=http://192.168.0.2:11311
ROS_IP = http://192.168.0.2

and the ROS environment setting on Robot (raspberry pi 2) is

ROS_MASTER_URI=http://192.168.0.2:11311
ROS_IP = http://192.168.0.1

and the ROS environment setting on WEB is

ROS_MASTER_URI=http://192.168.1.89:11311

Is there any way to set the PC IP in different network environment? Like below pic

image description

Thanks a lot !!! Any help is appreciated :)

edit retag flag offensive close merge delete

Comments

Am I right to say that you want to send/read data to the robot via the PC (which has 2 interfaces) from another device in the same WIFI network? The picture is abit confusing by the way.

DavidN gravatar image DavidN  ( 2016-03-29 22:27:43 -0500 )edit

Hi DavidN, I want to send data from Web to PC via WiFi, and PC will send/read data to the robot via Ethernet. The robot won't connect to WiFi.

MOMO gravatar image MOMO  ( 2016-03-30 00:21:25 -0500 )edit

I think you will need to take a look at how to let multi machine communicate over Internet ( http://answers.ros.org/question/42503... ) and also how to do multi master ( http://wiki.ros.org/multimaster_fkie/... )

DavidN gravatar image DavidN  ( 2016-03-30 01:09:54 -0500 )edit

DavidN, thanks for your infomation.

MOMO gravatar image MOMO  ( 2016-03-31 22:02:17 -0500 )edit