<launch>
  <!-- Arguments -->
  <arg name="wheel_radius"      default="0.05"/>
  <arg name="wheel_separation"  default="0.35"/>

  <rosparam file="$(find joint_state_controller)/joint_state_controller.yaml" command="load"/>

  <rosparam file="$(find agv_description)/config/simple_controller.yaml" command="load"/>

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
        <param name="use_sim_time" value="true"/>
    </node>

  <!-- Launch the controller manager with the wheel controller -->
  <node name="controller_manager" pkg="controller_manager" type="spawner"
    respawn="false" output="screen" args="joint_state_controller wheel_left_controller wheel_right_controller">
  </node>

  <!-- Launch the simple controller -->
  <node name="simple_controller_node" pkg="agv_controller" type="simple_controller_node"
    output="screen" respawn="true">
    <param name="wheel_radius"     value="$(arg wheel_radius)"/>
    <param name="wheel_separation" value="$(arg wheel_separation)"/>
  </node>

</launch>