Instead of doing a TCP-spaghetti system, you can use the basics of ROS for message exchanges.
The master runs "roscore" and his "master node" , while each slave connect to the "roscore" running on the master by simply setting the ROS_MASTER_URI env var, and publishes a "slave node". You only need the IP of the master for initial connection. All the communication between processes and platforms will be handled via roscore, TCP included.
Think of roscore as a message distributor like LaPoste.
Then, every communication uses topics on which you can subscribe and publish. No need for IP configuration or socket handling, everything is handled system-wide via roscore.
So instead of creating a thread that listens on a TCP port, you setup a subscriber on a specific topic name like "/intech/lidar_values" and assign a callback that's going to be called when a message arrives. On the other end, the LIDAR code setups a publisher on "/intech/lidar_values" and does pub.publish(values). No need for server configuration, since ROS is operating system-wide.
Instead of doing a TCP-spaghetti system, you can use the basics of ROS for message exchanges. The master runs "roscore" and his "master node" , while each slave connect to the "roscore" running on the master by simply setting the ROS_MASTER_URI env var, and publishes a "slave node". You only need the IP of the master for initial connection. All the communication between processes and platforms will be handled via roscore, TCP included.
Think of roscore as a message distributor like LaPoste.
Then, every communication uses topics on which you can subscribe and publish. No need for IP configuration or socket handling, everything is handled system-wide via roscore. So instead of creating a thread that listens on a TCP port, you setup a subscriber on a specific topic name like "/intech/lidar_values" and assign a callback that's going to be called when a message arrives. On the other end, the LIDAR code setups a publisher on "/intech/lidar_values" and does pub.publish(values). No need for server configuration, since ROS is operating system-wide.
Check that for more info on ROS topics : http://wiki.ros.org/roscpp/Overview/Publishers%20and%20Subscribers http://wiki.ros.org/ROS/Tutorials/MultipleMachines