Starting different nodes on different machines
Description: This will show you how to easily start different nodes on different machines.Tutorial Level: BEGINNER
Introduction
You first need to have ROS installed on each computers you want to use, as well as the relevant stacks.
Defining the machines
You can manage which nodes are running on which computers in the roslaunch file. The different machines are defined in the sr_object_manipulation_launch/machines/*.machine files.
Here is an example of a machine file.
1 <launch>
2 <machine name="dataprocessing" address="napoleon" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true" />
3 </launch>
In this example:
name="dataprocessing" is the name under which the machine is then called in the launch files. In theory this doesn't need to be modified.
address="napoleon" is the hostname of the computer, you should modify this to reflect your network setup. You also need to make sure you can ssh from one computer to another without having to type a password, for this use ssh-copy-id.
Deciding on which machine a node is started
In the launch file, you can then use the machines you defined:
1 <launch>
2 <include file="$(find sr_object_manipulation_launch)/machines/household_database.machine"/>
3
4 <!-- start the database wrapper node -->
5 <node pkg="household_objects_database" name="objects_database_node" type="objects_database_node"
6 respawn="false" output="screen" machine="household_database">
7 </node>
8
9 </launch>
You first import the machine definition file, and then set on which machine the node should be started by specifying the machine parameter.
Strategy
The best configuration to aim for would be to have the hand and arm nodes (the ones controlling the real arm and hand) running on the "embedded" computer, the rest of the nodes should not be running on this real time computer, you can them on the computers you want, just making sure none of them are so overloaded they can't perform anymore. An other sensible rule would be to try to keep the nodes using the point cloud on the same computer. Those nodes are nodelets, so they can work on the point cloud with no copies as long as they are on the same computer.






