Skip to content

Commit 74dd928

Browse files
jeremyrhydeviambot
andauthored
Remove GetLatestMapInfo from SLAM (w/ proto updates) (#529)
Co-authored-by: viambot <[email protected]>
1 parent d78274d commit 74dd928

File tree

11 files changed

+28
-142
lines changed

11 files changed

+28
-142
lines changed

examples/server/v1/services.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from datetime import datetime
21
from numpy.typing import NDArray
32
from typing import Dict, List, Optional, Tuple
43
from tests.mocks.services import MockMLModel, MockSLAM
@@ -27,7 +26,6 @@ def __init__(self, name: str):
2726
self.point_cloud_chunks = MockSLAM.POINT_CLOUD_PCD_CHUNKS
2827
self.cloud_slam = MockSLAM.CLOUD_SLAM
2928
self.mapping_mode = MockSLAM.MAPPING_MODE
30-
self.time = MockSLAM.LAST_UPDATE
3129
super().__init__(name)
3230

3331
async def get_internal_state(self, **kwargs) -> List[bytes]:
@@ -39,8 +37,5 @@ async def get_point_cloud_map(self, **kwargs) -> List[bytes]:
3937
async def get_position(self, **kwargs) -> Pose:
4038
return self.position
4139

42-
async def get_latest_map_info(self, **kwargs) -> datetime:
43-
return self.time
44-
4540
async def get_properties(self, **kwargs) -> Tuple[bool, MappingMode.ValueType]:
4641
return (self.cloud_slam, self.mapping_mode)

src/viam/gen/service/navigation/v1/navigation_pb2.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class _MapTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTy
2929
MAP_TYPE_GPS: _MapType.ValueType
3030

3131
class MapType(_MapType, metaclass=_MapTypeEnumTypeWrapper):
32-
"""MapType represents the various types of map the navigation service can ingest."""
32+
"""MapType represents the various types of maps the navigation service can ingest."""
3333
MAP_TYPE_UNSPECIFIED: MapType.ValueType
3434
MAP_TYPE_NONE: MapType.ValueType
3535
MAP_TYPE_GPS: MapType.ValueType

src/viam/gen/service/slam/v1/slam_grpc.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from .... import common
88
import google.api.annotations_pb2
99
import google.protobuf.struct_pb2
10-
import google.protobuf.timestamp_pb2
1110
from .... import service
1211

1312
class SLAMServiceBase(abc.ABC):
@@ -24,10 +23,6 @@ async def GetPointCloudMap(self, stream: 'grpclib.server.Stream[service.slam.v1.
2423
async def GetInternalState(self, stream: 'grpclib.server.Stream[service.slam.v1.slam_pb2.GetInternalStateRequest, service.slam.v1.slam_pb2.GetInternalStateResponse]') -> None:
2524
pass
2625

27-
@abc.abstractmethod
28-
async def GetLatestMapInfo(self, stream: 'grpclib.server.Stream[service.slam.v1.slam_pb2.GetLatestMapInfoRequest, service.slam.v1.slam_pb2.GetLatestMapInfoResponse]') -> None:
29-
pass
30-
3126
@abc.abstractmethod
3227
async def GetProperties(self, stream: 'grpclib.server.Stream[service.slam.v1.slam_pb2.GetPropertiesRequest, service.slam.v1.slam_pb2.GetPropertiesResponse]') -> None:
3328
pass
@@ -37,14 +32,13 @@ async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.Do
3732
pass
3833

3934
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
40-
return {'/viam.service.slam.v1.SLAMService/GetPosition': grpclib.const.Handler(self.GetPosition, grpclib.const.Cardinality.UNARY_UNARY, service.slam.v1.slam_pb2.GetPositionRequest, service.slam.v1.slam_pb2.GetPositionResponse), '/viam.service.slam.v1.SLAMService/GetPointCloudMap': grpclib.const.Handler(self.GetPointCloudMap, grpclib.const.Cardinality.UNARY_STREAM, service.slam.v1.slam_pb2.GetPointCloudMapRequest, service.slam.v1.slam_pb2.GetPointCloudMapResponse), '/viam.service.slam.v1.SLAMService/GetInternalState': grpclib.const.Handler(self.GetInternalState, grpclib.const.Cardinality.UNARY_STREAM, service.slam.v1.slam_pb2.GetInternalStateRequest, service.slam.v1.slam_pb2.GetInternalStateResponse), '/viam.service.slam.v1.SLAMService/GetLatestMapInfo': grpclib.const.Handler(self.GetLatestMapInfo, grpclib.const.Cardinality.UNARY_UNARY, service.slam.v1.slam_pb2.GetLatestMapInfoRequest, service.slam.v1.slam_pb2.GetLatestMapInfoResponse), '/viam.service.slam.v1.SLAMService/GetProperties': grpclib.const.Handler(self.GetProperties, grpclib.const.Cardinality.UNARY_UNARY, service.slam.v1.slam_pb2.GetPropertiesRequest, service.slam.v1.slam_pb2.GetPropertiesResponse), '/viam.service.slam.v1.SLAMService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)}
35+
return {'/viam.service.slam.v1.SLAMService/GetPosition': grpclib.const.Handler(self.GetPosition, grpclib.const.Cardinality.UNARY_UNARY, service.slam.v1.slam_pb2.GetPositionRequest, service.slam.v1.slam_pb2.GetPositionResponse), '/viam.service.slam.v1.SLAMService/GetPointCloudMap': grpclib.const.Handler(self.GetPointCloudMap, grpclib.const.Cardinality.UNARY_STREAM, service.slam.v1.slam_pb2.GetPointCloudMapRequest, service.slam.v1.slam_pb2.GetPointCloudMapResponse), '/viam.service.slam.v1.SLAMService/GetInternalState': grpclib.const.Handler(self.GetInternalState, grpclib.const.Cardinality.UNARY_STREAM, service.slam.v1.slam_pb2.GetInternalStateRequest, service.slam.v1.slam_pb2.GetInternalStateResponse), '/viam.service.slam.v1.SLAMService/GetProperties': grpclib.const.Handler(self.GetProperties, grpclib.const.Cardinality.UNARY_UNARY, service.slam.v1.slam_pb2.GetPropertiesRequest, service.slam.v1.slam_pb2.GetPropertiesResponse), '/viam.service.slam.v1.SLAMService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)}
4136

4237
class SLAMServiceStub:
4338

4439
def __init__(self, channel: grpclib.client.Channel) -> None:
4540
self.GetPosition = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.slam.v1.SLAMService/GetPosition', service.slam.v1.slam_pb2.GetPositionRequest, service.slam.v1.slam_pb2.GetPositionResponse)
4641
self.GetPointCloudMap = grpclib.client.UnaryStreamMethod(channel, '/viam.service.slam.v1.SLAMService/GetPointCloudMap', service.slam.v1.slam_pb2.GetPointCloudMapRequest, service.slam.v1.slam_pb2.GetPointCloudMapResponse)
4742
self.GetInternalState = grpclib.client.UnaryStreamMethod(channel, '/viam.service.slam.v1.SLAMService/GetInternalState', service.slam.v1.slam_pb2.GetInternalStateRequest, service.slam.v1.slam_pb2.GetInternalStateResponse)
48-
self.GetLatestMapInfo = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.slam.v1.SLAMService/GetLatestMapInfo', service.slam.v1.slam_pb2.GetLatestMapInfoRequest, service.slam.v1.slam_pb2.GetLatestMapInfoResponse)
4943
self.GetProperties = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.slam.v1.SLAMService/GetProperties', service.slam.v1.slam_pb2.GetPropertiesRequest, service.slam.v1.slam_pb2.GetPropertiesResponse)
5044
self.DoCommand = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.slam.v1.SLAMService/DoCommand', common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)

src/viam/gen/service/slam/v1/slam_pb2.py

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
88
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
99
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
10-
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
11-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservice/slam/v1/slam.proto\x12\x14viam.service.slam.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"(\n\x12GetPositionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"\x9f\x01\n\x13GetPositionResponse\x12(\n\x04pose\x18\x01 \x01(\x0b2\x14.viam.common.v1.PoseR\x04pose\x12/\n\x13component_reference\x18\x02 \x01(\tR\x12componentReference\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"-\n\x17GetPointCloudMapRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"M\n\x18GetPointCloudMapResponse\x121\n\x15point_cloud_pcd_chunk\x18\x01 \x01(\x0cR\x12pointCloudPcdChunk"-\n\x17GetInternalStateRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"L\n\x18GetInternalStateResponse\x120\n\x14internal_state_chunk\x18\x01 \x01(\x0cR\x12internalStateChunk"-\n\x17GetLatestMapInfoRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"^\n\x18GetLatestMapInfoResponse\x12B\n\x0flast_map_update\x18\x01 \x01(\x0b2\x1a.google.protobuf.TimestampR\rlastMapUpdate"*\n\x14GetPropertiesRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"|\n\x15GetPropertiesResponse\x12\x1d\n\ncloud_slam\x18\x01 \x01(\x08R\tcloudSlam\x12D\n\x0cmapping_mode\x18\x02 \x01(\x0e2!.viam.service.slam.v1.MappingModeR\x0bmappingMode*\x92\x01\n\x0bMappingMode\x12\x1c\n\x18MAPPING_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMAPPING_MODE_CREATE_NEW_MAP\x10\x01\x12\x1e\n\x1aMAPPING_MODE_LOCALIZE_ONLY\x10\x02\x12$\n MAPPING_MODE_UPDATE_EXISTING_MAP\x10\x032\xdc\x07\n\x0bSLAMService\x12\x95\x01\n\x0bGetPosition\x12(.viam.service.slam.v1.GetPositionRequest\x1a).viam.service.slam.v1.GetPositionResponse"1\x82\xd3\xe4\x93\x02+\x12)/viam/api/v1/service/slam/{name}/position\x12\xad\x01\n\x10GetPointCloudMap\x12-.viam.service.slam.v1.GetPointCloudMapRequest\x1a..viam.service.slam.v1.GetPointCloudMapResponse"8\x82\xd3\xe4\x93\x022\x120/viam/api/v1/service/slam/{name}/point_cloud_map0\x01\x12\xac\x01\n\x10GetInternalState\x12-.viam.service.slam.v1.GetInternalStateRequest\x1a..viam.service.slam.v1.GetInternalStateResponse"7\x82\xd3\xe4\x93\x021\x12//viam/api/v1/service/slam/{name}/internal_state0\x01\x12\xad\x01\n\x10GetLatestMapInfo\x12-.viam.service.slam.v1.GetLatestMapInfoRequest\x1a..viam.service.slam.v1.GetLatestMapInfoResponse":\x82\xd3\xe4\x93\x024\x122/viam/api/v1/component/slam/{name}/latest_map_info\x12\x9d\x01\n\rGetProperties\x12*.viam.service.slam.v1.GetPropertiesRequest\x1a+.viam.service.slam.v1.GetPropertiesResponse"3\x82\xd3\xe4\x93\x02-\x12+/viam/api/v1/service/slam/{name}/properties\x12\x85\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"3\x82\xd3\xe4\x93\x02-"+/viam/api/v1/service/slam/{name}/do_commandB;\n\x18com.viam.service.slam.v1Z\x1fgo.viam.com/api/service/slam/v1b\x06proto3')
10+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservice/slam/v1/slam.proto\x12\x14viam.service.slam.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"(\n\x12GetPositionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"\x9f\x01\n\x13GetPositionResponse\x12(\n\x04pose\x18\x01 \x01(\x0b2\x14.viam.common.v1.PoseR\x04pose\x12/\n\x13component_reference\x18\x02 \x01(\tR\x12componentReference\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"-\n\x17GetPointCloudMapRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"M\n\x18GetPointCloudMapResponse\x121\n\x15point_cloud_pcd_chunk\x18\x01 \x01(\x0cR\x12pointCloudPcdChunk"-\n\x17GetInternalStateRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"L\n\x18GetInternalStateResponse\x120\n\x14internal_state_chunk\x18\x01 \x01(\x0cR\x12internalStateChunk"*\n\x14GetPropertiesRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"|\n\x15GetPropertiesResponse\x12\x1d\n\ncloud_slam\x18\x01 \x01(\x08R\tcloudSlam\x12D\n\x0cmapping_mode\x18\x02 \x01(\x0e2!.viam.service.slam.v1.MappingModeR\x0bmappingMode*\x92\x01\n\x0bMappingMode\x12\x1c\n\x18MAPPING_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMAPPING_MODE_CREATE_NEW_MAP\x10\x01\x12\x1e\n\x1aMAPPING_MODE_LOCALIZE_ONLY\x10\x02\x12$\n MAPPING_MODE_UPDATE_EXISTING_MAP\x10\x032\xac\x06\n\x0bSLAMService\x12\x95\x01\n\x0bGetPosition\x12(.viam.service.slam.v1.GetPositionRequest\x1a).viam.service.slam.v1.GetPositionResponse"1\x82\xd3\xe4\x93\x02+\x12)/viam/api/v1/service/slam/{name}/position\x12\xad\x01\n\x10GetPointCloudMap\x12-.viam.service.slam.v1.GetPointCloudMapRequest\x1a..viam.service.slam.v1.GetPointCloudMapResponse"8\x82\xd3\xe4\x93\x022\x120/viam/api/v1/service/slam/{name}/point_cloud_map0\x01\x12\xac\x01\n\x10GetInternalState\x12-.viam.service.slam.v1.GetInternalStateRequest\x1a..viam.service.slam.v1.GetInternalStateResponse"7\x82\xd3\xe4\x93\x021\x12//viam/api/v1/service/slam/{name}/internal_state0\x01\x12\x9d\x01\n\rGetProperties\x12*.viam.service.slam.v1.GetPropertiesRequest\x1a+.viam.service.slam.v1.GetPropertiesResponse"3\x82\xd3\xe4\x93\x02-\x12+/viam/api/v1/service/slam/{name}/properties\x12\x85\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"3\x82\xd3\xe4\x93\x02-"+/viam/api/v1/service/slam/{name}/do_commandB;\n\x18com.viam.service.slam.v1Z\x1fgo.viam.com/api/service/slam/v1b\x06proto3')
1211
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
1312
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'service.slam.v1.slam_pb2', globals())
1413
if _descriptor._USE_C_DESCRIPTORS == False:
@@ -20,33 +19,27 @@
2019
_SLAMSERVICE.methods_by_name['GetPointCloudMap']._serialized_options = b'\x82\xd3\xe4\x93\x022\x120/viam/api/v1/service/slam/{name}/point_cloud_map'
2120
_SLAMSERVICE.methods_by_name['GetInternalState']._options = None
2221
_SLAMSERVICE.methods_by_name['GetInternalState']._serialized_options = b'\x82\xd3\xe4\x93\x021\x12//viam/api/v1/service/slam/{name}/internal_state'
23-
_SLAMSERVICE.methods_by_name['GetLatestMapInfo']._options = None
24-
_SLAMSERVICE.methods_by_name['GetLatestMapInfo']._serialized_options = b'\x82\xd3\xe4\x93\x024\x122/viam/api/v1/component/slam/{name}/latest_map_info'
2522
_SLAMSERVICE.methods_by_name['GetProperties']._options = None
2623
_SLAMSERVICE.methods_by_name['GetProperties']._serialized_options = b'\x82\xd3\xe4\x93\x02-\x12+/viam/api/v1/service/slam/{name}/properties'
2724
_SLAMSERVICE.methods_by_name['DoCommand']._options = None
2825
_SLAMSERVICE.methods_by_name['DoCommand']._serialized_options = b'\x82\xd3\xe4\x93\x02-"+/viam/api/v1/service/slam/{name}/do_command'
29-
_MAPPINGMODE._serialized_start = 938
30-
_MAPPINGMODE._serialized_end = 1084
31-
_GETPOSITIONREQUEST._serialized_start = 169
32-
_GETPOSITIONREQUEST._serialized_end = 209
33-
_GETPOSITIONRESPONSE._serialized_start = 212
34-
_GETPOSITIONRESPONSE._serialized_end = 371
35-
_GETPOINTCLOUDMAPREQUEST._serialized_start = 373
36-
_GETPOINTCLOUDMAPREQUEST._serialized_end = 418
37-
_GETPOINTCLOUDMAPRESPONSE._serialized_start = 420
38-
_GETPOINTCLOUDMAPRESPONSE._serialized_end = 497
39-
_GETINTERNALSTATEREQUEST._serialized_start = 499
40-
_GETINTERNALSTATEREQUEST._serialized_end = 544
41-
_GETINTERNALSTATERESPONSE._serialized_start = 546
42-
_GETINTERNALSTATERESPONSE._serialized_end = 622
43-
_GETLATESTMAPINFOREQUEST._serialized_start = 624
44-
_GETLATESTMAPINFOREQUEST._serialized_end = 669
45-
_GETLATESTMAPINFORESPONSE._serialized_start = 671
46-
_GETLATESTMAPINFORESPONSE._serialized_end = 765
47-
_GETPROPERTIESREQUEST._serialized_start = 767
48-
_GETPROPERTIESREQUEST._serialized_end = 809
49-
_GETPROPERTIESRESPONSE._serialized_start = 811
50-
_GETPROPERTIESRESPONSE._serialized_end = 935
51-
_SLAMSERVICE._serialized_start = 1087
52-
_SLAMSERVICE._serialized_end = 2075
26+
_MAPPINGMODE._serialized_start = 762
27+
_MAPPINGMODE._serialized_end = 908
28+
_GETPOSITIONREQUEST._serialized_start = 136
29+
_GETPOSITIONREQUEST._serialized_end = 176
30+
_GETPOSITIONRESPONSE._serialized_start = 179
31+
_GETPOSITIONRESPONSE._serialized_end = 338
32+
_GETPOINTCLOUDMAPREQUEST._serialized_start = 340
33+
_GETPOINTCLOUDMAPREQUEST._serialized_end = 385
34+
_GETPOINTCLOUDMAPRESPONSE._serialized_start = 387
35+
_GETPOINTCLOUDMAPRESPONSE._serialized_end = 464
36+
_GETINTERNALSTATEREQUEST._serialized_start = 466
37+
_GETINTERNALSTATEREQUEST._serialized_end = 511
38+
_GETINTERNALSTATERESPONSE._serialized_start = 513
39+
_GETINTERNALSTATERESPONSE._serialized_end = 589
40+
_GETPROPERTIESREQUEST._serialized_start = 591
41+
_GETPROPERTIESREQUEST._serialized_end = 633
42+
_GETPROPERTIESRESPONSE._serialized_start = 635
43+
_GETPROPERTIESRESPONSE._serialized_end = 759
44+
_SLAMSERVICE._serialized_start = 911
45+
_SLAMSERVICE._serialized_end = 1723

src/viam/gen/service/slam/v1/slam_pb2.pyi

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import google.protobuf.descriptor
88
import google.protobuf.internal.enum_type_wrapper
99
import google.protobuf.message
1010
import google.protobuf.struct_pb2
11-
import google.protobuf.timestamp_pb2
1211
import sys
1312
import typing
1413
if sys.version_info >= (3, 10):
@@ -136,39 +135,6 @@ class GetInternalStateResponse(google.protobuf.message.Message):
136135
...
137136
global___GetInternalStateResponse = GetInternalStateResponse
138137

139-
@typing_extensions.final
140-
class GetLatestMapInfoRequest(google.protobuf.message.Message):
141-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
142-
NAME_FIELD_NUMBER: builtins.int
143-
name: builtins.str
144-
'Name of the SLAM algo'
145-
146-
def __init__(self, *, name: builtins.str=...) -> None:
147-
...
148-
149-
def ClearField(self, field_name: typing_extensions.Literal['name', b'name']) -> None:
150-
...
151-
global___GetLatestMapInfoRequest = GetLatestMapInfoRequest
152-
153-
@typing_extensions.final
154-
class GetLatestMapInfoResponse(google.protobuf.message.Message):
155-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
156-
LAST_MAP_UPDATE_FIELD_NUMBER: builtins.int
157-
158-
@property
159-
def last_map_update(self) -> google.protobuf.timestamp_pb2.Timestamp:
160-
...
161-
162-
def __init__(self, *, last_map_update: google.protobuf.timestamp_pb2.Timestamp | None=...) -> None:
163-
...
164-
165-
def HasField(self, field_name: typing_extensions.Literal['last_map_update', b'last_map_update']) -> builtins.bool:
166-
...
167-
168-
def ClearField(self, field_name: typing_extensions.Literal['last_map_update', b'last_map_update']) -> None:
169-
...
170-
global___GetLatestMapInfoResponse = GetLatestMapInfoResponse
171-
172138
@typing_extensions.final
173139
class GetPropertiesRequest(google.protobuf.message.Message):
174140
DESCRIPTOR: google.protobuf.descriptor.Descriptor

src/viam/proto/service/slam/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from ....gen.service.slam.v1.slam_pb2 import (
77
GetInternalStateRequest,
88
GetInternalStateResponse,
9-
GetLatestMapInfoRequest,
10-
GetLatestMapInfoResponse,
119
GetPointCloudMapRequest,
1210
GetPointCloudMapResponse,
1311
GetPositionRequest,
@@ -22,8 +20,6 @@
2220
"SLAMServiceStub",
2321
"GetInternalStateRequest",
2422
"GetInternalStateResponse",
25-
"GetLatestMapInfoRequest",
26-
"GetLatestMapInfoResponse",
2723
"GetPointCloudMapRequest",
2824
"GetPointCloudMapResponse",
2925
"GetPositionRequest",

src/viam/services/slam/client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from datetime import datetime
21
from typing import List, Mapping, Optional, Tuple
32

43
from grpclib.client import Channel
@@ -7,8 +6,6 @@
76
from viam.proto.service.slam import (
87
GetInternalStateRequest,
98
GetInternalStateResponse,
10-
GetLatestMapInfoRequest,
11-
GetLatestMapInfoResponse,
129
GetPointCloudMapRequest,
1310
GetPointCloudMapResponse,
1411
GetPositionRequest,
@@ -51,11 +48,6 @@ async def get_internal_state(self, *, timeout: Optional[float] = None) -> List[b
5148
response: List[GetInternalStateResponse] = await self.client.GetInternalState(request, timeout=timeout)
5249
return [r.internal_state_chunk for r in response]
5350

54-
async def get_latest_map_info(self, *, timeout: Optional[float] = None) -> datetime:
55-
request = GetLatestMapInfoRequest(name=self.name)
56-
response: GetLatestMapInfoResponse = await self.client.GetLatestMapInfo(request, timeout=timeout)
57-
return response.last_map_update.ToDatetime()
58-
5951
async def get_properties(self, *, timeout: Optional[float] = None) -> Tuple[bool, MappingMode.ValueType]:
6052
request = GetPropertiesRequest(name=self.name)
6153
response: GetPropertiesResponse = await self.client.GetProperties(request, timeout=timeout)

0 commit comments

Comments
 (0)