robokudo.object_knowledge_base ============================== .. py:module:: robokudo.object_knowledge_base .. autoapi-nested-parse:: Object knowledge base for RoboKudo. This module provides classes for storing and managing knowledge about objects in RoboKudo. It includes support for object components, features, and their spatial relationships. Classes ------- .. autoapisummary:: robokudo.object_knowledge_base.ObjectKnowledge robokudo.object_knowledge_base.BaseObjectKnowledgeBase Module Contents --------------- .. py:class:: ObjectKnowledge Bases: :py:obj:`robokudo.defs.Region3DWithName` Knowledge representation for a single object. This class extends Region3DWithName to add support for object components and features. Each object can have multiple components (physical parts) and features (characteristics). .. py:attribute:: components :type: typing_extensions.List[typing_extensions.Any] :value: [] List of component objects that make up this object .. py:attribute:: features :type: typing_extensions.List[typing_extensions.Any] :value: [] List of features associated with this object .. py:attribute:: mesh_ros_package :type: str :value: '' ROS Package name where a mesh of this object is located .. py:attribute:: mesh_relative_path :type: str :value: '' Relative path to the actual mesh file. This path is relative to mesh_ros_package! .. py:method:: is_frame_in_camera_coordinates() -> bool Check whether the object is defined in camera coordinates. :return: True if the object is defined in camera coordinates, False otherwise. .. py:class:: BaseObjectKnowledgeBase Base class for managing object knowledge. This class provides functionality to store and manage knowledge about different objects. Each object is stored as an ObjectKnowledge instance and can be accessed by its name. .. py:attribute:: entries :type: typing_extensions.Dict[str, ObjectKnowledge] Dictionary mapping object names to their knowledge .. py:method:: add_entry(entry: ObjectKnowledge) -> None Add a single object knowledge entry. :param entry: The object knowledge entry to add :raises Exception: If the entry has no name attribute .. py:method:: add_entries(entries: typing_extensions.List[ObjectKnowledge]) -> None Add multiple object knowledge entries. :param entries: List of object knowledge entries to add .. py:method:: has_parthood_childs(object_knowledge: ObjectKnowledge) -> bool :staticmethod: Check if an object has any components or features. :param object_knowledge: The object knowledge to check :return: True if the object has components or features