robokudo.annotators.pointcloud_crop =================================== .. py:module:: robokudo.annotators.pointcloud_crop .. autoapi-nested-parse:: Point cloud cropping and visualization. This module provides an annotator for: * Cropping point clouds using axis-aligned bounding boxes * Supporting both sensor and world coordinate frames * Generating and visualizing point cloud masks * Combining masks with color images .. note:: Cropping can be done in either sensor coordinates (default) or world coordinates. Classes ------- .. autoapisummary:: robokudo.annotators.pointcloud_crop.PointcloudCropAnnotator Module Contents --------------- .. py:class:: PointcloudCropAnnotator(name='PointcloudCropAnnotator', descriptor=Descriptor()) Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator` Point cloud cropping using axis-aligned bounding boxes. Crop a subset of points from a pointcloud data based on min/max X,Y,Z values. The crop is either done in sensor coordinates (default) or relative to the world frame. .. warning:: When using world coordinates, requires valid camera-to-world transform in CAS. .. py:class:: Descriptor Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator.Descriptor` Configuration descriptor for point cloud cropping. .. py:class:: Parameters Parameters for configuring point cloud cropping. Bounding box parameters: :ivar min_x: Minimum X coordinate, defaults to -2.0 :type min_x: float :ivar min_y: Minimum Y coordinate, defaults to -2.0 :type min_y: float :ivar min_z: Minimum Z coordinate, defaults to -9.0 :type min_z: float :ivar max_x: Maximum X coordinate, defaults to 2.0 :type max_x: float :ivar max_y: Maximum Y coordinate, defaults to 2.0 :type max_y: float :ivar max_z: Maximum Z coordinate, defaults to 3.0 :type max_z: float Coordinate frame: :ivar relative_to_world: Whether to crop in world coordinates, defaults to False :type relative_to_world: bool .. py:attribute:: min_x :value: -2.0 .. py:attribute:: min_y :value: -2.0 .. py:attribute:: min_z :value: -9.0 .. py:attribute:: max_x :value: 2.0 .. py:attribute:: max_y :value: 2.0 .. py:attribute:: max_z :value: 3.0 .. py:attribute:: relative_to_world :value: False .. py:attribute:: parameters .. py:attribute:: color :value: None .. py:method:: update() Process and crop point cloud data. The method: * Loads point cloud and camera data from CAS * Optionally transforms to world coordinates * Crops using axis-aligned bounding box * Generates visualization mask * Updates CAS with cropped cloud * Creates combined visualization :return: SUCCESS after processing :rtype: py_trees.Status :raises Exception: If world transform not found when needed