Skip to main content

Adapters

Adapters are responsible for bringing external data into the dynamic map: ingesting specific map types, converting them into the standard DroneDeploy map format, then adding this data to the dynamic map. Some adapters are also able to do the inverse: taking a map from the dynamic map and converting it back into the source map format, then loading this map on the source robot.

Adapters are defined in the "adapters" field of a dynamic map within the map component's settings in the agent-settings.json configuration file. The "adapters" field is a key-value object where each key is the unique name given to the adapter and the value is another key-value object describing that adapters type and unique settings. With this approach, multiple adapters can be defined and active at any one time.

Adapters have three base fields common to all, these are:

SettingTypeDescription
enabledboolDefines whether or not the adapter is enabled or not.
typestringDescribes the type of adapter that will be instanced. This must match a predefined type string; the available values are listed in the table of adapters below.
settingsobjectA key-value object storing unique settings for the adapter in question. More on this in the next sections.

Example

...
{
"enabled": true,
"id": "map",
"settings": {
"logLevel": 4,
"name": "map",
"dynamicMaps": {
"spot": {
"adapters": {
"spot": {
"enabled": true,
"type": "spot",
"settings": {
"colorTransformer": "auto",
"frame": "seed",
"outputMode": "disabled"
}
}
}
},
"ros": {
"adapters": {
"ros-adapter": {
"enabled": true,
"type": "ros.pointcloud2",
"settings": {
"colorTransformer": "auto",
"source": "/ros/camera/rgb/points",
"voxelSettings": {
"octreeDepth": 12,
"octreeResolution": 0.05,
"refreshOctree": true
}
}
}
}
}
}
}
}

There are currently 18 adapters which are able to be used, listed below. Each adapter has unique settings to control its behaviour. Settings shared by the adapters which ingest points and grids are described under Output Settings.

TypeSourceAdds to the map
spotSpot GraphNav mapGraphNav waypoints, edges, snapshots and local grids. Can also load a map back onto the robot.
ros.pointcloud2ROS PointCloud2 topicVoxels or a raster.
ros.laser-scanROS LaserScan topicVoxels or a raster.
ros.occupancy-gridROS OccupancyGrid topicVoxels or a raster.
ros.tfROS tf topicCoordinate frames and the transforms between them.
ros.pathROS Path topicA path of nodes and edges.
ros.polygonROS PolygonStamped topicA closed path of nodes and edges.
ros.poseROS Pose topicA frame positioned relative to a parent frame.
ros.posestampedROS PoseStamped topicA frame positioned relative to the message's frame.
ros.odometryROS Odometry topicA frame positioned relative to the message's frame.
ros.posearrayROS PoseArray topicA set of frames, one per pose.
ros.navsatfixROS NavSatFix topicA frame positioned by latitude, longitude and altitude.
ros.geoposeROS GeoPose topicA frame positioned by latitude, longitude and altitude.
ros.geoposestampedROS GeoPoseStamped topicA frame positioned by latitude, longitude and altitude.
positionConfiguration, or any telemetry topicThe link which says where the robot is in the map.
static-pointcloud.obj point cloud fileVoxels or a raster.
files.rasterImage file on diskKeeps a raster node in step with a file.
static-mapA static mapLoads or merges a static map into the dynamic map.