robokudo.annotators.region_filter¶
Point cloud filtering based on semantic regions.
This module provides an annotator for:
Filtering point clouds using semantic map regions
Supporting regions in world and local frames
Creating region hypotheses with poses
Visualizing filtered regions and clouds
The module uses:
Semantic maps to define regions of interest
Frame transformations for region alignment
Oriented bounding boxes for point filtering
Note
Regions can be defined in either world frame or local frames.
Classes¶
Point cloud filtering using semantic map regions. |
Module Contents¶
- class robokudo.annotators.region_filter.RegionFilter(name='RegionFilter', descriptor=Descriptor())¶
-
Bases:
robokudo.annotators.core.ThreadedAnnotatorPoint cloud filtering using semantic map regions.
The RegionFilter can be used to filter point clouds based on a environment model based on different regions. These regions are collected in a ‘SemanticMap’ which has one ‘SemanticMapEntry’ per region of interest. Semantics to these regions are linked by referencing well-known names from your URDF and/or knowledge base.
Note
Regions are defined in a SemanticMap with SemanticMapEntry objects.
- class Descriptor¶
-
Bases:
robokudo.annotators.core.BaseAnnotator.DescriptorConfiguration descriptor for region filtering.
- class Parameters¶
-
Parameters for configuring region filtering.
Frame parameters:
- Variables:
-
world_frame_name – Name of the world coordinate frame, defaults to “map”
Semantic map parameters:
- Variables:
-
semantic_map_ros_package – ROS package containing semantic map, defaults to “robokudo”
semantic_map_name – Name of semantic map module, defaults to “semantic_map_iai_kitchen”
Region selection:
- Variables:
-
active_region – Name of active region to filter, empty for all regions
- world_frame_name = 'map'¶
- semantic_map_ros_package = 'robokudo'¶
- semantic_map_name = 'semantic_map_iai_kitchen'¶
- active_region = ''¶
- parameters¶
- world_frame_name¶
- semantic_map = None¶
- active_region¶
- load_semantic_map() None¶
-
Load semantic map from configured package and module.
Uses ModuleLoader to dynamically load the semantic map module.
- compute()¶
-
Filter point cloud using semantic map regions.
The method:
Loads point cloud and query from CAS
Updates semantic map and active regions
For each active region: * Transforms region to camera frame * Creates oriented bounding box * Filters points within box * Creates region hypothesis with pose
Updates CAS with filtered cloud
Creates visualization markers
- Returns:
-
SUCCESS after processing
- Return type:
-
py_trees.Status
- Raises:
-
Exception – If queried region not found in map