I'm working on a multiple robot application and am trying to develop a clean launch file. I have multiple blocks of XML in my launch file that look like...
<group ns="r1">
<include file="$(find mypack)/launch/robot.launch">
<arg name="namespace" value="r1" />
</include>
</group>
I need to pass the namespace to the robot.launch file explicitly (long story). I don't like it that I have to input the "r1" value twice. It would be more pleasing if I could use substitution to assign a value to the namespace argument so that I only had to define the "r1" value once. Something like...
<group ns="r1">
<include file="$(find mypack)/launch/robot.launch">
<arg name="namespace" value="$(arg ns)" />
</include>
</group>
I tried to have an argument before the group tag that I reassigned each time, but that caused errors. Evidently I can't reassign arguments.
Any creative thoughts much appreciated.
Originally posted by BSBingham on ROS Answers with karma: 108 on 2016-03-16
Post score: 3