ROS network
- one ROS master in the entire network
- all nodes must use the same ROS master (
ROS_MASTER_URI) - two-way connection between devices
- each device must present itself with a name that other devices recognize
http://wiki.ros.org/ROS/Tutorials/MultipleMachines
http://wiki.ros.org/ROS/NetworkSetup
Connection
ping the remote computer (hostname: IP or name)
Use ssh to connect to remote computer and ping your computer
ROS_MASTER_URI
ROS master is set with variable ROS_MASTER_URI. It needs to be set withing each terminal.
Set parameter ROS_IP for IP or ROS_HOSTNAMEfor hostname if you have multiple addresses for a computer and need to force ROS to a particular one.
To do this automatically, add command to bashrc
ATTENTION!
This can cause a problem, it you would like to run ROS master on the local computer.
Test connection
It is important to test connection in both ways:
- master (publisher) >>> others (subscriber)
- master (subscribers) <<< others (publisher)
Publisher:
Subscriber:
Exercise
Connect to master computer with Sick Nanoscan3 and connect to topic /sick_safetyscanners/scan.