-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: viambot <[email protected]>
- Loading branch information
1 parent
31399d7
commit c2546e7
Showing
20 changed files
with
742 additions
and
253 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import abc | ||
import typing | ||
import grpclib.const | ||
import grpclib.client | ||
if typing.TYPE_CHECKING: | ||
import grpclib.server | ||
from .... import common | ||
import google.protobuf.struct_pb2 | ||
import google.protobuf.timestamp_pb2 | ||
from .... import app | ||
|
||
class CloudSLAMServiceBase(abc.ABC): | ||
|
||
@abc.abstractmethod | ||
async def StartMappingSession(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionResponse]') -> None: | ||
pass | ||
|
||
@abc.abstractmethod | ||
async def GetActiveMappingSessionsForRobot(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotRequest, app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotResponse]') -> None: | ||
pass | ||
|
||
@abc.abstractmethod | ||
async def GetMappingSessionPointCloud(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudRequest, app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudResponse]') -> None: | ||
pass | ||
|
||
@abc.abstractmethod | ||
async def ListMappingSessions(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsRequest, app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsResponse]') -> None: | ||
pass | ||
|
||
@abc.abstractmethod | ||
async def StopMappingSession(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionResponse]') -> None: | ||
pass | ||
|
||
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: | ||
return {'/viam.app.cloudslam.v1.CloudSLAMService/StartMappingSession': grpclib.const.Handler(self.StartMappingSession, grpclib.const.Cardinality.UNARY_UNARY, app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionResponse), '/viam.app.cloudslam.v1.CloudSLAMService/GetActiveMappingSessionsForRobot': grpclib.const.Handler(self.GetActiveMappingSessionsForRobot, grpclib.const.Cardinality.UNARY_UNARY, app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotRequest, app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotResponse), '/viam.app.cloudslam.v1.CloudSLAMService/GetMappingSessionPointCloud': grpclib.const.Handler(self.GetMappingSessionPointCloud, grpclib.const.Cardinality.UNARY_UNARY, app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudRequest, app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudResponse), '/viam.app.cloudslam.v1.CloudSLAMService/ListMappingSessions': grpclib.const.Handler(self.ListMappingSessions, grpclib.const.Cardinality.UNARY_UNARY, app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsRequest, app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsResponse), '/viam.app.cloudslam.v1.CloudSLAMService/StopMappingSession': grpclib.const.Handler(self.StopMappingSession, grpclib.const.Cardinality.UNARY_UNARY, app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionResponse)} | ||
|
||
class CloudSLAMServiceStub: | ||
|
||
def __init__(self, channel: grpclib.client.Channel) -> None: | ||
self.StartMappingSession = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.cloudslam.v1.CloudSLAMService/StartMappingSession', app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionResponse) | ||
self.GetActiveMappingSessionsForRobot = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.cloudslam.v1.CloudSLAMService/GetActiveMappingSessionsForRobot', app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotRequest, app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotResponse) | ||
self.GetMappingSessionPointCloud = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.cloudslam.v1.CloudSLAMService/GetMappingSessionPointCloud', app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudRequest, app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudResponse) | ||
self.ListMappingSessions = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.cloudslam.v1.CloudSLAMService/ListMappingSessions', app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsRequest, app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsResponse) | ||
self.StopMappingSession = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.cloudslam.v1.CloudSLAMService/StopMappingSession', app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionResponse) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"""Generated protocol buffer code.""" | ||
from google.protobuf.internal import builder as _builder | ||
from google.protobuf import descriptor as _descriptor | ||
from google.protobuf import descriptor_pool as _descriptor_pool | ||
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 google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 | ||
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 | ||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!app/cloudslam/v1/cloud_slam.proto\x12\x15viam.app.cloudslam.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xe7\x01\n\x1aStartMappingSessionRequest\x128\n\x0bslam_config\x18\x01 \x01(\x0b2\x17.google.protobuf.StructR\nslamConfig\x12!\n\x0cslam_version\x18\x02 \x01(\tR\x0bslamVersion\x12\x19\n\x08map_name\x18\x03 \x01(\tR\x07mapName\x12\x15\n\x06org_id\x18\x04 \x01(\tR\x05orgId\x12\x1f\n\x0blocation_id\x18\x05 \x01(\tR\nlocationId\x12\x19\n\x08robot_id\x18\x06 \x01(\tR\x07robotId"<\n\x1bStartMappingSessionResponse\x12\x1d\n\nsession_id\x18\x01 \x01(\tR\tsessionId"D\n\'GetActiveMappingSessionsForRobotRequest\x12\x19\n\x08robot_id\x18\x01 \x01(\tR\x07robotId"I\n(GetActiveMappingSessionsForRobotResponse\x12\x1d\n\nsession_id\x18\x01 \x01(\tR\tsessionId"C\n"GetMappingSessionPointCloudRequest\x12\x1d\n\nsession_id\x18\x01 \x01(\tR\tsessionId"h\n#GetMappingSessionPointCloudResponse\x12\x17\n\x07map_url\x18\x01 \x01(\tR\x06mapUrl\x12(\n\x04pose\x18\x02 \x01(\x0b2\x14.viam.common.v1.PoseR\x04pose"T\n\x1aListMappingSessionsRequest\x12\x15\n\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n\x0blocation_id\x18\x02 \x01(\tR\nlocationId"_\n\x1bListMappingSessionsResponse\x12@\n\x07session\x18\x01 \x03(\x0b2&.viam.app.cloudslam.v1.MappingMetadataR\x07session"U\n\x19StopMappingSessionRequest\x12\x1d\n\nsession_id\x18\x01 \x01(\tR\tsessionId\x12\x19\n\x08save_map\x18\x02 \x01(\x08R\x07saveMap"U\n\x1aStopMappingSessionResponse\x12\x1d\n\npackage_id\x18\x01 \x01(\tR\tpackageId\x12\x18\n\x07version\x18\x02 \x01(\tR\x07version"\xf6\x04\n\x0fMappingMetadata\x12\x15\n\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n\x0blocation_id\x18\x02 \x01(\tR\nlocationId\x12\x19\n\x08robot_id\x18\x03 \x01(\tR\x07robotId\x12L\n\x14time_start_submitted\x18\x04 \x01(\x0b2\x1a.google.protobuf.TimestampR\x12timeStartSubmitted\x12V\n\x1atime_cloud_run_job_started\x18\x05 \x01(\x0b2\x1a.google.protobuf.TimestampR\x16timeCloudRunJobStarted\x12H\n\x12time_end_submitted\x18\x06 \x01(\x0b2\x1a.google.protobuf.TimestampR\x10timeEndSubmitted\x12R\n\x18time_cloud_run_job_ended\x18\x07 \x01(\x0b2\x1a.google.protobuf.TimestampR\x14timeCloudRunJobEnded\x12\x1d\n\nend_status\x18\x08 \x01(\tR\tendStatus\x12\'\n\x10cloud_run_job_id\x18\t \x01(\tR\rcloudRunJobId\x12.\n\x13viam_server_version\x18\n \x01(\tR\x11viamServerVersion\x12\x19\n\x08map_name\x18\x0b \x01(\tR\x07mapName\x12!\n\x0cslam_version\x18\x0c \x01(\tR\x0bslamVersion\x12\x16\n\x06config\x18\r \x01(\tR\x06config2\xc6\x05\n\x10CloudSLAMService\x12|\n\x13StartMappingSession\x121.viam.app.cloudslam.v1.StartMappingSessionRequest\x1a2.viam.app.cloudslam.v1.StartMappingSessionResponse\x12\xa3\x01\n GetActiveMappingSessionsForRobot\x12>.viam.app.cloudslam.v1.GetActiveMappingSessionsForRobotRequest\x1a?.viam.app.cloudslam.v1.GetActiveMappingSessionsForRobotResponse\x12\x94\x01\n\x1bGetMappingSessionPointCloud\x129.viam.app.cloudslam.v1.GetMappingSessionPointCloudRequest\x1a:.viam.app.cloudslam.v1.GetMappingSessionPointCloudResponse\x12|\n\x13ListMappingSessions\x121.viam.app.cloudslam.v1.ListMappingSessionsRequest\x1a2.viam.app.cloudslam.v1.ListMappingSessionsResponse\x12y\n\x12StopMappingSession\x120.viam.app.cloudslam.v1.StopMappingSessionRequest\x1a1.viam.app.cloudslam.v1.StopMappingSessionResponseB"Z go.viam.com/api/app/cloudslam/v1b\x06proto3') | ||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) | ||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'app.cloudslam.v1.cloud_slam_pb2', globals()) | ||
if _descriptor._USE_C_DESCRIPTORS == False: | ||
DESCRIPTOR._options = None | ||
DESCRIPTOR._serialized_options = b'Z go.viam.com/api/app/cloudslam/v1' | ||
_STARTMAPPINGSESSIONREQUEST._serialized_start = 148 | ||
_STARTMAPPINGSESSIONREQUEST._serialized_end = 379 | ||
_STARTMAPPINGSESSIONRESPONSE._serialized_start = 381 | ||
_STARTMAPPINGSESSIONRESPONSE._serialized_end = 441 | ||
_GETACTIVEMAPPINGSESSIONSFORROBOTREQUEST._serialized_start = 443 | ||
_GETACTIVEMAPPINGSESSIONSFORROBOTREQUEST._serialized_end = 511 | ||
_GETACTIVEMAPPINGSESSIONSFORROBOTRESPONSE._serialized_start = 513 | ||
_GETACTIVEMAPPINGSESSIONSFORROBOTRESPONSE._serialized_end = 586 | ||
_GETMAPPINGSESSIONPOINTCLOUDREQUEST._serialized_start = 588 | ||
_GETMAPPINGSESSIONPOINTCLOUDREQUEST._serialized_end = 655 | ||
_GETMAPPINGSESSIONPOINTCLOUDRESPONSE._serialized_start = 657 | ||
_GETMAPPINGSESSIONPOINTCLOUDRESPONSE._serialized_end = 761 | ||
_LISTMAPPINGSESSIONSREQUEST._serialized_start = 763 | ||
_LISTMAPPINGSESSIONSREQUEST._serialized_end = 847 | ||
_LISTMAPPINGSESSIONSRESPONSE._serialized_start = 849 | ||
_LISTMAPPINGSESSIONSRESPONSE._serialized_end = 944 | ||
_STOPMAPPINGSESSIONREQUEST._serialized_start = 946 | ||
_STOPMAPPINGSESSIONREQUEST._serialized_end = 1031 | ||
_STOPMAPPINGSESSIONRESPONSE._serialized_start = 1033 | ||
_STOPMAPPINGSESSIONRESPONSE._serialized_end = 1118 | ||
_MAPPINGMETADATA._serialized_start = 1121 | ||
_MAPPINGMETADATA._serialized_end = 1751 | ||
_CLOUDSLAMSERVICE._serialized_start = 1754 | ||
_CLOUDSLAMSERVICE._serialized_end = 2464 |
Oops, something went wrong.