PDF
AGVC SDK  0.8.0
Map

Functions

std::vector< Headeragvc_interface::AgvcInterface::getMapList ()
 Gets the headers of all maps on the AGV.
Header agvc_interface::AgvcInterface::getCurrentMapHeader ()
 Queries the header of the current AGV map.
OccupancyGridMap agvc_interface::AgvcInterface::getGridMapFromAgv (const Header &map_header)
 Gets the specified occupancy grid map information.
Base64PngMap agvc_interface::AgvcInterface::getBase64PngMapFromAgv (const Header &map_header)
 Gets Base64-encoded PNG map information.
Base64PngMap agvc_interface::AgvcInterface::previewPngMapFromAgv (const Header &map_header, const int &image_width_px=0, const int &image_height_px=0)
 Gets a preview image with optional width and height.
int agvc_interface::AgvcInterface::sendGridMapToAgv (const OccupancyGridMap &map)
 Sends occupancy grid map information to the AGV.
int agvc_interface::AgvcInterface::sendBase64PngMapToAgv (const Base64PngMap &map)
 Sends a Base64-encoded PNG map to the AGV.
int agvc_interface::AgvcInterface::saveMap (const Header &map_header)
 Saves the map after mapping is complete.
int agvc_interface::AgvcInterface::switchMap (const Header &map_header)
 Switches to the specified map.
int agvc_interface::AgvcInterface::deleteMap (const Header &map_header)
 Deletes one specified map.
int agvc_interface::AgvcInterface::deleteMaps (const std::vector< Header > &map_headers)
 Deletes multiple specified maps.
std::vector< MapVirtualAreaagvc_interface::AgvcInterface::getAllMapVirtualArea ()
 Queries virtual areas on the current map.
std::vector< MapVirtualAreaagvc_interface::AgvcInterface::getAllMapVirtualAreaOfTargetMap (const Header &map_header)
 Queries virtual areas on the target map.
int agvc_interface::AgvcInterface::addMapVirtualArea (const MapVirtualArea &map_virtual_area)
 Adds or modifies one virtual area.
int agvc_interface::AgvcInterface::addMapVirtualAreas (const std::vector< MapVirtualArea > &map_virtual_areas)
 Adds or modifies multiple virtual areas.
int agvc_interface::AgvcInterface::deleteMapVirtualArea (const Header &virtual_area_header)
 Deletes the specified virtual area.
int agvc_interface::AgvcInterface::deleteMapVirtualAreas (const std::vector< Header > &virtual_areas_header)
 Deletes multiple specified virtual areas.
MapAllInfo agvc_interface::AgvcInterface::getGridMapAllInfo (const Header &map_header)
 Gets occupancy grid map data, paths, stations, and virtual areas for the specified map.
MapAllInfo agvc_interface::AgvcInterface::getPngMapAllInfo (const Header &map_header)
 Gets Base64 map data, paths, stations, and virtual areas for the specified map.
int agvc_interface::AgvcInterface::setGridMapAllInfo (const MapAllInfo &map_all_info, const Header &command_header={ "99999", "99999", 1, "99999" })
 Sets occupancy grid map, path, station, and virtual area information.
int agvc_interface::AgvcInterface::setPngMapAllInfo (const MapAllInfo &map_all_info, const Header &command_header={ "99999", "99999", 1, "99999" })
 Sets Base64 map, path, station, and virtual area information.
int agvc_interface::AgvcInterface::deleteMapAllInfo (const Header &map_header)
 Deletes all information of the specified map, including map data, stations, paths, and virtual areas.

Detailed Description

Core functions for creating, switching, deleting, reading, and writing AGVC custom maps.

Function Documentation

◆ addMapVirtualArea()

int agvc_interface::AgvcInterface::addMapVirtualArea ( const MapVirtualArea & map_virtual_area)

Adds or modifies one virtual area.

Parameters
[in]map_virtual_areaVirtual area information to add or modify.
Returns
10100000: virtual area added or modified successfully; else: failed to add or modify the virtual area.

◆ addMapVirtualAreas()

int agvc_interface::AgvcInterface::addMapVirtualAreas ( const std::vector< MapVirtualArea > & map_virtual_areas)

Adds or modifies multiple virtual areas.

Parameters
[in]map_virtual_areasVirtual area information to add or modify.
Returns
10100000: virtual areas added or modified successfully; else: failed to add or modify virtual areas.

◆ deleteMap()

int agvc_interface::AgvcInterface::deleteMap ( const Header & map_header)

Deletes one specified map.

Parameters
[in]map_headerHeader of the specified map (command ID, name, time, map ID).
Returns
10100000: map deleted successfully; else: failed to delete the map.

◆ deleteMapAllInfo()

int agvc_interface::AgvcInterface::deleteMapAllInfo ( const Header & map_header)

Deletes all information of the specified map, including map data, stations, paths, and virtual areas.

Parameters
[in]map_headerHeader of the specified map (command ID, map name, time, map ID).
Returns
10100000: deleted successfully; else: deletion failed.

◆ deleteMaps()

int agvc_interface::AgvcInterface::deleteMaps ( const std::vector< Header > & map_headers)

Deletes multiple specified maps.

Parameters
[in]map_headersHeaders of the specified maps (command ID, name, time, map ID).
Returns
10100000: maps deleted successfully; else: failed to delete maps.

◆ deleteMapVirtualArea()

int agvc_interface::AgvcInterface::deleteMapVirtualArea ( const Header & virtual_area_header)

Deletes the specified virtual area.

Parameters
[in]virtual_area_headerHeader of the specified virtual area (command ID, virtual area name, time, map ID).
Returns
10100000: virtual area deleted successfully; else: failed to delete the virtual area.

◆ deleteMapVirtualAreas()

int agvc_interface::AgvcInterface::deleteMapVirtualAreas ( const std::vector< Header > & virtual_areas_header)

Deletes multiple specified virtual areas.

Parameters
[in]virtual_areas_headerHeaders of the specified virtual areas (command ID, virtual area name, time, map ID).
Returns
10100000: virtual areas deleted successfully; else: failed to delete virtual areas.

◆ getAllMapVirtualArea()

std::vector< MapVirtualArea > agvc_interface::AgvcInterface::getAllMapVirtualArea ( )

Queries virtual areas on the current map.

Returns
Virtual area information on the current map.

◆ getAllMapVirtualAreaOfTargetMap()

std::vector< MapVirtualArea > agvc_interface::AgvcInterface::getAllMapVirtualAreaOfTargetMap ( const Header & map_header)

Queries virtual areas on the target map.

Parameters
[in]map_headerHeader of the specified map (command ID, name, time, map ID).
Returns
All virtual areas on the specified map.

◆ getBase64PngMapFromAgv()

Base64PngMap agvc_interface::AgvcInterface::getBase64PngMapFromAgv ( const Header & map_header)

Gets Base64-encoded PNG map information.

Attention
  1. Asynchronous API.
Parameters
[in]map_headerHeader of the specified map (this asynchronous command ID, name, time, map ID).
Note
When map_id is "current_map", it refers to the current map.
Returns
Base64-encoded PNG map information.

◆ getCurrentMapHeader()

Header agvc_interface::AgvcInterface::getCurrentMapHeader ( )

Queries the header of the current AGV map.

Returns
Header of the current map (command ID, name, time, map ID).

◆ getGridMapAllInfo()

MapAllInfo agvc_interface::AgvcInterface::getGridMapAllInfo ( const Header & map_header)

Gets occupancy grid map data, paths, stations, and virtual areas for the specified map.

Attention
  1. Asynchronous API.
Parameters
[in]map_headerHeader of the specified map (this asynchronous command ID, map name, time, map ID).
Note
When map_id is "current_map", it refers to the current map.
Returns
All information on the occupancy grid map.

◆ getGridMapFromAgv()

OccupancyGridMap agvc_interface::AgvcInterface::getGridMapFromAgv ( const Header & map_header)

Gets the specified occupancy grid map information.

Parameters
[in]map_headerHeader of the specified map (this asynchronous command ID, name, time, map ID).
Note
When map_id is "current_map", it refers to the current map.
Returns
Specified occupancy grid map information.

◆ getMapList()

std::vector< Header > agvc_interface::AgvcInterface::getMapList ( )

Gets the headers of all maps on the AGV.

Returns
Headers of all maps (command ID, name, time, map ID).

◆ getPngMapAllInfo()

MapAllInfo agvc_interface::AgvcInterface::getPngMapAllInfo ( const Header & map_header)

Gets Base64 map data, paths, stations, and virtual areas for the specified map.

Attention
  1. Asynchronous API.
Parameters
[in]map_headerHeader of the specified map (this asynchronous command ID, map name, time, map ID).
Note
When map_id is "current_map", it refers to the current map.
Returns
All information on the Base64 map.

◆ previewPngMapFromAgv()

Base64PngMap agvc_interface::AgvcInterface::previewPngMapFromAgv ( const Header & map_header,
const int & image_width_px = 0,
const int & image_height_px = 0 )

Gets a preview image with optional width and height.

Attention
  1. Asynchronous API.
Parameters
[in]map_headerHeader of the specified map (this asynchronous command ID, name, time, map ID).
[in]image_width_pxMap width in pixels. If the default value 0 is used, returned thumbnail data is empty.
[in]image_height_pxMap height in pixels. If the default value 0 is used, returned thumbnail data is empty.
Note
When map_id is "current_map", it refers to the current map.
Returns
Base64-encoded PNG thumbnail.

◆ saveMap()

int agvc_interface::AgvcInterface::saveMap ( const Header & map_header)

Saves the map after mapping is complete.

Attention
  1. Asynchronous API; 2. Requires control priority.
Parameters
[in]map_headerMap header (this asynchronous command ID, name, time, map ID).
Returns
10100000: map saved successfully; 10100201: asynchronous API is running; 10120202: no control priority; else: failed to save the map.

◆ sendBase64PngMapToAgv()

int agvc_interface::AgvcInterface::sendBase64PngMapToAgv ( const Base64PngMap & map)

Sends a Base64-encoded PNG map to the AGV.

Attention
  1. Asynchronous API.
Parameters
[in]mapBase64-encoded PNG map.
Returns
10100000: map sent successfully; 10100201: map is being sent; else: failed to send the map.

◆ sendGridMapToAgv()

int agvc_interface::AgvcInterface::sendGridMapToAgv ( const OccupancyGridMap & map)

Sends occupancy grid map information to the AGV.

Attention
  1. Asynchronous API.
Parameters
[in]mapOccupancy grid map information.
Returns
10100000: map sent successfully; 10100201: map is being sent; else: failed to send the map.

◆ setGridMapAllInfo()

int agvc_interface::AgvcInterface::setGridMapAllInfo ( const MapAllInfo & map_all_info,
const Header & command_header = { "99999", "99999", 1, "99999" } )

Sets occupancy grid map, path, station, and virtual area information.

Attention
  1. Asynchronous API; 2. Requires control priority.
Parameters
[in]map_all_infoAll information on the occupancy grid map.
[in]command_headerThe id field is the ID of this command; other fields have no special meaning.
Note
Ensure that the data can be applied; the AGV does not validate the data.
Returns
10100000: all map information uploaded successfully; 10100201: asynchronous API is running; 10120202: no control priority; else: failed to upload all map information.

◆ setPngMapAllInfo()

int agvc_interface::AgvcInterface::setPngMapAllInfo ( const MapAllInfo & map_all_info,
const Header & command_header = { "99999", "99999", 1, "99999" } )

Sets Base64 map, path, station, and virtual area information.

Attention
  1. Asynchronous API; 2. Requires control priority.
Parameters
[in]map_all_infoAll information on the Base64 map.
[in]command_headerThe id field is the ID of this command; other fields have no special meaning.
Note
Ensure that the data can be applied; the AGV does not validate the data.
Returns
10100000: all map information uploaded successfully; 10100201: asynchronous API is running; 10120202: no control priority; else: failed to upload all map information.

◆ switchMap()

int agvc_interface::AgvcInterface::switchMap ( const Header & map_header)

Switches to the specified map.

Attention
  1. Asynchronous API; 2. Requires control priority.
Parameters
[in]map_headerHeader of the specified map (this asynchronous command ID, name, time, map ID).
Returns
10100000: map switched successfully; 10100201: asynchronous API is running; 10120202: no control priority; else: failed to switch the map.