.. _MapServer: MapServer ========= .. cpp:namespace:: pilot::MapServer Module ------ The `MapServer` module handles all grid maps (see :ref:`GridMap`) and road maps (see :ref:`RoadMap`) that are uploaded to the platform. All uploaded maps are stored in a storage an can be retrieved at any time. Additionally, the currently active grid map and road map are remembered across restarts. Maps are identified using a :ref:`pilot.map_info_t` object. Some functions require permissions ``pilot.permission_e.CHANGE_GRIDMAP`` or ``pilot.permission_e.CHANGE_ROADMAP``, see :ref:`pilot.permission_e`. Functions --------- .. cpp:function:: OccupancyMapData* get_grid_map() const Returns the currently active grid map. .. cpp:function:: RoadMapData* get_road_map() const Returns the currently active road map. .. cpp:function:: void set_grid_map(OccupancyMapData* map) Uploads a grid map to the map storage and immediately uses it for navigation. Requires permission ``permission_e.CHANGE_GRIDMAP``. .. cpp:function:: void switch_grid_map(map_info_t map_info) Switches the current grid map for a different one from the map storage. Requires permission ``permission_e.CHANGE_GRIDMAP``. .. cpp:function:: OccupancyMapData *download_grid_map(map_info_t map_info) const Returns the grid map identified by the ``map_info`` from the map storage. .. cpp:function:: void delete_grid_map(map_info_t map_info) Deletes the given grid map from the map storage. If the map is the currently active map, it stays active. .. cpp:function:: vector get_grid_maps_info() const Returns a list of all grid maps present in the map storage. .. cpp:function:: void set_road_map(RoadMapData* map) Uploads a road map to the map storage and immediately uses it for navigation. Requires permission ``permission_e.CHANGE_ROADMAP``. .. cpp:function:: void switch_road_map(map_info_t map_info) Switches the current road map for a different one from the map storage. Requires .ermission ``permission_e.CHANGE_ROADMAP``. .. cpp:function:: RoadMapData *download_road_map(map_info_t map_info) const Returns the road map identified by the ``map_info`` from the map storage. .. cpp:function:: void delete_road_map(map_info_t map_info) Deletes the given road map from tche map storage. If the map is the currently active map, it stays active. .. cpp:function:: vector get_road_maps_info() const Returns a list of all road maps present in the map storage.