viam.proto.service.slam

@generated by Viam. Do not edit manually!

Classes

SLAMServiceBase

Helper class that provides a standard way to create an ABC using

SLAMServiceStub

UnimplementedSLAMServiceBase

Helper class that provides a standard way to create an ABC using

GetInternalStateRequest

Abstract base class for protocol messages.

GetInternalStateResponse

Abstract base class for protocol messages.

GetPointCloudMapRequest

Abstract base class for protocol messages.

GetPointCloudMapResponse

Abstract base class for protocol messages.

GetPositionRequest

Abstract base class for protocol messages.

GetPositionResponse

Abstract base class for protocol messages.

GetPropertiesRequest

Abstract base class for protocol messages.

GetPropertiesResponse

Returns properties information for the named slam service

MappingMode

MappingMode represnts the various form of mapping and localizing SLAM can perform.

SensorInfo

Abstract base class for protocol messages.

SensorType

Package Contents

class viam.proto.service.slam.SLAMServiceBase[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract GetPosition(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetPositionRequest, service.slam.v1.slam_pb2.GetPositionResponse]) None[source]
Async:

abstract GetPointCloudMap(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetPointCloudMapRequest, service.slam.v1.slam_pb2.GetPointCloudMapResponse]) None[source]
Async:

abstract GetInternalState(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetInternalStateRequest, service.slam.v1.slam_pb2.GetInternalStateResponse]) None[source]
Async:

abstract GetProperties(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetPropertiesRequest, service.slam.v1.slam_pb2.GetPropertiesResponse]) None[source]
Async:

abstract DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
Async:

__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.service.slam.SLAMServiceStub(channel: grpclib.client.Channel)[source]
GetPosition
GetPointCloudMap
GetInternalState
GetProperties
DoCommand
class viam.proto.service.slam.UnimplementedSLAMServiceBase[source]

Bases: SLAMServiceBase

Helper class that provides a standard way to create an ABC using inheritance.

async GetPosition(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetPositionRequest, service.slam.v1.slam_pb2.GetPositionResponse]) None[source]
async GetPointCloudMap(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetPointCloudMapRequest, service.slam.v1.slam_pb2.GetPointCloudMapResponse]) None[source]
async GetInternalState(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetInternalStateRequest, service.slam.v1.slam_pb2.GetInternalStateResponse]) None[source]
async GetProperties(stream: grpclib.server.Stream[service.slam.v1.slam_pb2.GetPropertiesRequest, service.slam.v1.slam_pb2.GetPropertiesResponse]) None[source]
async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
class viam.proto.service.slam.GetInternalStateRequest(*, name: str = ...)

Bases: 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.

name: str

Name of slam service

class viam.proto.service.slam.GetInternalStateResponse(*, internal_state_chunk: bytes = ...)

Bases: 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.

internal_state_chunk: bytes

Chunk of the internal state of the SLAM algorithm required to continue mapping/localization

class viam.proto.service.slam.GetPointCloudMapRequest(*, name: str = ..., return_edited_map: bool | None = ...)

Bases: 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.

name: str

Name of slam service

return_edited_map: bool

For SLAM services that implement handling an edited map, this boolean should indicate whether to return that edited map. If the SLAM service does not handle edited maps, the unedited map will be returned instead.

HasField(field_name: Literal['_return_edited_map', b'_return_edited_map', 'return_edited_map', b'return_edited_map']) 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, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal['_return_edited_map', b'_return_edited_map']) Literal['return_edited_map'] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.proto.service.slam.GetPointCloudMapResponse(*, point_cloud_pcd_chunk: bytes = ...)

Bases: 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.

point_cloud_pcd_chunk: bytes

One chunk of the PointCloud. For a given GetPointCloudMap request, concatenating all GetPointCloudMapResponse.point_cloud_pcd_chunk values in the order received result in the complete pointcloud in standard PCD format where XY is the ground plane and positive Z is up, following the Right Hand Rule.

Read more about the pointcloud format here: https://pointclouds.org/documentation/tutorials/pcd_file_format.html

Viam expects pointcloud data with fields “x y z” or “x y z rgb”, and for this to be specified in the pointcloud header in the FIELDS entry. If color data is included in the pointcloud, Viam’s services assume that the color value encodes a confidence score for that data point. Viam expects the confidence score to be encoded in the blue parameter of the RGB value, on a scale from 1-100.

Pointclouds are little endian encoded.

class viam.proto.service.slam.GetPositionRequest(*, name: str = ...)

Bases: 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.

name: str

Name of slam service

class viam.proto.service.slam.GetPositionResponse(*, pose: viam.gen.common.v1.common_pb2.Pose | None = ...)

Bases: 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.

property pose: viam.gen.common.v1.common_pb2.Pose

Current position of the specified component in the SLAM Map

HasField(field_name: Literal['pose', b'pose']) 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, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.service.slam.GetPropertiesRequest(*, name: str = ...)

Bases: 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.

name: str

Name of the slam service

class viam.proto.service.slam.GetPropertiesResponse(*, cloud_slam: bool = ..., mapping_mode: global___MappingMode = ..., internal_state_file_type: str | None = ..., sensor_info: collections.abc.Iterable[global___SensorInfo] | None = ...)

Bases: google.protobuf.message.Message

Returns properties information for the named slam service

cloud_slam: bool
mapping_mode: global___MappingMode
internal_state_file_type: str
property sensor_info: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SensorInfo]
HasField(field_name: Literal['_internal_state_file_type', b'_internal_state_file_type', 'internal_state_file_type', b'internal_state_file_type']) 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, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal['_internal_state_file_type', b'_internal_state_file_type']) Literal['internal_state_file_type'] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.proto.service.slam.MappingMode

Bases: _MappingMode

MappingMode represnts the various form of mapping and localizing SLAM can perform. These include, creating a new map, localizing on an existiing map and updating an exisiting map.

class viam.proto.service.slam.SensorInfo(*, name: str = ..., type: global___SensorType = ...)

Bases: 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.

name: str
type: global___SensorType
class viam.proto.service.slam.SensorType

Bases: _SensorType