<launch>
  <arg name="gui" default="true"/>
  <arg name="launch-prefix" default="xterm -e" if="$(arg gui)" />
  <arg name="launch-prefix" default="" unless="$(arg gui)" />

  <node pkg="jsk_perception" name="random_forest_server" type="random_forest_server.py" clear_params="true">
    <param name="random_forest_train_file" value="$(find jsk_perception)/sample/random_forest_sample_data_x.txt" />
    <param name="random_forest_train_class_file" value="$(find jsk_perception)/sample/random_forest_sample_data_y.txt" />
  </node>

  <node pkg="jsk_perception" name="random_forest_client" type="random_forest_client_sample.py" launch-prefix="$(arg launch-prefix)"/>

  <group if="$(arg gui)">
    <node pkg="image_view" name="image_view_random_forest_output" type="image_view">
      <remap from="image" to="random_forest_client/output/debug_image"/>
    </node>
  </group>
</launch>
