<launch>

  <arg name="gui" default="true" />

  <include file="$(find jsk_perception)/sample/sample_add_mask_image.launch">
    <arg name="gui" default="false" />
  </include>
  <arg name="MANAGER" value="/sample_manager" />

  <node name="multiply_mask_image"
        pkg="nodelet" type="nodelet"
        args="load jsk_perception/MultiplyMaskImage $(arg MANAGER)"
        respawn="true" >
    <remap from="~input/src1" to="mask_image_generator0/output" />
    <remap from="~input/src2" to="mask_image_generator1/output" />
  </node>

  <group if="$(arg gui)">
    <node name="image_view0"
          pkg="image_view" type="image_view">
      <remap from="image" to="mask_image_generator0/output" />
    </node>
    <node name="image_view1"
          pkg="image_view" type="image_view">
      <remap from="image" to="mask_image_generator1/output" />
    </node>
    <node name="image_view2"
          pkg="image_view" type="image_view">
      <remap from="image" to="multiply_mask_image/output" />
    </node>
  </group>

</launch>
