Skip to content

Commit 8666bad

Browse files
8ashargithub-actions[bot]viambot
authored
Data Sync Hotfix (#351)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: viambot <[email protected]>
1 parent 5822511 commit 8666bad

File tree

21 files changed

+1043
-287
lines changed

21 files changed

+1043
-287
lines changed

src/viam/app/data/client.py

Lines changed: 273 additions & 22 deletions
Large diffs are not rendered by default.

src/viam/gen/app/cloudslam/__init__.py

Whitespace-only changes.

src/viam/gen/app/cloudslam/v1/__init__.py

Whitespace-only changes.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import abc
2+
import typing
3+
import grpclib.const
4+
import grpclib.client
5+
if typing.TYPE_CHECKING:
6+
import grpclib.server
7+
from .... import common
8+
import google.protobuf.struct_pb2
9+
import google.protobuf.timestamp_pb2
10+
from .... import app
11+
12+
class CloudSLAMServiceBase(abc.ABC):
13+
14+
@abc.abstractmethod
15+
async def StartMappingSession(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StartMappingSessionResponse]') -> None:
16+
pass
17+
18+
@abc.abstractmethod
19+
async def GetActiveMappingSessionsForRobot(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotRequest, app.cloudslam.v1.cloud_slam_pb2.GetActiveMappingSessionsForRobotResponse]') -> None:
20+
pass
21+
22+
@abc.abstractmethod
23+
async def GetMappingSessionPointCloud(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudRequest, app.cloudslam.v1.cloud_slam_pb2.GetMappingSessionPointCloudResponse]') -> None:
24+
pass
25+
26+
@abc.abstractmethod
27+
async def ListMappingSessions(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsRequest, app.cloudslam.v1.cloud_slam_pb2.ListMappingSessionsResponse]') -> None:
28+
pass
29+
30+
@abc.abstractmethod
31+
async def StopMappingSession(self, stream: 'grpclib.server.Stream[app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionRequest, app.cloudslam.v1.cloud_slam_pb2.StopMappingSessionResponse]') -> None:
32+
pass
33+
34+
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
35+
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)}
36+
37+
class CloudSLAMServiceStub:
38+
39+
def __init__(self, channel: grpclib.client.Channel) -> None:
40+
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)
41+
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)
42+
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)
43+
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)
44+
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)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""Generated protocol buffer code."""
2+
from google.protobuf.internal import builder as _builder
3+
from google.protobuf import descriptor as _descriptor
4+
from google.protobuf import descriptor_pool as _descriptor_pool
5+
from google.protobuf import symbol_database as _symbol_database
6+
_sym_db = _symbol_database.Default()
7+
from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
8+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
9+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
10+
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"\xa9\x02\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\'\n\x0forganization_id\x18\x04 \x01(\tR\x0eorganizationId\x12\x1f\n\x0blocation_id\x18\x05 \x01(\tR\nlocationId\x12\x19\n\x08robot_id\x18\x06 \x01(\tR\x07robotId\x12.\n\x13viam_server_version\x18\x07 \x01(\tR\x11viamServerVersion"<\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"f\n\x1aListMappingSessionsRequest\x12\'\n\x0forganization_id\x18\x01 \x01(\tR\x0eorganizationId\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')
11+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
12+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'app.cloudslam.v1.cloud_slam_pb2', globals())
13+
if _descriptor._USE_C_DESCRIPTORS == False:
14+
DESCRIPTOR._options = None
15+
DESCRIPTOR._serialized_options = b'Z go.viam.com/api/app/cloudslam/v1'
16+
_STARTMAPPINGSESSIONREQUEST._serialized_start = 148
17+
_STARTMAPPINGSESSIONREQUEST._serialized_end = 445
18+
_STARTMAPPINGSESSIONRESPONSE._serialized_start = 447
19+
_STARTMAPPINGSESSIONRESPONSE._serialized_end = 507
20+
_GETACTIVEMAPPINGSESSIONSFORROBOTREQUEST._serialized_start = 509
21+
_GETACTIVEMAPPINGSESSIONSFORROBOTREQUEST._serialized_end = 577
22+
_GETACTIVEMAPPINGSESSIONSFORROBOTRESPONSE._serialized_start = 579
23+
_GETACTIVEMAPPINGSESSIONSFORROBOTRESPONSE._serialized_end = 652
24+
_GETMAPPINGSESSIONPOINTCLOUDREQUEST._serialized_start = 654
25+
_GETMAPPINGSESSIONPOINTCLOUDREQUEST._serialized_end = 721
26+
_GETMAPPINGSESSIONPOINTCLOUDRESPONSE._serialized_start = 723
27+
_GETMAPPINGSESSIONPOINTCLOUDRESPONSE._serialized_end = 827
28+
_LISTMAPPINGSESSIONSREQUEST._serialized_start = 829
29+
_LISTMAPPINGSESSIONSREQUEST._serialized_end = 931
30+
_LISTMAPPINGSESSIONSRESPONSE._serialized_start = 933
31+
_LISTMAPPINGSESSIONSRESPONSE._serialized_end = 1028
32+
_STOPMAPPINGSESSIONREQUEST._serialized_start = 1030
33+
_STOPMAPPINGSESSIONREQUEST._serialized_end = 1115
34+
_STOPMAPPINGSESSIONRESPONSE._serialized_start = 1117
35+
_STOPMAPPINGSESSIONRESPONSE._serialized_end = 1202
36+
_MAPPINGMETADATA._serialized_start = 1205
37+
_MAPPINGMETADATA._serialized_end = 1835
38+
_CLOUDSLAMSERVICE._serialized_start = 1838
39+
_CLOUDSLAMSERVICE._serialized_end = 2548

0 commit comments

Comments
 (0)