MapServer

Module

The MapServer module handles all grid maps (see Grid Map) and road maps (see Road Map) 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 pilot.map_info_t object.

Some functions require permissions pilot.permission_e.CHANGE_GRIDMAP or pilot.permission_e.CHANGE_ROADMAP, see pilot.permission_e.

Functions

OccupancyMapData *get_grid_map() const

Returns the currently active grid map.

RoadMapData *get_road_map() const

Returns the currently active road map.

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.

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.

OccupancyMapData *download_grid_map(map_info_t map_info) const

Returns the grid map identified by the map_info from the map storage.

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.

vector<map_info_t> get_grid_maps_info() const

Returns a list of all grid maps present in the map storage.

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.

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.

RoadMapData *download_road_map(map_info_t map_info) const

Returns the road map identified by the map_info from the map storage.

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.

vector<map_info_t> get_road_maps_info() const

Returns a list of all road maps present in the map storage.