map
[Interface specifications]
Detailed Description
Access mapsThemap
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) |
#define | PLAYER_MAP_MAX_SEGMENTS 131068 |
The maximum number of segments in a vector map. | |
#define | PLAYER_MAP_DATA_INFO 1 |
Data subtype: grid map metadata. | |
#define | PLAYER_MAP_REQ_GET_INFO 1 |
Request/reply subtype: get grid map metadata. | |
#define | PLAYER_MAP_REQ_GET_DATA 2 |
Request/reply subtype: get grid map tile. | |
#define | PLAYER_MAP_REQ_GET_VECTOR 3 |
Request/reply subtype: get vector map. | |
typedef struct player_map_info | player_map_info_t |
typedef struct player_map_data | player_map_data_t |
typedef struct player_map_data_vector | player_map_data_vector_t |
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 tileTo 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 mapA 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.