viam.proto.component.motor

@generated by Viam. Do not edit manually!

Package Contents

Classes

MotorServiceBase

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

MotorServiceStub

GetPositionRequest

Abstract base class for protocol messages.

GetPositionResponse

Abstract base class for protocol messages.

GetPropertiesRequest

Abstract base class for protocol messages.

GetPropertiesResponse

Abstract base class for protocol messages.

GoForRequest

Abstract base class for protocol messages.

GoForResponse

Abstract base class for protocol messages.

GoToRequest

Abstract base class for protocol messages.

GoToResponse

Abstract base class for protocol messages.

IsMovingRequest

Abstract base class for protocol messages.

IsMovingResponse

Abstract base class for protocol messages.

IsPoweredRequest

Abstract base class for protocol messages.

IsPoweredResponse

Abstract base class for protocol messages.

ResetZeroPositionRequest

Abstract base class for protocol messages.

ResetZeroPositionResponse

Abstract base class for protocol messages.

SetPowerRequest

Abstract base class for protocol messages.

SetPowerResponse

Abstract base class for protocol messages.

Status

Abstract base class for protocol messages.

StopRequest

Abstract base class for protocol messages.

StopResponse

Abstract base class for protocol messages.

class viam.proto.component.motor.MotorServiceBase[source]

Bases: abc.ABC

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

abstract async SetPower(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.SetPowerRequest, component.motor.v1.motor_pb2.SetPowerResponse]) None[source]
abstract async GoFor(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.GoForRequest, component.motor.v1.motor_pb2.GoForResponse]) None[source]
abstract async GoTo(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.GoToRequest, component.motor.v1.motor_pb2.GoToResponse]) None[source]
abstract async ResetZeroPosition(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.ResetZeroPositionRequest, component.motor.v1.motor_pb2.ResetZeroPositionResponse]) None[source]
abstract async GetPosition(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.GetPositionRequest, component.motor.v1.motor_pb2.GetPositionResponse]) None[source]
abstract async GetProperties(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.GetPropertiesRequest, component.motor.v1.motor_pb2.GetPropertiesResponse]) None[source]
abstract async Stop(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.StopRequest, component.motor.v1.motor_pb2.StopResponse]) None[source]
abstract async IsPowered(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.IsPoweredRequest, component.motor.v1.motor_pb2.IsPoweredResponse]) None[source]
abstract async IsMoving(stream: grpclib.server.Stream[component.motor.v1.motor_pb2.IsMovingRequest, component.motor.v1.motor_pb2.IsMovingResponse]) None[source]
abstract async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
abstract async GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) None[source]
__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.component.motor.MotorServiceStub(channel: grpclib.client.Channel)[source]
class viam.proto.component.motor.GetPositionRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.GetPositionResponse(*, position: float = ...)

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.

position: float

Current position of the motor relative to its home

class viam.proto.component.motor.GetPropertiesRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.GetPropertiesResponse(*, position_reporting: bool = ...)

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.

position_reporting: bool

Returns true if the motor supports reporting its position

class viam.proto.component.motor.GoForRequest(*, name: str = ..., rpm: float = ..., revolutions: float = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

rpm: float

Speed of motor travel in rotations per minute

revolutions: float

Number of revolutions relative to motor’s start position

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.GoForResponse

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.

class viam.proto.component.motor.GoToRequest(*, name: str = ..., rpm: float = ..., position_revolutions: float = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

rpm: float

Speed of motor travel in rotations per minute

position_revolutions: float

Number of revolutions relative to motor’s home home/zero

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.GoToResponse

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.

class viam.proto.component.motor.IsMovingRequest(*, 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
class viam.proto.component.motor.IsMovingResponse(*, is_moving: bool = ...)

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.

is_moving: bool
class viam.proto.component.motor.IsPoweredRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.IsPoweredResponse(*, is_on: bool = ..., power_pct: float = ...)

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.

is_on: bool

Returns true if the motor is on

power_pct: float

Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor. If the last command was a stop command, this value will be 0.

class viam.proto.component.motor.ResetZeroPositionRequest(*, name: str = ..., offset: float = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

offset: float

Motor position

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.ResetZeroPositionResponse

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.

class viam.proto.component.motor.SetPowerRequest(*, name: str = ..., power_pct: float = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

power_pct: float

Percentage of motor’s power, between -1 and 1

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.SetPowerResponse

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.

class viam.proto.component.motor.Status(*, is_powered: bool = ..., position: float = ..., is_moving: bool = ...)

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.

is_powered: bool

Returns true if the motor is powered

position: float

Returns current position of the motor relative to its home

is_moving: bool

Returns true if the motor is moving

class viam.proto.component.motor.StopRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | 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 extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a motor

HasField(field_name: Literal[extra, b'extra']) 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.component.motor.StopResponse

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.