robokudo.exceptions =================== .. py:module:: robokudo.exceptions .. autoapi-nested-parse:: RoboKudo-specific exception types. Exceptions ---------- .. autoapisummary:: robokudo.exceptions.ColorToDepthRatioMissing robokudo.exceptions.UnknownMode robokudo.exceptions.CVBridgeImageConversionError robokudo.exceptions.CVBridgeImageShapeError robokudo.exceptions.CVBridgeROSImageShapeError robokudo.exceptions.CVBridgeROSImageStepError robokudo.exceptions.CVBridgeROSImagePayloadError robokudo.exceptions.CVBridgeUnsupportedImageData robokudo.exceptions.CVBridgeUnsupportedEncoding robokudo.exceptions.CVBridgeUnsupportedTargetEncoding robokudo.exceptions.CASCheckConfigurationError robokudo.exceptions.WorldDescriptorLoadError robokudo.exceptions.WorldDescriptorBootstrapError Classes ------- .. autoapisummary:: robokudo.exceptions.RoboKudoError robokudo.exceptions.CameraDataMissing robokudo.exceptions.StoredCameraTransformFrameMetadataMissing robokudo.exceptions.AnalysisPreconditionError robokudo.exceptions.CASCheckFailed robokudo.exceptions.PointCloudThresholdRelation robokudo.exceptions.PointCloudThresholdError robokudo.exceptions.PlaneModelMissing robokudo.exceptions.PointCloudTooSmallForClustering robokudo.exceptions.EmptyPointCloud robokudo.exceptions.ImageContourMissing robokudo.exceptions.WorldDescriptorError Module Contents --------------- .. py:class:: RoboKudoError Bases: :py:obj:`krrood.exceptions.DataclassException`, :py:obj:`abc.ABC` Base class for RoboKudo-specific errors. .. py:exception:: ColorToDepthRatioMissing Bases: :py:obj:`RoboKudoError`, :py:obj:`RuntimeError` Raised when COLOR2DEPTH_RATIO is required but missing. .. py:attribute:: operation :type: str :value: 'continue' .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: UnknownMode Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when a configured mode value is not supported. .. py:attribute:: mode :type: typing_extensions.Any .. py:attribute:: context :type: str :value: 'RoboKudo component' .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: CameraDataMissing Bases: :py:obj:`RoboKudoError` Raised when a camera callback requires a message that was not provided. .. py:attribute:: data_name :type: str .. py:attribute:: context :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeImageConversionError Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when image conversion through the cv_bridge workaround fails. .. py:attribute:: source_encoding :type: str Source ROS image encoding. .. py:attribute:: target_encoding :type: str Requested target image encoding. .. py:attribute:: reason :type: str Reason why the image conversion cannot be performed. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeImageShapeError Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when an image array shape cannot represent a ROS image. .. py:attribute:: shape :type: tuple[int, Ellipsis] Image array shape. .. py:attribute:: dimensions :type: int Number of image array dimensions. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeROSImageShapeError Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when a ROS image message has invalid dimensions. .. py:attribute:: height :type: int ROS image height. .. py:attribute:: width :type: int ROS image width. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeROSImageStepError Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when a ROS image row step cannot contain one pixel row. .. py:attribute:: row_bytes :type: int Configured ROS image row size in bytes. .. py:attribute:: pixel_row_bytes :type: int Minimum row size required by width, channels, and dtype. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeROSImagePayloadError Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when a ROS image payload is too small for its metadata. .. py:attribute:: actual_bytes :type: int Number of bytes available in the ROS image payload. .. py:attribute:: required_bytes :type: int Minimum number of bytes required by height and row step. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeUnsupportedImageData Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when image data cannot be mapped to a ROS image encoding. .. py:attribute:: dtype :type: str Image array data type. .. py:attribute:: channel_count :type: int Number of image channels. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeUnsupportedEncoding Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when the cv_bridge workaround receives an unknown encoding. .. py:attribute:: encoding :type: str Unsupported ROS image encoding. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: CVBridgeUnsupportedTargetEncoding Bases: :py:obj:`RoboKudoError`, :py:obj:`ValueError` Raised when the cv_bridge workaround cannot produce an encoding. .. py:attribute:: target_encoding :type: str Requested target image encoding. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: StoredCameraTransformFrameMetadataMissing Bases: :py:obj:`RoboKudoError` Raised when stored camera transform frame metadata is missing. .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: AnalysisPreconditionError Bases: :py:obj:`RoboKudoError`, :py:obj:`abc.ABC` Base class for unmet analysis preconditions. .. py:exception:: CASCheckConfigurationError Bases: :py:obj:`AnalysisPreconditionError`, :py:obj:`ValueError` Raised when a CAS check annotator is not configured correctly. .. py:attribute:: component_name :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: CASCheckFailed Bases: :py:obj:`AnalysisPreconditionError` Raised when a configured CAS check condition fails. .. py:attribute:: reason :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: PointCloudThresholdRelation Bases: :py:obj:`enum.StrEnum` Relative position of a point cloud size to a configured threshold. .. py:attribute:: BELOW :value: 'below' .. py:attribute:: ABOVE :value: 'above' .. py:class:: PointCloudThresholdError Bases: :py:obj:`AnalysisPreconditionError` Raised when point cloud size violates a configured threshold. .. py:attribute:: point_count :type: int .. py:attribute:: threshold :type: int .. py:attribute:: relation :type: PointCloudThresholdRelation .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: PlaneModelMissing Bases: :py:obj:`AnalysisPreconditionError` Raised when an algorithm requires a plane model in the CAS. .. py:attribute:: context :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: PointCloudTooSmallForClustering Bases: :py:obj:`AnalysisPreconditionError` Raised when too few points are available for point-cloud clustering. .. py:attribute:: point_count :type: int .. py:attribute:: minimum_point_count :type: int .. py:attribute:: context :type: str :value: 'point cloud clustering' .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: EmptyPointCloud Bases: :py:obj:`AnalysisPreconditionError` Raised when an algorithm requires a non-empty point cloud. .. py:attribute:: context :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: ImageContourMissing Bases: :py:obj:`AnalysisPreconditionError` Raised when an algorithm requires an image contour but none was found. .. py:attribute:: context :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:class:: WorldDescriptorError Bases: :py:obj:`RoboKudoError`, :py:obj:`abc.ABC` Base class for world descriptor related errors. .. py:exception:: WorldDescriptorLoadError Bases: :py:obj:`WorldDescriptorError`, :py:obj:`RuntimeError` Raised when loading a world descriptor fails. .. py:attribute:: ros_package :type: str .. py:attribute:: module_name :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str .. py:exception:: WorldDescriptorBootstrapError Bases: :py:obj:`WorldDescriptorError`, :py:obj:`RuntimeError` Raised when merging or removing world descriptor content fails. .. py:attribute:: operation :type: str .. py:method:: error_message() -> str .. py:method:: suggest_correction() -> str