Robotics StackExchange | Archived questions

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

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 :)

Asked by MOMO on 2016-03-29 20:44:44 UTC

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.

Asked by DavidN on 2016-03-29 22:27:43 UTC

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.

Asked by MOMO on 2016-03-30 00:21:25 UTC

I think you will need to take a look at how to let multi machine communicate over Internet (http://answers.ros.org/question/42503/multi-machine-communication-through-internet/) and also how to do multi master (http://wiki.ros.org/multimaster_fkie/Tutorials/Setup%20a%20ROS%20master%20synchronization)

Asked by DavidN on 2016-03-30 01:09:54 UTC

DavidN, thanks for your infomation.

Asked by MOMO on 2016-03-31 22:02:17 UTC

Answers