robokudo.annotators.object_knowledge_visualizer¶
Object knowledge visualization for RoboKudo.
This module provides an annotator for visualizing object knowledge, including reference frames, components, and features of detected objects. It integrates with the object knowledge base to display semantic information about objects and their parts.
Classes¶
Annotator for visualizing object knowledge and part relationships. |
Module Contents¶
- class robokudo.annotators.object_knowledge_visualizer.ObjectKnowledgeVisualizer(name='ObjectKnowledgeVisualizer', descriptor=Descriptor())¶
-
Bases:
robokudo.annotators.core.BaseAnnotatorAnnotator for visualizing object knowledge and part relationships.
This annotator displays reference frames of objects and their components/features by integrating with the object knowledge base. It creates visualizations showing: - Object reference frames - Component and feature bounding boxes - Part relationships - 2D ROIs for parts in images
- Variables:
-
object_kb – Object knowledge base instance
- class Descriptor¶
-
Bases:
robokudo.annotators.core.BaseAnnotator.DescriptorConfiguration descriptor for object knowledge visualization.
- class Parameters¶
-
Parameters for configuring object knowledge visualization.
- Variables:
-
object_knowledge_base_ros_package – ROS package containing knowledge base, defaults to “robokudo”
object_knowledge_base_name – Name of knowledge base module, defaults to “object_knowledge_iai_kitchen”
- object_knowledge_base_ros_package = 'robokudo'¶
- object_knowledge_base_name = 'object_knowledge_iai_kitchen'¶
- parameters¶
- object_kb¶
- fill_parthood_hypothesis(ph: robokudo.types.scene.ParthoodHypothesis, object_knowledge: robokudo.descriptors.object_knowledge.object_knowledge_iai_kitchen.ObjectKnowledge, transform: numpy.typing.NDArray) bool¶
-
Insert into a given ParthoodHypothesis the information that can be extracted from the object knowledge
- Parameters:
-
ph (ParthoodHypothesis) – A ParthoodHypothesis or one of its childs.
object_knowledge (ObjectKnowledge) – Knowledge about the object and its parts
transform (npt.NDArray) – Transform between cam and parent object
- Returns:
-
bool: True if parthood hypothesis could be generated, False otherwise
- Return type:
-
bool
- generate_parthood_hypotheses(object_knowledge: robokudo.descriptors.object_knowledge.object_knowledge_iai_kitchen.ObjectKnowledge, transform: numpy.typing.NDArray)¶
-
Generate hypotheses for object parts and features.
Creates ParthoodComponentHypothesis and ParthoodFeatureHypothesis objects for all components and features defined in the object knowledge.
- Parameters:
-
object_knowledge (ObjectKnowledge) – Knowledge about the object and its parts
transform (npt.NDArray) – Transform between camera and object
- Returns:
-
List of generated hypotheses or None if no parts exist
- Return type:
-
list[ParthoodHypothesis] or None
- update()¶
-
Update the visualization with current object knowledge.
Creates visualizations containing:
Object reference frames
Oriented bounding boxes for objects and parts
2D ROIs in the color image
Part relationship annotations in the CAS
- Returns:
-
SUCCESS after creating visualizations
- Return type:
-
py_trees.common.Status