robokudo.utils.semantic_map =========================== .. py:module:: robokudo.utils.semantic_map .. autoapi-nested-parse:: Semantic map utilities for Robokudo. This module provides functions for working with semantic map regions and their transformations to different coordinate frames. It supports: * Converting semantic map regions to oriented bounding boxes * Transforming regions between world and camera coordinates * Applying arbitrary transforms to regions The module integrates with: * Open3D for geometric operations * NumPy for numerical computations * Semantic map system for region definitions Functions --------- .. autoapisummary:: robokudo.utils.semantic_map.get_obb_from_semantic_map_region robokudo.utils.semantic_map.get_obb_from_semantic_map_region_in_cam_coordinates robokudo.utils.semantic_map.get_obb_from_semantic_map_region_with_transform_matrix Module Contents --------------- .. py:function:: get_obb_from_semantic_map_region(region: robokudo.semantic_map.SemanticMapEntry) -> open3d.geometry.OrientedBoundingBox Create oriented bounding box from semantic map region. Instantiate an Open3D OrientedBoundingBox that represents a Semantic Map region. It can be used to crop pointclouds. It doesn't carry any frame information, so make sure to translate/rotate it to the desired coordinate frame if necessary. .. note:: The returned box does not carry frame information. Transform it to the desired coordinate frame if needed. :param region: A semantic map entry that defines the region of interest in 3D :return: The bounding box with the pose and extent defined by region .. py:function:: get_obb_from_semantic_map_region_in_cam_coordinates(region: robokudo.semantic_map.SemanticMapEntry, world_frame_name: str, world_to_cam_transform_matrix: numpy.typing.NDArray) -> open3d.geometry.OrientedBoundingBox Transform semantic map region to camera coordinates. Creates oriented bounding box and transforms it to camera frame if needed. :param region: Semantic map region definition :param world_frame_name: Name of world coordinate frame :param world_to_cam_transform_matrix: 4x4 world-to-camera transform :return: Oriented bounding box in camera coordinates .. note:: If region is not in world frame, assumes region frame matches camera frame. TODO: Add proper TF-based transform for other frames. .. py:function:: get_obb_from_semantic_map_region_with_transform_matrix(region: robokudo.semantic_map.SemanticMapEntry, transform_matrix: numpy.typing.NDArray) -> open3d.geometry.OrientedBoundingBox Transform semantic map region by arbitrary transform. Creates oriented bounding box and applies provided transform. :param region: Semantic map region definition :param transform_matrix: 4x4 transform matrix to apply :return: Transformed oriented bounding box