robokudo.annotators.tsdf_annotator¶
Classes¶
Enumeration of supported visualization modes for TSDF volumes. |
|
Annotator for per-object TSDF volume integration. |
Module Contents¶
- class robokudo.annotators.tsdf_annotator.TSDFAnnotatorVisualizationModes¶
-
Bases:
enum.EnumEnumeration of supported visualization modes for TSDF volumes.
- NONE = 'none'¶
- MESH = 'mesh'¶
- POINTCLOUD = 'pointcloud'¶
- VOXEL_POINTCLOUD = 'voxel_pointcloud'¶
- class robokudo.annotators.tsdf_annotator.TSDFAnnotator(name: str = 'TSDFAnnotator', descriptor: TSDFAnnotator = Descriptor())¶
-
Bases:
robokudo.annotators.core.ThreadedAnnotatorAnnotator for per-object TSDF volume integration.
Note
The annotator requires a camera to world transform and object poses to integrate the TSDF volumes. To segment objects out of the image a mask is required too. Higher quality masks yield better results.
- class Descriptor¶
-
Bases:
robokudo.annotators.core.BaseAnnotator.DescriptorConfiguration descriptor for the TSDF annotator.
- class Parameters¶
-
Bases:
robokudo.annotators.core.BaseAnnotator.Descriptor.ParametersParameters for configuring the TSDF annotator.
- voxel_length: float = 0.005¶
-
Voxel length for the TSDF volume of each object.
- sdf_trunc: float = 0.04¶
-
SDF truncation distance for the TSDF volume of each object.
- depth_scale: float = 1000.0¶
-
Depth scale for the TSDF volume integration.
- depth_trunc: float = 3.0¶
-
Depth truncation distance for the TSDF volume integration.
- geometry_visualization_mode: TSDFAnnotatorVisualizationModes¶
-
Whether to visualize the TSDF as a mesh or a point cloud.
- parameters¶
- translation_comparator¶
-
Translation comparator for comparing world positions between pipeline iterations.
- tracked_objects: typing_extensions.List[typing_extensions.Dict[str, typing_extensions.Any]] = []¶
-
A list of tracked object data, including the bounding box and the TSDF volume.
- find_tracked_object(pose: robokudo.types.annotation.PoseAnnotation, threshold: float = 0.75) typing_extensions.Optional[typing_extensions.Dict[str, typing_extensions.Any]]¶
-
Check whether the given bounding box is similar to one that has been seen before.
- Parameters:
-
pose – The pose to check
threshold – The similarity threshold between 0.0 and 1.0 for considering the bounding box similar.
- Returns:
-
The most similar tracked object or none if no similar object was found.
- compute() py_trees.common.Status¶
-
Generate a TSDF volume for each object hypothesis or integrate into existing volumes.
- Returns:
-
Whether the TSDF integration was successful or not.
- get_visualization_image(image: numpy.typing.NDArray[numpy.uint8], oh_data: typing_extensions.List[typing_extensions.Tuple[robokudo.types.scene.ObjectHypothesis, robokudo.types.annotation.PoseAnnotation, typing_extensions.Tuple[int, int, int, int]]], masks: typing_extensions.List[numpy.typing.NDArray[numpy.uint8]]) numpy.typing.NDArray[numpy.uint8]¶
-
Get an image containing the bounding boxes and masks of objects.
- Parameters:
-
image – The image to add the visualizations to.
oh_data – The object hypotheses to visualize.
masks – The masks to visualize.
- Returns:
-
The image with the visualizations.
- get_visualization_geometries(volume: robokudo.types.cv.TSDFAnnotation) typing_extensions.List[open3d.geometry.Geometry]¶
-
Get visualization geometries for the TSDF volume depending on the visualization mode.
- Parameters:
-
volume – The TSDF volume annotation to visualize.
- Returns:
-
List of visualization geometries for the given volume annotation.