<?xml version="1.0"?>

<launch>

  <include file="$(find hector_mapping)/launch/mapping_default.launch">
    <arg name="base_frame" value="base_link"/>
    <arg name="odom_frame" value="wheelodom"/>
    <arg name="pub_map_odom_transform" value="true"/>

    <!-- Topic names -->
    <arg name="scan_topic" value="/sick_s300/scan_unfiltered" />
  </include>

  <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
    <param name="target_frame_name" type="string" value="/map" />
    <param name="source_frame_name" type="string" value="/base_link" />
    <param name="trajectory_update_rate" type="double" value="4" />
    <param name="trajectory_publish_rate" type="double" value="0.25" />
  </node>

  <node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
    <remap from="map" to="/dynamic_map" />
    <param name="map_file_path" type="string" value="$(find hector_geotiff)/maps" />
    <param name="map_file_base_name" type="string" value="hector_slam_map" />
    <param name="geotiff_save_period" type="double" value="60" />
    <param name="draw_background_checkerboard" type="bool" value="true" />
    <param name="draw_free_space_grid" type="bool" value="true" />
  </node>

  <node pkg="topic_tools" type="throttle" name="map_throttle" args="messages map 0.015 map_thottled" />

</launch>
