<launch>

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

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

  <node name="speak_when_label_found"
        pkg="jsk_perception" type="speak_when_label_found.py">
    <remap from="~input/image" to="image_publisher/output" />
    <remap from="~input/label" to="grid_label/output" />
    <rosparam>
      sound: false
      target_label_names:
        - upper_left
    </rosparam>
    <remap from="~label_names" to="label_image_decomposer_with_names/label_names" />
  </node>

  <group if="$(arg gui)">
    <node name="rostopic_echo"
          pkg="rostopic" type="rostopic"
          args="echo /speak_when_label_found/output/string"
          launch-prefix="xterm -e">
    </node>
  </group>

</launch>
