global_costmap:
  global_costmap:
    ros__parameters:
      use_sim_time: True
      #footprint: "[[-0.6, -0.4], [0.6, -0.4], [0.6, 0.4], [-0.6, 0.4]]"
      robot_radius: 0.22
      global_frame: map
      robot_base_frame: body
      update_frequency: 5.0
      rolling_window: False
      resolution: 0.05
      plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
      obstacle_layer:
        plugin: "nav2_costmap_2d::ObstacleLayer"
        enabled: True
        min_obstacle_height: -5.0
        max_obstacle_height: 5.0
        observation_sources: vlp_16_laserscan #vlp_16_laserscan        # vlp_16
        vlp_16_laserscan:
            sensor_frame: velodyne
            data_type: LaserScan
            topic: /scan
            marking: True
            clearing: True
            min_obstacle_height: -4.0
            max_obstacle_height: 4.0
            inf_is_valid: True
            obstacle_max_range: 4.0
            obstacle_min_range: 0.0
            raytrace_max_range: 5.0
            raytrace_min_range: 0.0
            expected_update_rate: 0.0
        vlp_16:
            sensor_frame: velodyne
            data_type: PointCloud2
            topic: /scan/points
            marking: True
            clearing: True
            min_obstacle_height: -4.0
            max_obstacle_height: 4.0
            expected_update_rate: 0.0
            inf_is_valid: True
            obstacle_max_range: 4.0
            obstacle_min_range: 0.0
            raytrace_max_range: 5.0
            raytrace_min_range: 0.0
      inflation_layer:
        plugin: "nav2_costmap_2d::InflationLayer"
        inflation_radius: 0.2        # 0.5
        cost_scaling_factor: 2.0        # 8.0
      static_layer:
        plugin: "nav2_costmap_2d::StaticLayer"
        map_subscribe_transient_local: True

local_costmap:
  local_costmap:
    ros__parameters:
      use_sim_time: True
      #footprint: "[[-0.6, -0.4], [0.6, -0.4], [0.6, 0.4], [-0.6, 0.4]]"
      robot_radius: 0.22
      footprint_padding: 0.0
      global_frame: map
      robot_base_frame: body
      update_frequency: 5.0
      publish_frequency: 2.0
      rolling_window: True
      width: 10
      height: 10
      resolution: 0.05
      transform_tolerance: 2.0
      plugins: ["obstacle_layer", "inflation_layer"]
      obstacle_layer:
        plugin: "nav2_costmap_2d::ObstacleLayer"
        enabled: True
        min_obstacle_height: -5.0
        max_obstacle_height: 5.0
        #observation_sources: fusion_lasercan        # fusion_lasercan #vlp_16_laserscan #vlp_16
        observation_sources: vlp_16_laserscan       # fusion_lasercan #vlp_16_laserscan #vlp_16
        fusion_lasercan:
            sensor_frame: body
            data_type: LaserScan
            topic: /scan
            marking: True
            clearing: True
            min_obstacle_height: -2.0
            max_obstacle_height: 2.0
            inf_is_valid: True
            obstacle_max_range: 4.0
            obstacle_min_range: 0.0
            raytrace_max_range: 5.0
            raytrace_min_range: 0.0
        vlp_16_laserscan:
            sensor_frame: velodyne
            data_type: LaserScan
            topic: /scan
            marking: True
            clearing: True
            min_obstacle_height: -4.0
            max_obstacle_height: 4.0
            expected_update_rate: 0.0
            inf_is_valid: True
            obstacle_max_range: 4.0
            obstacle_min_range: 0.0
            raytrace_max_range: 5.0
            raytrace_min_range: 0.0
        vlp_16:
            sensor_frame: velodyne
            data_type: PointCloud2
            topic: /scan/points
            marking: True
            clearing: True
            min_obstacle_height: -4.0
            max_obstacle_height: 4.0
            expected_update_rate: 0.0
            obstacle_max_range: 2.5
            obstacle_min_range: 0.0
            raytrace_max_range: 3.0
            raytrace_min_range: 0.0
      inflation_layer:
        plugin: "nav2_costmap_2d::InflationLayer"
        inflation_radius: 0.2        # 0.5
        cost_scaling_factor: 2.0        # 8.0