:py:mod:`viam.proto.component.camera` ===================================== .. py:module:: viam.proto.component.camera .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: viam.proto.component.camera.CameraServiceBase viam.proto.component.camera.CameraServiceStub viam.proto.component.camera.UnimplementedCameraServiceBase viam.proto.component.camera.DistortionParameters viam.proto.component.camera.Format viam.proto.component.camera.GetImageRequest viam.proto.component.camera.GetImageResponse viam.proto.component.camera.GetImagesRequest viam.proto.component.camera.GetImagesResponse viam.proto.component.camera.GetPointCloudRequest viam.proto.component.camera.GetPointCloudResponse viam.proto.component.camera.GetPropertiesRequest viam.proto.component.camera.GetPropertiesResponse viam.proto.component.camera.Image viam.proto.component.camera.IntrinsicParameters viam.proto.component.camera.Property viam.proto.component.camera.RenderFrameRequest viam.proto.component.camera.Webcam viam.proto.component.camera.Webcams .. py:class:: CameraServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetImage(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetImageRequest, component.camera.v1.camera_pb2.GetImageResponse]) -> None :abstractmethod: :async: .. py:method:: GetImages(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetImagesRequest, component.camera.v1.camera_pb2.GetImagesResponse]) -> None :abstractmethod: :async: .. py:method:: RenderFrame(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.RenderFrameRequest, google.api.httpbody_pb2.HttpBody]) -> None :abstractmethod: :async: .. py:method:: GetPointCloud(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetPointCloudRequest, component.camera.v1.camera_pb2.GetPointCloudResponse]) -> None :abstractmethod: :async: .. py:method:: GetProperties(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetPropertiesRequest, component.camera.v1.camera_pb2.GetPropertiesResponse]) -> None :abstractmethod: :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :abstractmethod: :async: .. py:method:: GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: CameraServiceStub(channel: grpclib.client.Channel) .. py:class:: UnimplementedCameraServiceBase Bases: :py:obj:`CameraServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetImage(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetImageRequest, component.camera.v1.camera_pb2.GetImageResponse]) -> None :async: .. py:method:: GetImages(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetImagesRequest, component.camera.v1.camera_pb2.GetImagesResponse]) -> None :async: .. py:method:: RenderFrame(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.RenderFrameRequest, google.api.httpbody_pb2.HttpBody]) -> None :async: .. py:method:: GetPointCloud(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetPointCloudRequest, component.camera.v1.camera_pb2.GetPointCloudResponse]) -> None :async: .. py:method:: GetProperties(stream: grpclib.server.Stream[component.camera.v1.camera_pb2.GetPropertiesRequest, component.camera.v1.camera_pb2.GetPropertiesResponse]) -> None :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :async: .. py:method:: GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) -> None :async: .. py:class:: DistortionParameters(*, model: str = ..., parameters: collections.abc.Iterable[float] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: parameters :type: google.protobuf.internal.containers.RepeatedScalarFieldContainer[float] .. py:attribute:: model :type: str .. py:class:: Format Bases: :py:obj:`_Format` .. py:class:: GetImageRequest(*, name: str = ..., mime_type: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str Name of a camera .. py:attribute:: mime_type :type: str Requested MIME type of response .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetImageResponse(*, mime_type: str = ..., image: bytes = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: mime_type :type: str Actual MIME type of response .. py:attribute:: image :type: bytes Frame in bytes .. py:class:: GetImagesRequest(*, name: str = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: name :type: str Name of a camera .. py:class:: GetImagesResponse(*, images: collections.abc.Iterable[global___Image] | None = ..., response_metadata: viam.gen.common.v1.common_pb2.ResponseMetadata | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: images :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Image] list of images returned from the camera system .. py:property:: response_metadata :type: viam.gen.common.v1.common_pb2.ResponseMetadata contains timestamp data .. py:method:: HasField(field_name: Literal[response_metadata, b'response_metadata']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetPointCloudRequest(*, name: str = ..., mime_type: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str Name of a camera .. py:attribute:: mime_type :type: str Requested MIME type of response .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetPointCloudResponse(*, mime_type: str = ..., point_cloud: bytes = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: mime_type :type: str Actual MIME type of response .. py:attribute:: point_cloud :type: bytes Frame in bytes .. py:class:: GetPropertiesRequest(*, name: str = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: name :type: str Name of a camera .. py:class:: GetPropertiesResponse(*, supports_pcd: bool = ..., intrinsic_parameters: global___IntrinsicParameters | None = ..., distortion_parameters: global___DistortionParameters | None = ..., mime_types: collections.abc.Iterable[str] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: intrinsic_parameters :type: global___IntrinsicParameters Parameters for doing a perspective of a 3D scene to a 2D plane If camera does not provide intrinsic parameters, leave the field empty Initializing the parameters with 0-values is considered an error .. py:property:: distortion_parameters :type: global___DistortionParameters Parameters for modeling lens distortion in cameras If camera does not provide distortion parameters, leave the field empty Initializing the parameters with 0-values is considered an error .. py:property:: mime_types :type: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str] Supported MIME types by the camera .. py:attribute:: supports_pcd :type: bool A boolean property determining whether the camera supports the return of pointcloud data .. py:method:: HasField(field_name: Literal[distortion_parameters, b'distortion_parameters', intrinsic_parameters, b'intrinsic_parameters']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: Image(*, source_name: str = ..., format: global___Format = ..., image: bytes = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: source_name :type: str the name of the sensor where the image came from .. py:attribute:: format :type: global___Format format of the response image bytes .. py:attribute:: image :type: bytes image in bytes .. py:class:: IntrinsicParameters(*, width_px: int = ..., height_px: int = ..., focal_x_px: float = ..., focal_y_px: float = ..., center_x_px: float = ..., center_y_px: float = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: width_px :type: int .. py:attribute:: height_px :type: int .. py:attribute:: focal_x_px :type: float .. py:attribute:: focal_y_px :type: float .. py:attribute:: center_x_px :type: float .. py:attribute:: center_y_px :type: float .. py:class:: Property(*, width_px: int = ..., height_px: int = ..., frame_format: str = ..., frame_rate: float = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: width_px :type: int Video resolution width in px .. py:attribute:: height_px :type: int Video resolution height in px .. py:attribute:: frame_format :type: str Video frame format .. py:attribute:: frame_rate :type: float Video frame rate in fps .. py:class:: RenderFrameRequest(*, name: str = ..., mime_type: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str Name of a camera .. py:attribute:: mime_type :type: str Requested MIME type of response .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: Webcam(*, label: str = ..., status: str = ..., properties: collections.abc.Iterable[global___Property] | None = ..., name: str = ..., id: str = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: properties :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Property] Camera properties .. py:attribute:: label :type: str Camera driver label (for internal use only) .. py:attribute:: status :type: str Camera driver status .. py:attribute:: name :type: str Camera human-readable driver name .. py:attribute:: id :type: str Camera unique identifier .. py:class:: Webcams(*, webcams: collections.abc.Iterable[global___Webcam] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: webcams :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Webcam]