<launch>

  <include file="$(find pibot_simulator)/launch/bringup_turtlebot.launch"/>

  <param name="use_sim_time" value="false" />

  <!-- Set the name of the map yaml file: can be overridden on the command line. -->
  <arg name="map" default="test_map.yaml" />

  <!-- Run the map server with the desired map -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(find pibot_simulator)/maps/$(arg map)"/>

  <!-- The move_base node -->
  
  <node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen" clear_params="true">
    <rosparam file="$(find pibot_simulator)/params/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find pibot_simulator)/params/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find pibot_simulator)/params/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find pibot_simulator)/params/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find pibot_simulator)/params/dwa_local_planner_params.yaml" command="load" />
    <rosparam file="$(find pibot_simulator)/params/move_base_params.yaml" command="load" />
    <rosparam file="$(find pibot_simulator)/params/global_planner_params.yaml" command="load" />
  </node>

  <!-- Run fake localization compatible with AMCL output -->
  <node pkg="fake_localization" type="fake_localization" name="fake_localization" clear_params="true" output="screen">
     <remap from="base_pose_ground_truth" to="odom" />
     <param name="global_frame_id" value="map" />
     <param name="base_frame_id" value="base_link" />
  </node>

</launch>