ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are close, but what should work is the following small change to how you pass an argument tag inside of an include tag:
<launch>
<arg name="Kinect" value="1"/>
<group if="$(arg Kinect)">
<include file="$(find openni_launch)/launch/openni.launch">
<arg name="camera" value="openni"/>
</include>
</group>
</launch>
Also, you can use true
instead of 1
in the value for your Kinect arg, and it is nice when you use default
instead of value
, like they did in openni.launch
, since it makes it easier for launch files that include your launch file to modify the arguments.