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:
| Setting | Type | Description |
|---|---|---|
enabled | bool | Defines whether or not the adapter is enabled or not. |
type | string | Describes 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. |
settings | object | A 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.
| Type | Source | Adds to the map |
|---|---|---|
spot | Spot GraphNav map | GraphNav waypoints, edges, snapshots and local grids. Can also load a map back onto the robot. |
ros.pointcloud2 | ROS PointCloud2 topic | Voxels or a raster. |
ros.laser-scan | ROS LaserScan topic | Voxels or a raster. |
ros.occupancy-grid | ROS OccupancyGrid topic | Voxels or a raster. |
ros.tf | ROS tf topic | Coordinate frames and the transforms between them. |
ros.path | ROS Path topic | A path of nodes and edges. |
ros.polygon | ROS PolygonStamped topic | A closed path of nodes and edges. |
ros.pose | ROS Pose topic | A frame positioned relative to a parent frame. |
ros.posestamped | ROS PoseStamped topic | A frame positioned relative to the message's frame. |
ros.odometry | ROS Odometry topic | A frame positioned relative to the message's frame. |
ros.posearray | ROS PoseArray topic | A set of frames, one per pose. |
ros.navsatfix | ROS NavSatFix topic | A frame positioned by latitude, longitude and altitude. |
ros.geopose | ROS GeoPose topic | A frame positioned by latitude, longitude and altitude. |
ros.geoposestamped | ROS GeoPoseStamped topic | A frame positioned by latitude, longitude and altitude. |
position | Configuration, or any telemetry topic | The link which says where the robot is in the map. |
static-pointcloud | .obj point cloud file | Voxels or a raster. |
files.raster | Image file on disk | Keeps a raster node in step with a file. |
static-map | A static map | Loads or merges a static map into the dynamic map. |