<launch>

  <node name="image_publisher"
        pkg="jsk_perception" type="image_publisher.py">
    <rosparam subst_value="true">
      file_name: $(find jsk_perception)/sample/object_detection_example_1.jpg
      encoding: bgr8
      publish_info: false
    </rosparam>
  </node>
  <arg name="INPUT_IMAGE" default="image_publisher/output" />
  <arg name="MANAGER" value="sample_manager" />
  <node name="$(arg MANAGER)"
        pkg="nodelet" type="nodelet"
        args="manager"/>

  <node name="selective_search"
        pkg="jsk_perception" type="selective_search.py">
    <remap from="~input" to="$(arg INPUT_IMAGE)" />
  </node>

  <node name="draw_rects"
        pkg="nodelet" type="nodelet"
        args="load jsk_perception/DrawRects $(arg MANAGER)"
        respawn="true" >
    <remap from="~input" to="$(arg INPUT_IMAGE)" />
    <remap from="~input/rects" to="selective_search/output" />
  </node>

  <node name="image_view"
        pkg="image_view" type="image_view">
    <remap from="image" to="draw_rects/output" />
  </node>

</launch>
