<launch>
  <arg name="gui" default="true" doc="set false if you do not want to display window" />
  <arg name="use_usb_cam" default="false" doc="set true to use USB camera image as input"/>
  <arg name="attributes" default="ALL" doc="set either ALL or DEFAULT for returning attributes"/>
  <arg name="always_publish" default="true" doc="set false not to publish result when face is not detected" />

  <node name="usb_cam" pkg="usb_cam" type="usb_cam_node"
        if="$(arg use_usb_cam)" >
    <remap from="/usb_cam/image_raw" to="/camera/rgb/image_raw" />
  </node>

  <include file="$(find jsk_perception)/sample/include/play_rosbag_people.xml"
           unless="$(arg use_usb_cam)" />

  <!-- aws_detect_faces.py -->
  <node name="aws_detect_faces"
        pkg="jsk_perception" type="aws_detect_faces.py"
        output="screen"
        clear_params="true" >
    <remap from="image" to="/camera/rgb/image_raw" />
    <rosparam subst_value="true">
      use_window: $(arg gui)
      aws_credentials_path: /tmp/aws.json
      always_subscribe: true
      always_publish: $(arg always_publish)
      attributes: $(arg attributes)
    </rosparam>
  </node>

  <!-- <node pkg="rqt_reconfigure" type="rqt_reconfigure" name="rqt_reconfigure" if="$(arg gui)" /> -->

</launch>
