robokudo.annotators.object_knowledge_visualizer =============================================== .. py:module:: robokudo.annotators.object_knowledge_visualizer .. autoapi-nested-parse:: 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 ------- .. autoapisummary:: robokudo.annotators.object_knowledge_visualizer.ObjectKnowledgeVisualizer Module Contents --------------- .. py:class:: ObjectKnowledgeVisualizer(name='ObjectKnowledgeVisualizer', descriptor=Descriptor()) Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator` Annotator 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 :ivar object_kb: Object knowledge base instance :type object_kb: robokudo.object_knowledge_base.BaseObjectKnowledgeBase .. py:class:: Descriptor Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator.Descriptor` Configuration descriptor for object knowledge visualization. .. py:class:: Parameters Parameters for configuring object knowledge visualization. :ivar object_knowledge_base_ros_package: ROS package containing knowledge base, defaults to "robokudo" :type object_knowledge_base_ros_package: str :ivar object_knowledge_base_name: Name of knowledge base module, defaults to "object_knowledge_iai_kitchen" :type object_knowledge_base_name: str .. py:attribute:: object_knowledge_base_ros_package :value: 'robokudo' .. py:attribute:: object_knowledge_base_name :value: 'object_knowledge_iai_kitchen' .. py:attribute:: parameters .. py:attribute:: object_kb .. py:method:: 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 :param ph: A ParthoodHypothesis or one of its childs. :type ph: ParthoodHypothesis :param object_knowledge: Knowledge about the object and its parts :type object_knowledge: ObjectKnowledge :param transform: Transform between cam and parent object :type transform: npt.NDArray :return: bool: True if parthood hypothesis could be generated, False otherwise :rtype: bool .. py:method:: 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. :param object_knowledge: Knowledge about the object and its parts :type object_knowledge: ObjectKnowledge :param transform: Transform between camera and object :type transform: npt.NDArray :return: List of generated hypotheses or None if no parts exist :rtype: list[ParthoodHypothesis] or None .. py:method:: 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 :return: SUCCESS after creating visualizations :rtype: py_trees.common.Status