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

  <node name="image_publisher"
        pkg="jsk_perception" type="image_publisher.py">
    <rosparam subst_value="true">
      file_name: $(find jsk_perception)/sample/circles.png
    </rosparam>
  </node>
  <arg name="INPUT_IMAGE" default="image_publisher/output" />

  <node name="hsv_decomposer"
        pkg="nodelet" type="nodelet"
        args="standalone jsk_perception/HSVDecomposer">
    <remap from="~input" to="$(arg INPUT_IMAGE)"/>
  </node>

  <group if="$(arg gui)">
    <node name="tile_image"
          pkg="jsk_perception" type="tile_image.py">
      <rosparam>
        input_topics:
          - /image_publisher/output
          - /hsv_decomposer/output/hue
          - /hsv_decomposer/output/saturation
          - /hsv_decomposer/output/value
        draw_topic_name: true
        font_scale: 1.0
      </rosparam>
    </node>

    <node name="image_view"
          pkg="image_view" type="image_view">
      <remap from="image" to="tile_image/output"/>
    </node>
  </group>
</launch>
