robokudo.object_knowledge_base¶
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¶
Knowledge representation for a single object. |
|
Base class for managing object knowledge. |
Module Contents¶
- class robokudo.object_knowledge_base.ObjectKnowledge¶
-
Bases:
robokudo.defs.Region3DWithNameKnowledge 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).
- components: typing_extensions.List[typing_extensions.Any] = []¶
-
List of component objects that make up this object
- features: typing_extensions.List[typing_extensions.Any] = []¶
-
List of features associated with this object
- mesh_ros_package: str = ''¶
-
ROS Package name where a mesh of this object is located
- mesh_relative_path: str = ''¶
-
Relative path to the actual mesh file. This path is relative to mesh_ros_package!
- is_frame_in_camera_coordinates() bool¶
-
Check whether the object is defined in camera coordinates.
- Returns:
-
True if the object is defined in camera coordinates, False otherwise.
- class robokudo.object_knowledge_base.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.
- entries: typing_extensions.Dict[str, ObjectKnowledge]¶
-
Dictionary mapping object names to their knowledge
- add_entry(entry: ObjectKnowledge) None¶
-
Add a single object knowledge entry.
- Parameters:
-
entry – The object knowledge entry to add
- Raises:
-
Exception – If the entry has no name attribute
- add_entries(entries: typing_extensions.List[ObjectKnowledge]) None¶
-
Add multiple object knowledge entries.
- Parameters:
-
entries – List of object knowledge entries to add
- static has_parthood_childs(object_knowledge: ObjectKnowledge) bool¶
-
Check if an object has any components or features.
- Parameters:
-
object_knowledge – The object knowledge to check
- Returns:
-
True if the object has components or features