Data Model
The map component presents a data model that can be explored using the Live Data Viewer. It consists of services and telemetry streams.

In the topics below, the first element is the name of the map component (map unless changed with the name setting). Services which belong to a dynamic map are found under dynamicMaps/<dynamicMapName>, where <dynamicMapName> is the name given to the dynamic map in the settings; for example /map/dynamicMaps/ros/nodes/get.
Dynamic Maps
Telemetry
dynamicMaps: This telemetry stream contains information about the dynamic maps that are currently being used by themapcomponent. It includes the name of each running dynamic map and number of nodes and edges in it.dynamicMaps/<dynamicMapName>: This telemetry stream contains the live updates for each dynamic map running, showing updates such as nodes and edges added, removed, or updated.
Map Services
These services are found under dynamicMaps/<dynamicMapName>.
-
get: Gets the dynamic map. Takes an optionalmodeparameter which selects what is returned:progressivereturns the map in chunks. This is the default.monolithicreturns the entire map in one message.nodesByID,edgesByID,nodesByTypeandedgesByTypereturn only the matching nodes or edges.
-
clear: Clears the dynamic map. -
restart: Clears the dynamic map, then makes its adapters repeat their startup behaviour; for example, a static-map adapter loads or merges its map again. Use this to return a map to the state it had when the map component started, without restarting the component. It takes no parameters and blocks until every adapter has finished, so cancelling the request abandons any adapter still waiting. Adapters which do nothing at startup beyond following their source are not restarted. Adapters are restarted one at a time, with those which replace the whole map (static maps inloadmode) before those which add to it (static maps inmergemode). If an adapter fails, the others are still restarted, because the map has already been cleared. The response lists the outcome for each restarted adapter, and the request fails if any of them failed:{
"adapters": {
"uniqueAdapterName": { "ok": true },
"otherAdapter": { "ok": false, "error": "..." }
}
} -
transact: Applies several changes to the map as a single transaction. Takes anoperationsarray, in which each item has atype, such asaddNode,addEdge,removeNode,removeEdge,setNodeData,setEdgeDataorclear, and thedetailsof the change.
Node Services
These services are found under dynamicMaps/<dynamicMapName>/nodes.
getTypes: Returns an array of the string node types present in the dynamic map.get: Takes an array of nodeidsand returns the corresponding nodes. ThereportDataboolean specifies whether the node data should be included in the response, andreportEdgeswhether the node's edges should be.get/byType: Takes an array of nodetypesand returns all nodes of those types. It also takesreportDataandreportEdges.add: Adds a node, given itsid,typeanddata. It fails if a node with that ID already exists.upsert: Adds a node, or if a node with that ID and type already exists, merges thedatainto it.add/transformableandupsert/transformable: Likeaddandupsert, but also attach a transform edge, so that the node is positioned in the map. Theframeis the node the transform is relative to, andtranslationandrotationgive the transform.add/colocatedandupsert/colocated: Likeaddandupsert, but the node is placed at the same position as the existing node named inrelatesTo. ThenodeTypeandnodeDatadescribe the node, and theedgeTypeandedgeDatadescribe the edge which joins them.add/currentPosition: Adds a node at the current position of the robot. Theidcan be a template, which defaults towaypoint-${i}, so that a new node is created each time. This needs a position adapter.delete: Deletes the node with the givenid.get/data/byKey,set/data/byKeyandset/data/fromMap: Read the data of a node (idandkey), set one key (id,keyandvalue), or set several keys from an object (idandvalue).get/externalData/byKeyandset/externalData/byKey: Read or set the external data of a node, which is data held in a file, such as voxels or an image.
Edge Services
These services are found under dynamicMaps/<dynamicMapName>/edges.
getTypes: Returns an array of the string edge types present in the dynamic map.get: Takes an array of edgeidsand returns the corresponding edges. ThereportDataboolean specifies whether the edge data should be included in the response.get/byType: Takes an array of edgetypesand returns all edges of those types. It also takesreportData.add: Adds an edge between the nodesfromandto, given itsid,typeanddata. It fails if an edge with that ID already exists.upsert: Adds an edge, or if an edge with that ID and type already exists, merges thedatainto it.delete: Deletes the edge with the givenid.get/data/byKey,set/data/byKey,set/data/fromMap,get/externalData/byKeyandset/externalData/byKey: As for nodes, but for an edge.
Path Services
A path, or polygon, is an ordered set of nodes. These services are found under dynamicMaps/<dynamicMapName>/paths.
list: Lists the paths in the map. Theclosedboolean restricts the list to polygons (closed) or open paths, and thetypesarray to certain types.get: Returns the path with the givenid.append: Adds the nodes named inmembersto the end of the path with the givenid, creating the path if it does not exist. Theclosedboolean makes it a polygon, anddatais stored with the path.append/currentPosition: Creates a node at the current position of the robot and adds it to the end of the pathpathId. ThenodeId,nodeTypeandnodeDatadescribe the node.delete: Deletes the path with the givenid, without deleting the nodes in it.
Raster Services
These services are found under dynamicMaps/<dynamicMapName>/raster, and work with raster nodes.
set/config: Sets the configuration, such as the resolution, bounds and pixel format, of the raster with the givenid.get/pixelandset/pixel: Read or set the pixel atpx,pyof the rasterid. A pixel value is a colour withr,g,bandacomponents.get/projectionandset/projection: Read or set the pixel of the rasterrasterIdwhich the position of the nodetargetNodeprojects onto.
Traversal Services
Dynamic map traversal services are found under dynamicMaps/<dynamicMapName>/traversal/spatial, and are outlined here.
Static Maps
Telemetry
staticMaps: This telemetry stream contains information about the static maps that are currently stored on the agent disk. For each map it gives the hash, the cloud ID if it was deployed from the cloud, the time, the number of nodes and edges, and whether the map isreadyto be loaded or merged. A map deployed from the cloud is not ready until its download is complete.
Services
These services are found under staticMaps.
export: Exports the static map with specifiedhashto a .tgz file at the specifiedfilePath.import: Imports a static map from a .tgz file at the specifiedfilePath.get: Returns the content of the static map specified byhash.load: Loads a static map into the dynamic mapdynamicMapId. The dynamic map is cleared first. The static map is given as either asourceHashor asourceId(the cloud ID of a deployed map, which resolves to the latest deployed version).load/whenReady: Likeload, but waits for the map to be ready instead of failing if it is not, for example because it is still being downloaded or has not yet been deployed. AsourceIdis looked up again each time it checks, so the latest deployed version is used. ThedynamicMapIdis optional; if it is left out the service just waits for the map and returns its hash. It keeps waiting until it is cancelled, so a caller that no longer wants to wait should cancel the request.merge: Merges a static map into the dynamic mapdynamicMapId. This differs from the load service in that it does not clear the dynamic map before loading the static map. So the content of the static map will be merged with the existing dynamic map, according to the rules described in Loading and Merging.merge/whenReady: Likemerge, but waits for the map to be ready in the same way asload/whenReady. ThedynamicMapIdis required.remove: Removes the static map specified byhash.save: Saves the content currently in the dynamic mapdynamicMapIdto a static map. The hash of the static map is returned.
Position
position/get: Returns the current position of the robot, found from the link maintained by the position adapter. If the fixed frame is the WGS84 ellipsoid, the position is given as latitude, longitude and altitude, with the orientation as yaw, pitch and roll. It fails if no dynamic map has a position adapter.