<launch>

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

  <include file="$(find jsk_perception)/sample/include/play_rosbag_mask_rcnn_73b2_kitchen.xml" >
    <arg name="use_japanese_label" value="$(arg use_japanese_label)" />
  </include>
  <arg name="INPUT_IMAGE" default="image_publisher/output" />

  <node name="draw_rects"
        pkg="jsk_perception" type="draw_rects.py"
        output="screen"
        clear_params="true" >
    <remap from="~input" to="$(arg INPUT_IMAGE)" />
    <remap from="~input/rects" to="mask_rcnn_73b2_kitchen/output/rects" />
    <rosparam subst_value="true">
      use_classification_result: false
      label_size: 16
    </rosparam>
  </node>

  <node name="draw_rects_with_classification_result"
        pkg="jsk_perception" type="draw_rects.py"
        output="screen"
        clear_params="true" >
    <remap from="~input" to="$(arg INPUT_IMAGE)" />
    <remap from="~input/rects" to="mask_rcnn_73b2_kitchen/output/rects" />
    <remap from="~input/class" to="mask_rcnn_73b2_kitchen/output/class" />
    <rosparam subst_value="true">
      font_path: $(find jsk_recognition_utils)/font_data/NotoSansJP-Regular.otf
      use_classification_result: true
      label_size: 16
    </rosparam>
  </node>

  <group if="$(arg gui)" >
    <node name="image_view00"
          pkg="image_view" type="image_view">
      <remap from="image" to="draw_rects/output" />
    </node>
    <node name="image_view01"
          pkg="image_view" type="image_view">
      <remap from="image" to="draw_rects_with_classification_result/output" />
    </node>
  </group>

</launch>
