<launch>
  <arg name="model" default="$(find wpb_home_bringup)/urdf/wpb_home_mani.urdf"/>
  <param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
  <arg name="gui" default="true" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
  
  <!-- Run gmapping -->
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping">
    <param name="base_frame" value="base_footprint"/>
  </node>

  <!-- Run wpb_home core -->
  <node pkg="wpb_home_bringup" type="wpb_home_core" name="wpb_home_core" output="screen">
    <param name="serial_port" type="string" value="/dev/ftdi"/>
    <rosparam file="$(find wpb_home_bringup)/config/wpb_home.yaml" command="load" /> 
  </node>

  <!--- Run Rplidar -->
  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
    <param name="serial_port"         type="string" value="/dev/rplidar"/>  
    <param name="serial_baudrate"     type="int"    value="115200"/>
    <param name="frame_id"            type="string" value="laser"/>
    <param name="inverted"            type="bool"   value="false"/>
    <param name="angle_compensate"    type="bool"   value="true"/>
    <remap from="scan" to="scan_raw"/>
  </node>
    
  <!-- Run lidar filter -->
  <node pkg="wpb_home_bringup" type="wpb_home_lidar_filter" name="wpb_home_lidar_filter">
    <param name="pub_topic" value="/scan"/>
  </node>

</launch>