diff --git a/src/viam/gen/service/vision/v1/vision_grpc.py b/src/viam/gen/service/vision/v1/vision_grpc.py index d5e102251..474d1ae2e 100644 --- a/src/viam/gen/service/vision/v1/vision_grpc.py +++ b/src/viam/gen/service/vision/v1/vision_grpc.py @@ -6,6 +6,7 @@ if typing.TYPE_CHECKING: import grpclib.server from .... import common +from .... import component import google.api.annotations_pb2 import google.protobuf.struct_pb2 from .... import service @@ -32,12 +33,20 @@ async def GetClassifications(self, stream: 'grpclib.server.Stream[service.vision async def GetObjectPointClouds(self, stream: 'grpclib.server.Stream[service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse]') -> None: pass + @abc.abstractmethod + async def GetProperties(self, stream: 'grpclib.server.Stream[service.vision.v1.vision_pb2.GetPropertiesRequest, service.vision.v1.vision_pb2.GetPropertiesResponse]') -> None: + pass + + @abc.abstractmethod + async def CaptureAllFromCamera(self, stream: 'grpclib.server.Stream[service.vision.v1.vision_pb2.CaptureAllFromCameraRequest, service.vision.v1.vision_pb2.CaptureAllFromCameraResponse]') -> None: + pass + @abc.abstractmethod async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None: pass def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: - return {'/viam.service.vision.v1.VisionService/GetDetectionsFromCamera': grpclib.const.Handler(self.GetDetectionsFromCamera, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetDetectionsFromCameraRequest, service.vision.v1.vision_pb2.GetDetectionsFromCameraResponse), '/viam.service.vision.v1.VisionService/GetDetections': grpclib.const.Handler(self.GetDetections, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetDetectionsRequest, service.vision.v1.vision_pb2.GetDetectionsResponse), '/viam.service.vision.v1.VisionService/GetClassificationsFromCamera': grpclib.const.Handler(self.GetClassificationsFromCamera, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetClassificationsFromCameraRequest, service.vision.v1.vision_pb2.GetClassificationsFromCameraResponse), '/viam.service.vision.v1.VisionService/GetClassifications': grpclib.const.Handler(self.GetClassifications, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetClassificationsRequest, service.vision.v1.vision_pb2.GetClassificationsResponse), '/viam.service.vision.v1.VisionService/GetObjectPointClouds': grpclib.const.Handler(self.GetObjectPointClouds, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse), '/viam.service.vision.v1.VisionService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)} + return {'/viam.service.vision.v1.VisionService/GetDetectionsFromCamera': grpclib.const.Handler(self.GetDetectionsFromCamera, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetDetectionsFromCameraRequest, service.vision.v1.vision_pb2.GetDetectionsFromCameraResponse), '/viam.service.vision.v1.VisionService/GetDetections': grpclib.const.Handler(self.GetDetections, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetDetectionsRequest, service.vision.v1.vision_pb2.GetDetectionsResponse), '/viam.service.vision.v1.VisionService/GetClassificationsFromCamera': grpclib.const.Handler(self.GetClassificationsFromCamera, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetClassificationsFromCameraRequest, service.vision.v1.vision_pb2.GetClassificationsFromCameraResponse), '/viam.service.vision.v1.VisionService/GetClassifications': grpclib.const.Handler(self.GetClassifications, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetClassificationsRequest, service.vision.v1.vision_pb2.GetClassificationsResponse), '/viam.service.vision.v1.VisionService/GetObjectPointClouds': grpclib.const.Handler(self.GetObjectPointClouds, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse), '/viam.service.vision.v1.VisionService/GetProperties': grpclib.const.Handler(self.GetProperties, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.GetPropertiesRequest, service.vision.v1.vision_pb2.GetPropertiesResponse), '/viam.service.vision.v1.VisionService/CaptureAllFromCamera': grpclib.const.Handler(self.CaptureAllFromCamera, grpclib.const.Cardinality.UNARY_UNARY, service.vision.v1.vision_pb2.CaptureAllFromCameraRequest, service.vision.v1.vision_pb2.CaptureAllFromCameraResponse), '/viam.service.vision.v1.VisionService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)} class UnimplementedVisionServiceBase(VisionServiceBase): @@ -56,6 +65,12 @@ async def GetClassifications(self, stream: 'grpclib.server.Stream[service.vision async def GetObjectPointClouds(self, stream: 'grpclib.server.Stream[service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse]') -> None: raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + async def GetProperties(self, stream: 'grpclib.server.Stream[service.vision.v1.vision_pb2.GetPropertiesRequest, service.vision.v1.vision_pb2.GetPropertiesResponse]') -> None: + raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def CaptureAllFromCamera(self, stream: 'grpclib.server.Stream[service.vision.v1.vision_pb2.CaptureAllFromCameraRequest, service.vision.v1.vision_pb2.CaptureAllFromCameraResponse]') -> None: + raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None: raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) @@ -67,4 +82,6 @@ def __init__(self, channel: grpclib.client.Channel) -> None: self.GetClassificationsFromCamera = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.vision.v1.VisionService/GetClassificationsFromCamera', service.vision.v1.vision_pb2.GetClassificationsFromCameraRequest, service.vision.v1.vision_pb2.GetClassificationsFromCameraResponse) self.GetClassifications = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.vision.v1.VisionService/GetClassifications', service.vision.v1.vision_pb2.GetClassificationsRequest, service.vision.v1.vision_pb2.GetClassificationsResponse) self.GetObjectPointClouds = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.vision.v1.VisionService/GetObjectPointClouds', service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse) + self.GetProperties = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.vision.v1.VisionService/GetProperties', service.vision.v1.vision_pb2.GetPropertiesRequest, service.vision.v1.vision_pb2.GetPropertiesResponse) + self.CaptureAllFromCamera = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.vision.v1.VisionService/CaptureAllFromCamera', service.vision.v1.vision_pb2.CaptureAllFromCameraRequest, service.vision.v1.vision_pb2.CaptureAllFromCameraResponse) self.DoCommand = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.vision.v1.VisionService/DoCommand', common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse) \ No newline at end of file diff --git a/src/viam/gen/service/vision/v1/vision_pb2.py b/src/viam/gen/service/vision/v1/vision_pb2.py index 8c70fe37f..6f99bd745 100644 --- a/src/viam/gen/service/vision/v1/vision_pb2.py +++ b/src/viam/gen/service/vision/v1/vision_pb2.py @@ -5,9 +5,10 @@ from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2 +from ....component.camera.v1 import camera_pb2 as component_dot_camera_dot_v1_dot_camera__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservice/vision/v1/vision.proto\x12\x16viam.service.vision.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"\xba\x01\n\x14GetDetectionsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05image\x18\x02 \x01(\x0cR\x05image\x12\x14\n\x05width\x18\x03 \x01(\x03R\x05width\x12\x16\n\x06height\x18\x04 \x01(\x03R\x06height\x12\x1b\n\tmime_type\x18\x05 \x01(\tR\x08mimeType\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"Z\n\x15GetDetectionsResponse\x12A\n\ndetections\x18\x01 \x03(\x0b2!.viam.service.vision.v1.DetectionR\ndetections"\x84\x01\n\x1eGetDetectionsFromCameraRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"d\n\x1fGetDetectionsFromCameraResponse\x12A\n\ndetections\x18\x01 \x03(\x0b2!.viam.service.vision.v1.DetectionR\ndetections"\xda\x01\n\tDetection\x12\x18\n\x05x_min\x18\x01 \x01(\x03H\x00R\x04xMin\x88\x01\x01\x12\x18\n\x05y_min\x18\x02 \x01(\x03H\x01R\x04yMin\x88\x01\x01\x12\x18\n\x05x_max\x18\x03 \x01(\x03H\x02R\x04xMax\x88\x01\x01\x12\x18\n\x05y_max\x18\x04 \x01(\x03H\x03R\x04yMax\x88\x01\x01\x12\x1e\n\nconfidence\x18\x05 \x01(\x01R\nconfidence\x12\x1d\n\nclass_name\x18\x06 \x01(\tR\tclassNameB\x08\n\x06_x_minB\x08\n\x06_y_minB\x08\n\x06_x_maxB\x08\n\x06_y_max"\xcd\x01\n\x19GetClassificationsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05image\x18\x02 \x01(\x0cR\x05image\x12\x14\n\x05width\x18\x03 \x01(\x05R\x05width\x12\x16\n\x06height\x18\x04 \x01(\x05R\x06height\x12\x1b\n\tmime_type\x18\x05 \x01(\tR\x08mimeType\x12\x0c\n\x01n\x18\x06 \x01(\x05R\x01n\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"n\n\x1aGetClassificationsResponse\x12P\n\x0fclassifications\x18\x01 \x03(\x0b2&.viam.service.vision.v1.ClassificationR\x0fclassifications"\x97\x01\n#GetClassificationsFromCameraRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12\x0c\n\x01n\x18\x03 \x01(\x05R\x01n\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"x\n$GetClassificationsFromCameraResponse\x12P\n\x0fclassifications\x18\x01 \x03(\x0b2&.viam.service.vision.v1.ClassificationR\x0fclassifications"O\n\x0eClassification\x12\x1d\n\nclass_name\x18\x01 \x01(\tR\tclassName\x12\x1e\n\nconfidence\x18\x02 \x01(\x01R\nconfidence"\x9e\x01\n\x1bGetObjectPointCloudsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12\x1b\n\tmime_type\x18\x03 \x01(\tR\x08mimeType\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"w\n\x1cGetObjectPointCloudsResponse\x12\x1b\n\tmime_type\x18\x01 \x01(\tR\x08mimeType\x12:\n\x07objects\x18\x02 \x03(\x0b2 .viam.common.v1.PointCloudObjectR\x07objects2\xe7\x08\n\rVisionService\x12\xc8\x01\n\x17GetDetectionsFromCamera\x126.viam.service.vision.v1.GetDetectionsFromCameraRequest\x1a7.viam.service.vision.v1.GetDetectionsFromCameraResponse"<\x82\xd3\xe4\x93\x026"4/viam/api/v1/service/vision/{name}/camera_detections\x12\xa3\x01\n\rGetDetections\x12,.viam.service.vision.v1.GetDetectionsRequest\x1a-.viam.service.vision.v1.GetDetectionsResponse"5\x82\xd3\xe4\x93\x02/"-/viam/api/v1/service/vision/{name}/detections\x12\xdc\x01\n\x1cGetClassificationsFromCamera\x12;.viam.service.vision.v1.GetClassificationsFromCameraRequest\x1a<.viam.service.vision.v1.GetClassificationsFromCameraResponse"A\x82\xd3\xe4\x93\x02;"9/viam/api/v1/service/vision/{name}/camera_classifications\x12\xb7\x01\n\x12GetClassifications\x121.viam.service.vision.v1.GetClassificationsRequest\x1a2.viam.service.vision.v1.GetClassificationsResponse":\x82\xd3\xe4\x93\x024"2/viam/api/v1/service/vision/{name}/classifications\x12\xc1\x01\n\x14GetObjectPointClouds\x123.viam.service.vision.v1.GetObjectPointCloudsRequest\x1a4.viam.service.vision.v1.GetObjectPointCloudsResponse">\x82\xd3\xe4\x93\x028"6/viam/api/v1/service/vision/{name}/object_point_clouds\x12\x87\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"5\x82\xd3\xe4\x93\x02/"-/viam/api/v1/service/vision/{name}/do_commandB?\n\x1acom.viam.service.vision.v1Z!go.viam.com/api/service/vision/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservice/vision/v1/vision.proto\x12\x16viam.service.vision.v1\x1a\x16common/v1/common.proto\x1a component/camera/v1/camera.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"\xba\x01\n\x14GetDetectionsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05image\x18\x02 \x01(\x0cR\x05image\x12\x14\n\x05width\x18\x03 \x01(\x03R\x05width\x12\x16\n\x06height\x18\x04 \x01(\x03R\x06height\x12\x1b\n\tmime_type\x18\x05 \x01(\tR\x08mimeType\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"Z\n\x15GetDetectionsResponse\x12A\n\ndetections\x18\x01 \x03(\x0b2!.viam.service.vision.v1.DetectionR\ndetections"\x84\x01\n\x1eGetDetectionsFromCameraRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"d\n\x1fGetDetectionsFromCameraResponse\x12A\n\ndetections\x18\x01 \x03(\x0b2!.viam.service.vision.v1.DetectionR\ndetections"\xda\x01\n\tDetection\x12\x18\n\x05x_min\x18\x01 \x01(\x03H\x00R\x04xMin\x88\x01\x01\x12\x18\n\x05y_min\x18\x02 \x01(\x03H\x01R\x04yMin\x88\x01\x01\x12\x18\n\x05x_max\x18\x03 \x01(\x03H\x02R\x04xMax\x88\x01\x01\x12\x18\n\x05y_max\x18\x04 \x01(\x03H\x03R\x04yMax\x88\x01\x01\x12\x1e\n\nconfidence\x18\x05 \x01(\x01R\nconfidence\x12\x1d\n\nclass_name\x18\x06 \x01(\tR\tclassNameB\x08\n\x06_x_minB\x08\n\x06_y_minB\x08\n\x06_x_maxB\x08\n\x06_y_max"\xcd\x01\n\x19GetClassificationsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05image\x18\x02 \x01(\x0cR\x05image\x12\x14\n\x05width\x18\x03 \x01(\x05R\x05width\x12\x16\n\x06height\x18\x04 \x01(\x05R\x06height\x12\x1b\n\tmime_type\x18\x05 \x01(\tR\x08mimeType\x12\x0c\n\x01n\x18\x06 \x01(\x05R\x01n\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"n\n\x1aGetClassificationsResponse\x12P\n\x0fclassifications\x18\x01 \x03(\x0b2&.viam.service.vision.v1.ClassificationR\x0fclassifications"\x97\x01\n#GetClassificationsFromCameraRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12\x0c\n\x01n\x18\x03 \x01(\x05R\x01n\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"x\n$GetClassificationsFromCameraResponse\x12P\n\x0fclassifications\x18\x01 \x03(\x0b2&.viam.service.vision.v1.ClassificationR\x0fclassifications"O\n\x0eClassification\x12\x1d\n\nclass_name\x18\x01 \x01(\tR\tclassName\x12\x1e\n\nconfidence\x18\x02 \x01(\x01R\nconfidence"\x9e\x01\n\x1bGetObjectPointCloudsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12\x1b\n\tmime_type\x18\x03 \x01(\tR\x08mimeType\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"w\n\x1cGetObjectPointCloudsResponse\x12\x1b\n\tmime_type\x18\x01 \x01(\tR\x08mimeType\x12:\n\x07objects\x18\x02 \x03(\x0b2 .viam.common.v1.PointCloudObjectR\x07objects"Y\n\x14GetPropertiesRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\xc5\x02\n\x1bCaptureAllFromCameraRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0bcamera_name\x18\x02 \x01(\tR\ncameraName\x12!\n\x0creturn_image\x18\x03 \x01(\x08R\x0breturnImage\x125\n\x16return_classifications\x18\x04 \x01(\x08R\x15returnClassifications\x12+\n\x11return_detections\x18\x05 \x01(\x08R\x10returnDetections\x12;\n\x1areturn_object_point_clouds\x18\x06 \x01(\x08R\x17returnObjectPointClouds\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\xd5\x02\n\x1cCaptureAllFromCameraResponse\x125\n\x05image\x18\x01 \x01(\x0b2\x1f.viam.component.camera.v1.ImageR\x05image\x12A\n\ndetections\x18\x02 \x03(\x0b2!.viam.service.vision.v1.DetectionR\ndetections\x12P\n\x0fclassifications\x18\x03 \x03(\x0b2&.viam.service.vision.v1.ClassificationR\x0fclassifications\x12:\n\x07objects\x18\x04 \x03(\x0b2 .viam.common.v1.PointCloudObjectR\x07objects\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\xca\x01\n\x15GetPropertiesResponse\x12;\n\x19classifications_supported\x18\x01 \x01(\x08R\x18classificationsSupported\x121\n\x14detections_supported\x18\x02 \x01(\x08R\x13detectionsSupported\x12A\n\x1dobject_point_clouds_supported\x18\x03 \x01(\x08R\x1aobjectPointCloudsSupported2\xcd\x0b\n\rVisionService\x12\xc8\x01\n\x17GetDetectionsFromCamera\x126.viam.service.vision.v1.GetDetectionsFromCameraRequest\x1a7.viam.service.vision.v1.GetDetectionsFromCameraResponse"<\x82\xd3\xe4\x93\x026"4/viam/api/v1/service/vision/{name}/camera_detections\x12\xa3\x01\n\rGetDetections\x12,.viam.service.vision.v1.GetDetectionsRequest\x1a-.viam.service.vision.v1.GetDetectionsResponse"5\x82\xd3\xe4\x93\x02/"-/viam/api/v1/service/vision/{name}/detections\x12\xdc\x01\n\x1cGetClassificationsFromCamera\x12;.viam.service.vision.v1.GetClassificationsFromCameraRequest\x1a<.viam.service.vision.v1.GetClassificationsFromCameraResponse"A\x82\xd3\xe4\x93\x02;"9/viam/api/v1/service/vision/{name}/camera_classifications\x12\xb7\x01\n\x12GetClassifications\x121.viam.service.vision.v1.GetClassificationsRequest\x1a2.viam.service.vision.v1.GetClassificationsResponse":\x82\xd3\xe4\x93\x024"2/viam/api/v1/service/vision/{name}/classifications\x12\xc1\x01\n\x14GetObjectPointClouds\x123.viam.service.vision.v1.GetObjectPointCloudsRequest\x1a4.viam.service.vision.v1.GetObjectPointCloudsResponse">\x82\xd3\xe4\x93\x028"6/viam/api/v1/service/vision/{name}/object_point_clouds\x12\xa7\x01\n\rGetProperties\x12,.viam.service.vision.v1.GetPropertiesRequest\x1a-.viam.service.vision.v1.GetPropertiesResponse"9\x82\xd3\xe4\x93\x023"1/viam/api/v1/service/vision/{name}/get_properties\x12\xb9\x01\n\x14CaptureAllFromCamera\x123.viam.service.vision.v1.CaptureAllFromCameraRequest\x1a4.viam.service.vision.v1.CaptureAllFromCameraResponse"6\x82\xd3\xe4\x93\x020"./viam/api/v1/service/vision/{name}/capture_all\x12\x87\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"5\x82\xd3\xe4\x93\x02/"-/viam/api/v1/service/vision/{name}/do_commandB?\n\x1acom.viam.service.vision.v1Z!go.viam.com/api/service/vision/v1b\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'service.vision.v1.vision_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: @@ -23,31 +24,43 @@ _VISIONSERVICE.methods_by_name['GetClassifications']._serialized_options = b'\x82\xd3\xe4\x93\x024"2/viam/api/v1/service/vision/{name}/classifications' _VISIONSERVICE.methods_by_name['GetObjectPointClouds']._options = None _VISIONSERVICE.methods_by_name['GetObjectPointClouds']._serialized_options = b'\x82\xd3\xe4\x93\x028"6/viam/api/v1/service/vision/{name}/object_point_clouds' + _VISIONSERVICE.methods_by_name['GetProperties']._options = None + _VISIONSERVICE.methods_by_name['GetProperties']._serialized_options = b'\x82\xd3\xe4\x93\x023"1/viam/api/v1/service/vision/{name}/get_properties' + _VISIONSERVICE.methods_by_name['CaptureAllFromCamera']._options = None + _VISIONSERVICE.methods_by_name['CaptureAllFromCamera']._serialized_options = b'\x82\xd3\xe4\x93\x020"./viam/api/v1/service/vision/{name}/capture_all' _VISIONSERVICE.methods_by_name['DoCommand']._options = None _VISIONSERVICE.methods_by_name['DoCommand']._serialized_options = b'\x82\xd3\xe4\x93\x02/"-/viam/api/v1/service/vision/{name}/do_command' - _GETDETECTIONSREQUEST._serialized_start = 143 - _GETDETECTIONSREQUEST._serialized_end = 329 - _GETDETECTIONSRESPONSE._serialized_start = 331 - _GETDETECTIONSRESPONSE._serialized_end = 421 - _GETDETECTIONSFROMCAMERAREQUEST._serialized_start = 424 - _GETDETECTIONSFROMCAMERAREQUEST._serialized_end = 556 - _GETDETECTIONSFROMCAMERARESPONSE._serialized_start = 558 - _GETDETECTIONSFROMCAMERARESPONSE._serialized_end = 658 - _DETECTION._serialized_start = 661 - _DETECTION._serialized_end = 879 - _GETCLASSIFICATIONSREQUEST._serialized_start = 882 - _GETCLASSIFICATIONSREQUEST._serialized_end = 1087 - _GETCLASSIFICATIONSRESPONSE._serialized_start = 1089 - _GETCLASSIFICATIONSRESPONSE._serialized_end = 1199 - _GETCLASSIFICATIONSFROMCAMERAREQUEST._serialized_start = 1202 - _GETCLASSIFICATIONSFROMCAMERAREQUEST._serialized_end = 1353 - _GETCLASSIFICATIONSFROMCAMERARESPONSE._serialized_start = 1355 - _GETCLASSIFICATIONSFROMCAMERARESPONSE._serialized_end = 1475 - _CLASSIFICATION._serialized_start = 1477 - _CLASSIFICATION._serialized_end = 1556 - _GETOBJECTPOINTCLOUDSREQUEST._serialized_start = 1559 - _GETOBJECTPOINTCLOUDSREQUEST._serialized_end = 1717 - _GETOBJECTPOINTCLOUDSRESPONSE._serialized_start = 1719 - _GETOBJECTPOINTCLOUDSRESPONSE._serialized_end = 1838 - _VISIONSERVICE._serialized_start = 1841 - _VISIONSERVICE._serialized_end = 2968 \ No newline at end of file + _GETDETECTIONSREQUEST._serialized_start = 177 + _GETDETECTIONSREQUEST._serialized_end = 363 + _GETDETECTIONSRESPONSE._serialized_start = 365 + _GETDETECTIONSRESPONSE._serialized_end = 455 + _GETDETECTIONSFROMCAMERAREQUEST._serialized_start = 458 + _GETDETECTIONSFROMCAMERAREQUEST._serialized_end = 590 + _GETDETECTIONSFROMCAMERARESPONSE._serialized_start = 592 + _GETDETECTIONSFROMCAMERARESPONSE._serialized_end = 692 + _DETECTION._serialized_start = 695 + _DETECTION._serialized_end = 913 + _GETCLASSIFICATIONSREQUEST._serialized_start = 916 + _GETCLASSIFICATIONSREQUEST._serialized_end = 1121 + _GETCLASSIFICATIONSRESPONSE._serialized_start = 1123 + _GETCLASSIFICATIONSRESPONSE._serialized_end = 1233 + _GETCLASSIFICATIONSFROMCAMERAREQUEST._serialized_start = 1236 + _GETCLASSIFICATIONSFROMCAMERAREQUEST._serialized_end = 1387 + _GETCLASSIFICATIONSFROMCAMERARESPONSE._serialized_start = 1389 + _GETCLASSIFICATIONSFROMCAMERARESPONSE._serialized_end = 1509 + _CLASSIFICATION._serialized_start = 1511 + _CLASSIFICATION._serialized_end = 1590 + _GETOBJECTPOINTCLOUDSREQUEST._serialized_start = 1593 + _GETOBJECTPOINTCLOUDSREQUEST._serialized_end = 1751 + _GETOBJECTPOINTCLOUDSRESPONSE._serialized_start = 1753 + _GETOBJECTPOINTCLOUDSRESPONSE._serialized_end = 1872 + _GETPROPERTIESREQUEST._serialized_start = 1874 + _GETPROPERTIESREQUEST._serialized_end = 1963 + _CAPTUREALLFROMCAMERAREQUEST._serialized_start = 1966 + _CAPTUREALLFROMCAMERAREQUEST._serialized_end = 2291 + _CAPTUREALLFROMCAMERARESPONSE._serialized_start = 2294 + _CAPTUREALLFROMCAMERARESPONSE._serialized_end = 2635 + _GETPROPERTIESRESPONSE._serialized_start = 2638 + _GETPROPERTIESRESPONSE._serialized_end = 2840 + _VISIONSERVICE._serialized_start = 2843 + _VISIONSERVICE._serialized_end = 4328 \ No newline at end of file diff --git a/src/viam/gen/service/vision/v1/vision_pb2.pyi b/src/viam/gen/service/vision/v1/vision_pb2.pyi index 4f4b1168a..fa1075971 100644 --- a/src/viam/gen/service/vision/v1/vision_pb2.pyi +++ b/src/viam/gen/service/vision/v1/vision_pb2.pyi @@ -5,6 +5,7 @@ isort:skip_file import builtins import collections.abc from .... import common +from .... import component import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message @@ -307,4 +308,122 @@ class GetObjectPointCloudsResponse(google.protobuf.message.Message): def ClearField(self, field_name: typing.Literal['mime_type', b'mime_type', 'objects', b'objects']) -> None: ... -global___GetObjectPointCloudsResponse = GetObjectPointCloudsResponse \ No newline at end of file +global___GetObjectPointCloudsResponse = GetObjectPointCloudsResponse + +@typing.final +class GetPropertiesRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAME_FIELD_NUMBER: builtins.int + EXTRA_FIELD_NUMBER: builtins.int + name: builtins.str + 'name of the vision service' + + @property + def extra(self) -> google.protobuf.struct_pb2.Struct: + """Additional arguments to the method""" + + def __init__(self, *, name: builtins.str=..., extra: google.protobuf.struct_pb2.Struct | None=...) -> None: + ... + + def HasField(self, field_name: typing.Literal['extra', b'extra']) -> builtins.bool: + ... + + def ClearField(self, field_name: typing.Literal['extra', b'extra', 'name', b'name']) -> None: + ... +global___GetPropertiesRequest = GetPropertiesRequest + +@typing.final +class CaptureAllFromCameraRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAME_FIELD_NUMBER: builtins.int + CAMERA_NAME_FIELD_NUMBER: builtins.int + RETURN_IMAGE_FIELD_NUMBER: builtins.int + RETURN_CLASSIFICATIONS_FIELD_NUMBER: builtins.int + RETURN_DETECTIONS_FIELD_NUMBER: builtins.int + RETURN_OBJECT_POINT_CLOUDS_FIELD_NUMBER: builtins.int + EXTRA_FIELD_NUMBER: builtins.int + name: builtins.str + 'name of the vision service' + camera_name: builtins.str + 'name of camera source to use as input' + return_image: builtins.bool + 'whether or not including the image in the response' + return_classifications: builtins.bool + 'whether or not including classifications in the response' + return_detections: builtins.bool + 'whether or not including detections in the response' + return_object_point_clouds: builtins.bool + 'whether or not including pcd in the response' + + @property + def extra(self) -> google.protobuf.struct_pb2.Struct: + ... + + def __init__(self, *, name: builtins.str=..., camera_name: builtins.str=..., return_image: builtins.bool=..., return_classifications: builtins.bool=..., return_detections: builtins.bool=..., return_object_point_clouds: builtins.bool=..., extra: google.protobuf.struct_pb2.Struct | None=...) -> None: + ... + + def HasField(self, field_name: typing.Literal['extra', b'extra']) -> builtins.bool: + ... + + def ClearField(self, field_name: typing.Literal['camera_name', b'camera_name', 'extra', b'extra', 'name', b'name', 'return_classifications', b'return_classifications', 'return_detections', b'return_detections', 'return_image', b'return_image', 'return_object_point_clouds', b'return_object_point_clouds']) -> None: + ... +global___CaptureAllFromCameraRequest = CaptureAllFromCameraRequest + +@typing.final +class CaptureAllFromCameraResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + IMAGE_FIELD_NUMBER: builtins.int + DETECTIONS_FIELD_NUMBER: builtins.int + CLASSIFICATIONS_FIELD_NUMBER: builtins.int + OBJECTS_FIELD_NUMBER: builtins.int + EXTRA_FIELD_NUMBER: builtins.int + + @property + def image(self) -> component.camera.v1.camera_pb2.Image: + ... + + @property + def detections(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Detection]: + ... + + @property + def classifications(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Classification]: + ... + + @property + def objects(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[common.v1.common_pb2.PointCloudObject]: + ... + + @property + def extra(self) -> google.protobuf.struct_pb2.Struct: + ... + + def __init__(self, *, image: component.camera.v1.camera_pb2.Image | None=..., detections: collections.abc.Iterable[global___Detection] | None=..., classifications: collections.abc.Iterable[global___Classification] | None=..., objects: collections.abc.Iterable[common.v1.common_pb2.PointCloudObject] | None=..., extra: google.protobuf.struct_pb2.Struct | None=...) -> None: + ... + + def HasField(self, field_name: typing.Literal['extra', b'extra', 'image', b'image']) -> builtins.bool: + ... + + def ClearField(self, field_name: typing.Literal['classifications', b'classifications', 'detections', b'detections', 'extra', b'extra', 'image', b'image', 'objects', b'objects']) -> None: + ... +global___CaptureAllFromCameraResponse = CaptureAllFromCameraResponse + +@typing.final +class GetPropertiesResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + CLASSIFICATIONS_SUPPORTED_FIELD_NUMBER: builtins.int + DETECTIONS_SUPPORTED_FIELD_NUMBER: builtins.int + OBJECT_POINT_CLOUDS_SUPPORTED_FIELD_NUMBER: builtins.int + classifications_supported: builtins.bool + 'whether or not classifactions are supported by the vision service' + detections_supported: builtins.bool + 'whether or not detections are supported by the vision service' + object_point_clouds_supported: builtins.bool + 'whether or not 3d segmentation is supported by the vision service' + + def __init__(self, *, classifications_supported: builtins.bool=..., detections_supported: builtins.bool=..., object_point_clouds_supported: builtins.bool=...) -> None: + ... + + def ClearField(self, field_name: typing.Literal['classifications_supported', b'classifications_supported', 'detections_supported', b'detections_supported', 'object_point_clouds_supported', b'object_point_clouds_supported']) -> None: + ... +global___GetPropertiesResponse = GetPropertiesResponse \ No newline at end of file diff --git a/src/viam/proto/service/vision/__init__.py b/src/viam/proto/service/vision/__init__.py index cd5636b82..95550a02c 100644 --- a/src/viam/proto/service/vision/__init__.py +++ b/src/viam/proto/service/vision/__init__.py @@ -4,6 +4,8 @@ """ from ....gen.service.vision.v1.vision_grpc import UnimplementedVisionServiceBase, VisionServiceBase, VisionServiceStub from ....gen.service.vision.v1.vision_pb2 import ( + CaptureAllFromCameraRequest, + CaptureAllFromCameraResponse, Classification, Detection, GetClassificationsFromCameraRequest, @@ -16,12 +18,16 @@ GetDetectionsResponse, GetObjectPointCloudsRequest, GetObjectPointCloudsResponse, + GetPropertiesRequest, + GetPropertiesResponse, ) __all__ = [ "UnimplementedVisionServiceBase", "VisionServiceBase", "VisionServiceStub", + "CaptureAllFromCameraRequest", + "CaptureAllFromCameraResponse", "Classification", "Detection", "GetClassificationsFromCameraRequest", @@ -34,4 +40,6 @@ "GetDetectionsResponse", "GetObjectPointCloudsRequest", "GetObjectPointCloudsResponse", + "GetPropertiesRequest", + "GetPropertiesResponse", ] diff --git a/src/viam/services/vision/service.py b/src/viam/services/vision/service.py index 525b46454..afb009173 100644 --- a/src/viam/services/vision/service.py +++ b/src/viam/services/vision/service.py @@ -16,7 +16,7 @@ GetDetectionsResponse, GetObjectPointCloudsRequest, GetObjectPointCloudsResponse, - VisionServiceBase, + UnimplementedVisionServiceBase, ) from viam.resource.rpc_service_base import ResourceRPCServiceBase from viam.utils import dict_to_struct, struct_to_dict @@ -24,7 +24,7 @@ from .vision import Vision -class VisionRPCService(VisionServiceBase, ResourceRPCServiceBase): +class VisionRPCService(UnimplementedVisionServiceBase, ResourceRPCServiceBase): """ gRPC service for a Vision service """ diff --git a/tests/mocks/services.py b/tests/mocks/services.py index cc4c665c2..0e95e1dd4 100644 --- a/tests/mocks/services.py +++ b/tests/mocks/services.py @@ -828,9 +828,7 @@ async def BinaryDataByIDs(self, stream: Stream[BinaryDataByIDsRequest, BinaryDat request = await stream.recv_message() assert request is not None self.binary_ids = request.binary_ids - await stream.send_message( - BinaryDataByIDsResponse(data=self.binary_response) - ) + await stream.send_message(BinaryDataByIDsResponse(data=self.binary_response)) async def DeleteTabularData(self, stream: Stream[DeleteTabularDataRequest, DeleteTabularDataResponse]) -> None: request = await stream.recv_message()