ROS Pointcloud2
Adapter Type: "ros.pointcloud2"
This adapter uses a subscription to a ROS Pointcloud2 topic.
Warning
The ROS component needs to be enabled within the agent for ROS adapters to function. For more information, see ROS.
Note
The source setting of an adapter which subscribes to a ROS topic is the topic path as presented in the live data viewer. This means for a ROS source of the form "/camera/rgb/points", the path is "/ros/camera/rgb/points".
| Setting | Type | Description | Default |
|---|---|---|---|
source | string | The topic path of the pointcloud2 message source. | |
colorTransformer | string | Can be one of "auto", "rgb8" or "intensity". this field defines which method to use to colour each point. In most situations, "auto" should be used. However, if both colour and intensity information exists in the source then setting this to "rgb8", or "intensity" will let you explicitly choose which to use.- "rgb8" will look for an "rgb" field and decode it by assuming the standard ROS float32 to RGB method.- "intensity" will look for an "intensity" field and apply that to each RGB channel to get a grayscale mapping- "auto" will use whatever is available. If both exist it will default to rgb8. | "auto" |
The adapter also accepts the output settings. When writing a raster, the rasterSettings of this adapter additionally accept:
| Setting | Type | Description | Default |
|---|---|---|---|
projectionMethod | string | How the 3D points are flattened onto the raster. One of: - "z-discard" ignores height; every point is projected onto the XY plane.- "z-filter" only includes points whose height lies between zFilterMin and zFilterMax.- "z-max" makes a height map: each pixel takes the colour of the highest point which falls in it.- "z-min" makes an inverse height map: each pixel takes the colour of the lowest point which falls in it. | "z-discard" |
zFilterMin | number | The lowest height, in metres, to include when projectionMethod is "z-filter". | 0 |
zFilterMax | number | The highest height, in metres, to include when projectionMethod is "z-filter". | 0 |
Example
"uniqueAdapterName": {
"enabled": true,
"type": "ros.pointcloud2",
"settings": {
"colorTransformer": "auto",
"source": "/ros/camera/rgb/points",
"voxelSettings": {
"octreeDepth": 12,
"octreeResolution": 0.05
}
}
}