[Interface specifications]

Detailed Description

Access maps.

The map interface provides access to maps. Depending on the underlying driver, the map may be provided as an occupancy grid, or as a set of segments (or both). In either case, the map is retrieved by request only. Segment (aka vector) maps are delivered in one message, whereas grid maps are delivered in tiles, via a sequence of requests.

#define PLAYER_MAP_MAX_TILE_SIZE   (((int)((PLAYER_MAX_PAYLOAD_SIZE-12)/1.001)) - 20 - 1)
 The maximum size of a grid map tile, in cells.
#define PLAYER_MAP_MAX_SEGMENTS   131068
 The maximum number of segments in a vector map.
 Data subtype: grid map metadata.
 Request/reply subtype: get grid map metadata.
 Request/reply subtype: get grid map tile.
 Request/reply subtype: get vector map.
typedef player_map_info player_map_info_t
 Data AND Request/reply: Map information.
typedef player_map_data player_map_data_t
 Request/reply: get grid map tile.
typedef player_map_data_vector player_map_data_vector_t
 Request/reply: get vector map.

Define Documentation

#define PLAYER_MAP_MAX_SEGMENTS   131068

The maximum number of segments in a vector map.

(2097152 - 30 (msg header) - 20 (meta-data to accompany the lines)) / 16 (size of each line) = 131068

#define PLAYER_MAP_MAX_TILE_SIZE   (((int)((PLAYER_MAX_PAYLOAD_SIZE-12)/1.001)) - 20 - 1)

The maximum size of a grid map tile, in cells.

(max_payload - 12 (zlib header)) / 1.001 (zlib overhead) - 20 (tile meta-data)

Typedef Documentation

typedef struct player_map_data player_map_data_t

Request/reply: get grid map tile.

To request a grid map tile, send a PLAYER_MAP_REQ_GET_DATA request with the tile origin and size you want. Set data_count to 0 and leave the data field empty. The response will contain origin, size, and occupancy data for a tile. Note that the response tile may not be exactly the same as the tile you requested (e.g., your requested tile is too large or runs off the map).

typedef struct player_map_data_vector player_map_data_vector_t

Request/reply: get vector map.

A vector map is represented as line segments. To retrieve the vector map, send a null PLAYER_MAP_REQ_GET_VECTOR request.

typedef struct player_map_info player_map_info_t

Data AND Request/reply: Map information.

To retrieve the size and scale information of a map, send a null PLAYER_MAP_REQ_GET_INFO request. This message can also be sent as data, with the subtype PLAYER_MAP_DATA_INFO, depending on the underlying driver.

Last updated 12 September 2005 21:38:45