robokudo.world_descriptor

World descriptor for RoboKudo.

This module provides classes for describing a world with predefined objects and regions. It builds semantic_digital_twin entities into a shared World instance.

Classes

ObjectSpec

Data structure to define typical object properties for predefined objects.

RegionSpec

Data structure to define typical properties for predefined regions.

PredefinedObject

BaseWorldDescriptor

Base class for describing a world with predefined objects and regions.

Module Contents

class robokudo.world_descriptor.ObjectSpec

Data structure to define typical object properties for predefined objects. Will be consumed by BaseWorldDescriptor.build_objects to create a world and the corresponding connections.

name: str
pose: semantic_digital_twin.spatial_types.HomogeneousTransformationMatrix
mesh_path: typing_extensions.Optional[pathlib.Path] = None
box_scale: typing_extensions.Optional[semantic_digital_twin.world_description.geometry.Scale] = None
center_mesh: bool = True
color: semantic_digital_twin.world_description.geometry.Color
class robokudo.world_descriptor.RegionSpec

Data structure to define typical properties for predefined regions. Will be consumed by BaseWorldDescriptor.build_regions to create regions and their connections.

name: str
pose: semantic_digital_twin.spatial_types.HomogeneousTransformationMatrix
box_scale: semantic_digital_twin.world_description.geometry.Scale
color: semantic_digital_twin.world_description.geometry.Color
class robokudo.world_descriptor.PredefinedObject

Bases: semantic_digital_twin.world_description.world_entity.SemanticAnnotation

body: semantic_digital_twin.world_description.world_entity.Body = None
class robokudo.world_descriptor.BaseWorldDescriptor(world: typing_extensions.Optional[semantic_digital_twin.world.World] = None, root_name: str = 'descriptor_world_root', root_prefix: typing_extensions.Optional[str] = 'world')

Base class for describing a world with predefined objects and regions.

world = None
static _center_mesh_origin(mesh: semantic_digital_twin.world_description.geometry.Mesh) None

Shift mesh origin to the center of its local bounding box.

build_objects(root: semantic_digital_twin.world_description.world_entity.Body, specs: typing_extensions.List[typing_extensions.Any]) typing_extensions.Dict[str, semantic_digital_twin.world_description.connections.Connection6DoF]

Create bodies, connections, annotations, and poses from object specs.

build_regions(root: semantic_digital_twin.world_description.world_entity.Body, specs: typing_extensions.List[RegionSpec]) typing_extensions.Dict[str, semantic_digital_twin.world_description.connections.Connection6DoF]

Create regions and connections from region specs.

get_predefined_object_bodies() typing_extensions.List[semantic_digital_twin.world_description.world_entity.Body]

Get list of pre-defined objects.