<launch>
  <arg name="map_file" default="" doc="Path to a map .yaml file (required)." />
  <arg name="empty_file" default="" doc="Path to a map .yaml file (required)." />
  <arg name="virtual_walls_map_file" default="$(arg map_file)" doc="Path to a virtual walls map .yaml file (optional)." />
  <arg name="with_virtual_walls" default="true" />
  <arg name="preferred_zones_map_file" default="$(arg empty_file)" doc="Path to a preferred zones .yaml file (optional)." />
  <arg name="with_preferred_zones" default="true" />
  <arg name="unpreferred_zones_map_file" default="$(arg empty_file)" doc="Path to a unpreferred zones .yaml file (optional)." />
  <arg name="with_unpreferred_zones" default="true" />
  <arg name="critical_zones_map_file" default="$(arg empty_file)" doc="Path to a critical zones .yaml file (optional)." />
  <arg name="with_critical_zones" default="true" />
  <arg name="direction_zones_map_file" default="$(arg empty_file)" doc="Path to a direction zones .yaml file (optional)." />
  <arg name="with_direction_zones" default="true" />

  <node name="static_map_server" pkg="map_server" type="map_server" args="$(arg map_file)" ns="/" output="screen">
    <param name="frame_id" type="string" value="map"/>
    <param name="type" type="int" value="8"/>
  </node>

  <node if="$(arg with_virtual_walls)" name="virtual_walls_map_server" pkg="map_server" type="map_server" args="$(arg virtual_walls_map_file)" ns="/virtual_walls" output="screen">
    <param name="frame_id" type="string" value="map"/>
    <param name="type" type="int" value="8"/>
  </node>

  <node if="$(arg with_preferred_zones)" name="preferred_zones_map_server" pkg="map_server" type="map_server" args="$(arg preferred_zones_map_file)" ns="/preferred_zones" output="screen">
    <param name="frame_id" type="string" value="map"/>
    <param name="type" type="int" value="8"/>
  </node>

  <node if="$(arg with_unpreferred_zones)" name="unpreferred_zones_map_server" pkg="map_server" type="map_server" args="$(arg unpreferred_zones_map_file)" ns="/unpreferred_zones" output="screen">
    <param name="frame_id" type="string" value="map"/>
    <param name="type" type="int" value="8"/>
  </node>

  <node if="$(arg with_critical_zones)" name="critical_zones_map_server" pkg="map_server" type="map_server" args="$(arg critical_zones_map_file)" ns="/critical_zones" output="screen">
    <param name="frame_id" type="string" value="map"/>
    <param name="type" type="int" value="8"/>
  </node>

  <node if="$(arg with_direction_zones)" name="direction_zones_map_server" pkg="map_server" type="map_server" args="$(arg direction_zones_map_file)" ns="/direction_zones" output="screen">
    <param name="frame_id" type="string" value="map"/>
    <param name="type" type="int" value="32"/>
  </node>
</launch>
