ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I've found a way and tested it in ROS-Indigo:
The Problem:
the <node>
-tag contains an attribute machine
to set the machine on wich the node should run.
If you want to include a launch-file with the <include>
-tag and in this launchfile are some <node>
-tags, include didn't provide a machine-Attribute for easy passing this information -> so normally only static launchfiles are possible.
Solution
Pass the machine with an argument through the
<include>
-tag!
Here my version:
<include file=/path/to/my/launchfile.launch>
<arg name="machine" value="the_machine" />
</include>
and here the launchfile.launch:
<launch>
<arg name="machine" />
<node pkg="mypkg" name="mypkgname" machine="$(arg machine)">
</node>
</launch>
Arguments are discribed here