viam.proto.service.motion

@generated by Viam. Do not edit manually!

Classes

MotionServiceBase

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

MotionServiceStub

UnimplementedMotionServiceBase

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

CollisionSpecification

CollisionSpecification is used to selectively apply obstacle avoidance to specific parts of the robot

ComponentState

A pose

Constraints

Constraints specifies all enumerated constraints to be passed to Viam's motion planning, along with any optional parameters

GetPlanRequest

Abstract base class for protocol messages.

GetPlanResponse

Abstract base class for protocol messages.

GetPoseRequest

Abstract base class for protocol messages.

GetPoseResponse

Abstract base class for protocol messages.

LinearConstraint

LinearConstraint specifies that the component being moved should move linearly relative to its goal.

ListPlanStatusesRequest

Abstract base class for protocol messages.

ListPlanStatusesResponse

Status of all executed / executing plan statuses with associated IDs within the 24 hour TTL

MotionConfiguration

Abstract base class for protocol messages.

MoveOnGlobeRequest

Abstract base class for protocol messages.

MoveOnGlobeResponse

Abstract base class for protocol messages.

MoveOnMapRequest

Abstract base class for protocol messages.

MoveOnMapResponse

Abstract base class for protocol messages.

MoveRequest

Moves any component on the robot to a specified destination which can be from the reference frame of any other component on the robot.

MoveResponse

Abstract base class for protocol messages.

ObstacleDetector

Pairs a vision service with a camera, informing the service about which camera it may use

OrientationConstraint

OrientationConstraint specifies that the component being moved will not deviate its orientation beyond some threshold relative

Plan

A plan describes a motion plan

PlanState

The states that a plan can be in.

PlanStatus

Plan status describes the state of a given plan at a

PlanStatusWithID

PlanStatusWithID describes the state of a given plan at a

PlanStep

Abstract base class for protocol messages.

PlanWithStatus

Describes a plan, its current status & all status changes

StopPlanRequest

Abstract base class for protocol messages.

StopPlanResponse

Abstract base class for protocol messages.

Package Contents

class viam.proto.service.motion.MotionServiceBase[source]

Bases: abc.ABC

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

abstract Move(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.MoveRequest, service.motion.v1.motion_pb2.MoveResponse]) None[source]
Async:

abstract MoveOnMap(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.MoveOnMapRequest, service.motion.v1.motion_pb2.MoveOnMapResponse]) None[source]
Async:

abstract MoveOnGlobe(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.MoveOnGlobeRequest, service.motion.v1.motion_pb2.MoveOnGlobeResponse]) None[source]
Async:

abstract GetPose(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.GetPoseRequest, service.motion.v1.motion_pb2.GetPoseResponse]) None[source]
Async:

abstract StopPlan(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.StopPlanRequest, service.motion.v1.motion_pb2.StopPlanResponse]) None[source]
Async:

abstract ListPlanStatuses(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.ListPlanStatusesRequest, service.motion.v1.motion_pb2.ListPlanStatusesResponse]) None[source]
Async:

abstract GetPlan(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.GetPlanRequest, service.motion.v1.motion_pb2.GetPlanResponse]) 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.motion.MotionServiceStub(channel: grpclib.client.Channel)[source]
Move
MoveOnMap
MoveOnGlobe
GetPose
StopPlan
ListPlanStatuses
GetPlan
DoCommand
class viam.proto.service.motion.UnimplementedMotionServiceBase[source]

Bases: MotionServiceBase

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

async Move(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.MoveRequest, service.motion.v1.motion_pb2.MoveResponse]) None[source]
async MoveOnMap(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.MoveOnMapRequest, service.motion.v1.motion_pb2.MoveOnMapResponse]) None[source]
async MoveOnGlobe(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.MoveOnGlobeRequest, service.motion.v1.motion_pb2.MoveOnGlobeResponse]) None[source]
async GetPose(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.GetPoseRequest, service.motion.v1.motion_pb2.GetPoseResponse]) None[source]
async StopPlan(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.StopPlanRequest, service.motion.v1.motion_pb2.StopPlanResponse]) None[source]
async ListPlanStatuses(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.ListPlanStatusesRequest, service.motion.v1.motion_pb2.ListPlanStatusesResponse]) None[source]
async GetPlan(stream: grpclib.server.Stream[service.motion.v1.motion_pb2.GetPlanRequest, service.motion.v1.motion_pb2.GetPlanResponse]) None[source]
async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
class viam.proto.service.motion.CollisionSpecification(*, allows: collections.abc.Iterable[global___CollisionSpecification] | None = ...)

Bases: google.protobuf.message.Message

CollisionSpecification is used to selectively apply obstacle avoidance to specific parts of the robot

class AllowedFrameCollisions(*, frame1: str = ..., frame2: 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.

frame1: str
frame2: str
property allows: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CollisionSpecification]

Pairs of frame which should be allowed to collide with one another

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

Bases: google.protobuf.message.Message

A pose

property pose: viam.gen.common.v1.common_pb2.Pose
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.motion.Constraints(*, linear_constraint: collections.abc.Iterable[global___LinearConstraint] | None = ..., orientation_constraint: collections.abc.Iterable[global___OrientationConstraint] | None = ..., collision_specification: collections.abc.Iterable[global___CollisionSpecification] | None = ...)

Bases: google.protobuf.message.Message

Constraints specifies all enumerated constraints to be passed to Viam’s motion planning, along with any optional parameters

property linear_constraint: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___LinearConstraint]

Typed message for a specific constraint

property orientation_constraint: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___OrientationConstraint]
property collision_specification: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CollisionSpecification]

Arc constraint, Time constraint, and others will be added here when they are supported

class viam.proto.service.motion.GetPlanRequest(*, name: str = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., last_plan_only: bool = ..., execution_id: str | None = ..., 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.

name: str

The name of the motion service

last_plan_only: bool

If supplied, the response will only return the the last plan for the component / execution

execution_id: str

If you want to know about the plans of a previous execution

property component_name: viam.gen.common.v1.common_pb2.ResourceName

The name of the component which was requested to be moved.

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['_execution_id', b'_execution_id', 'component_name', b'component_name', 'execution_id', b'execution_id', '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.

WhichOneof(oneof_group: Literal['_execution_id', b'_execution_id']) Literal['execution_id'] | 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.motion.GetPlanResponse(*, current_plan_with_status: global___PlanWithStatus | None = ..., replan_history: collections.abc.Iterable[global___PlanWithStatus] | 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 current_plan_with_status: global___PlanWithStatus

The current plan and status that matches the request query

property replan_history: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlanWithStatus]

Returns the history of all previous plans that were generated in ascending order. This field will be empty if the motion service did not need to re-plan.

HasField(field_name: Literal['current_plan_with_status', b'current_plan_with_status']) 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.motion.GetPoseRequest(*, name: str = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., destination_frame: str = ..., supplemental_transforms: collections.abc.Iterable[viam.gen.common.v1.common_pb2.Transform] | None = ..., 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.

name: str
destination_frame: str

the reference frame in which the component’s pose should be provided, if unset this defaults to the “world” reference frame

property component_name: viam.gen.common.v1.common_pb2.ResourceName

the component whose pose is being requested

property supplemental_transforms: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.Transform]

pose information on any additional reference frames that are needed to compute the component’s pose

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['component_name', b'component_name', '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.service.motion.GetPoseResponse(*, pose: viam.gen.common.v1.common_pb2.PoseInFrame | 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.PoseInFrame
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.motion.LinearConstraint(*, line_tolerance_mm: float | None = ..., orientation_tolerance_degs: float | None = ...)

Bases: google.protobuf.message.Message

LinearConstraint specifies that the component being moved should move linearly relative to its goal. It does not constrain the motion of components other than the component_name specified in motion.Move

line_tolerance_mm: float

Max linear deviation from straight-line between start and goal, in mm.

orientation_tolerance_degs: float

Max allowable orientation deviation, in degrees, while on the shortest path between start / goal states

HasField(field_name: Literal['_line_tolerance_mm', b'_line_tolerance_mm', '_orientation_tolerance_degs', b'_orientation_tolerance_degs', 'line_tolerance_mm', b'line_tolerance_mm', 'orientation_tolerance_degs', b'orientation_tolerance_degs']) 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['_line_tolerance_mm', b'_line_tolerance_mm']) Literal['line_tolerance_mm'] | None
WhichOneof(oneof_group: Literal['_orientation_tolerance_degs', b'_orientation_tolerance_degs']) Literal['orientation_tolerance_degs'] | 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.motion.ListPlanStatusesRequest(*, name: str = ..., only_active_plans: bool = ..., 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.

name: str

The name of the motion service

only_active_plans: bool

If supplied, the response will filter the plan results for the supplied state

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

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.service.motion.ListPlanStatusesResponse(*, plan_statuses_with_ids: collections.abc.Iterable[global___PlanStatusWithID] | None = ...)

Bases: google.protobuf.message.Message

Status of all executed / executing plan statuses with associated IDs within the 24 hour TTL

property plan_statuses_with_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlanStatusWithID]

List of last known statuses with the associated IDs of all plans within the TTL ordered by timestamp in ascending order

class viam.proto.service.motion.MotionConfiguration(*, obstacle_detectors: collections.abc.Iterable[global___ObstacleDetector] | None = ..., position_polling_frequency_hz: float | None = ..., obstacle_polling_frequency_hz: float | None = ..., plan_deviation_m: float | None = ..., linear_m_per_sec: float | None = ..., angular_degs_per_sec: float | 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.

position_polling_frequency_hz: float

Sets the frequency to poll for the position of the robot

obstacle_polling_frequency_hz: float

Sets the frequency to poll the vision service(s) for new obstacles

plan_deviation_m: float

Sets the distance in meters that a robot is allowed to deviate from the motion plan

linear_m_per_sec: float

Optional linear velocity to target when moving

angular_degs_per_sec: float

Optional angular velocity to target when turning

property obstacle_detectors: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ObstacleDetector]

The ObstacleDetectors that will be used for transient obstacle avoidance

HasField(field_name: Literal['_angular_degs_per_sec', b'_angular_degs_per_sec', '_linear_m_per_sec', b'_linear_m_per_sec', '_obstacle_polling_frequency_hz', b'_obstacle_polling_frequency_hz', '_plan_deviation_m', b'_plan_deviation_m', '_position_polling_frequency_hz', b'_position_polling_frequency_hz', 'angular_degs_per_sec', b'angular_degs_per_sec', 'linear_m_per_sec', b'linear_m_per_sec', 'obstacle_polling_frequency_hz', b'obstacle_polling_frequency_hz', 'plan_deviation_m', b'plan_deviation_m', 'position_polling_frequency_hz', b'position_polling_frequency_hz']) 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['_angular_degs_per_sec', b'_angular_degs_per_sec']) Literal['angular_degs_per_sec'] | None
WhichOneof(oneof_group: Literal['_linear_m_per_sec', b'_linear_m_per_sec']) Literal['linear_m_per_sec'] | None
WhichOneof(oneof_group: Literal['_obstacle_polling_frequency_hz', b'_obstacle_polling_frequency_hz']) Literal['obstacle_polling_frequency_hz'] | None
WhichOneof(oneof_group: Literal['_plan_deviation_m', b'_plan_deviation_m']) Literal['plan_deviation_m'] | None
WhichOneof(oneof_group: Literal['_position_polling_frequency_hz', b'_position_polling_frequency_hz']) Literal['position_polling_frequency_hz'] | 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.motion.MoveOnGlobeRequest(*, name: str = ..., destination: viam.gen.common.v1.common_pb2.GeoPoint | None = ..., heading: float | None = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., movement_sensor_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., obstacles: collections.abc.Iterable[viam.gen.common.v1.common_pb2.GeoGeometry] | None = ..., motion_configuration: global___MotionConfiguration | None = ..., bounding_regions: collections.abc.Iterable[viam.gen.common.v1.common_pb2.GeoGeometry] | None = ..., 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.

name: str

Name of the motion service

heading: float

Optional compass heading to achieve at the destination, in degrees [0-360)

property destination: viam.gen.common.v1.common_pb2.GeoPoint

Destination, encoded as a GeoPoint

property component_name: viam.gen.common.v1.common_pb2.ResourceName

Component on the robot to move to the specified destination

property movement_sensor_name: viam.gen.common.v1.common_pb2.ResourceName

Name of the movement sensor which will be used to check robot location

property obstacles: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.GeoGeometry]

Obstacles to be considered for motion planning

property motion_configuration: global___MotionConfiguration

Optional set of motion configuration options

property bounding_regions: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.GeoGeometry]

Set of obstacles which the robot must remain within while navigating

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['_heading', b'_heading', '_motion_configuration', b'_motion_configuration', 'component_name', b'component_name', 'destination', b'destination', 'extra', b'extra', 'heading', b'heading', 'motion_configuration', b'motion_configuration', 'movement_sensor_name', b'movement_sensor_name']) 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['_heading', b'_heading']) Literal['heading'] | None
WhichOneof(oneof_group: Literal['_motion_configuration', b'_motion_configuration']) Literal['motion_configuration'] | 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.motion.MoveOnGlobeResponse(*, execution_id: 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.

execution_id: str

The unique ID which identifies the execution. Multiple plans will share the same execution_id if they were generated due to replanning.

class viam.proto.service.motion.MoveOnMapRequest(*, name: str = ..., destination: viam.gen.common.v1.common_pb2.Pose | None = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., slam_service_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., motion_configuration: global___MotionConfiguration | None = ..., obstacles: collections.abc.Iterable[viam.gen.common.v1.common_pb2.Geometry] | None = ..., 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.

name: str

Name of the motion service

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

Specify a destination to, which can be any pose with respect to the SLAM map’s origin

property component_name: viam.gen.common.v1.common_pb2.ResourceName

Component on the robot to move to the specified destination

property slam_service_name: viam.gen.common.v1.common_pb2.ResourceName

Name of the slam service from which the SLAM map is requested

property motion_configuration: global___MotionConfiguration

Optional set of motion configuration options

property obstacles: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.Geometry]

Obstacles to be considered for motion planning

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['_motion_configuration', b'_motion_configuration', 'component_name', b'component_name', 'destination', b'destination', 'extra', b'extra', 'motion_configuration', b'motion_configuration', 'slam_service_name', b'slam_service_name']) 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['_motion_configuration', b'_motion_configuration']) Literal['motion_configuration'] | 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.motion.MoveOnMapResponse(*, execution_id: 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.

execution_id: str

The unique ID which identifies the execution. Multiple plans will share the same execution_id if they were generated due to replanning.

class viam.proto.service.motion.MoveRequest(*, name: str = ..., destination: viam.gen.common.v1.common_pb2.PoseInFrame | None = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., world_state: viam.gen.common.v1.common_pb2.WorldState | None = ..., constraints: global___Constraints | None = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Moves any component on the robot to a specified destination which can be from the reference frame of any other component on the robot.

name: str

Name of the motion service

property destination: viam.gen.common.v1.common_pb2.PoseInFrame

Destination to move to, which can a pose in the reference frame of any frame in the robot’s frame system

property component_name: viam.gen.common.v1.common_pb2.ResourceName

Component on the robot to move to the specified destination

property world_state: viam.gen.common.v1.common_pb2.WorldState

Avoid obstacles by specifying their geometries in the world state Augment the frame system of the robot by specifying additional transforms to add to it for the duration of the Move

property constraints: global___Constraints

Constrain the way the robot will move

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['_constraints', b'_constraints', '_world_state', b'_world_state', 'component_name', b'component_name', 'constraints', b'constraints', 'destination', b'destination', 'extra', b'extra', 'world_state', b'world_state']) 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['_constraints', b'_constraints']) Literal['constraints'] | None
WhichOneof(oneof_group: Literal['_world_state', b'_world_state']) Literal['world_state'] | 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.motion.MoveResponse(*, success: 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.

success: bool
class viam.proto.service.motion.ObstacleDetector(*, vision_service: viam.gen.common.v1.common_pb2.ResourceName | None = ..., camera: viam.gen.common.v1.common_pb2.ResourceName | None = ...)

Bases: google.protobuf.message.Message

Pairs a vision service with a camera, informing the service about which camera it may use

property vision_service: viam.gen.common.v1.common_pb2.ResourceName
property camera: viam.gen.common.v1.common_pb2.ResourceName
HasField(field_name: Literal['camera', b'camera', 'vision_service', b'vision_service']) 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.motion.OrientationConstraint(*, orientation_tolerance_degs: float | None = ...)

Bases: google.protobuf.message.Message

OrientationConstraint specifies that the component being moved will not deviate its orientation beyond some threshold relative to the goal. It does not constrain the motion of components other than the component_name specified in motion.Move

orientation_tolerance_degs: float

Max allowable orientation deviation, in degrees, while on the shortest path between start / goal states

HasField(field_name: Literal['_orientation_tolerance_degs', b'_orientation_tolerance_degs', 'orientation_tolerance_degs', b'orientation_tolerance_degs']) 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['_orientation_tolerance_degs', b'_orientation_tolerance_degs']) Literal['orientation_tolerance_degs'] | 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.motion.Plan(*, id: str = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., execution_id: str = ..., steps: collections.abc.Iterable[global___PlanStep] | None = ...)

Bases: google.protobuf.message.Message

A plan describes a motion plan

id: str

The plan’s unique ID

execution_id: str

The unique ID which identifies the execution. Multiple plans will share the same execution_id if they were generated due to replanning

property component_name: viam.gen.common.v1.common_pb2.ResourceName

The component requested to be moved. Used for tracking & stopping. NOTE: A plan may move more components than just the root component.

property steps: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlanStep]

The steps of a plan is an ordered list of plan steps

HasField(field_name: Literal['component_name', b'component_name']) 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.motion.PlanState

Bases: _PlanState

The states that a plan can be in. InProgress if the plan is executing. Stopped if the plan was stopped. Suceeded if the robot reached its destination successfully. Failed if the robot did not reach its destination.

class viam.proto.service.motion.PlanStatus(*, state: global___PlanState = ..., timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., reason: str | None = ...)

Bases: google.protobuf.message.Message

Plan status describes the state of a given plan at a point in time

state: global___PlanState

The state of the plan execution

reason: str

The reason for the state change. If motion plan failed this will return the error message. If motion needed to re-plan, this will return the re-plan reason.

property timestamp: google.protobuf.timestamp_pb2.Timestamp

The time the executing plan transtioned to the state

HasField(field_name: Literal['_reason', b'_reason', 'reason', b'reason', 'timestamp', b'timestamp']) 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['_reason', b'_reason']) Literal['reason'] | 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.motion.PlanStatusWithID(*, plan_id: str = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., execution_id: str = ..., status: global___PlanStatus | None = ...)

Bases: google.protobuf.message.Message

PlanStatusWithID describes the state of a given plan at a point in time plus the plan_id, component_name and execution_id the status is associated with

plan_id: str

The unique ID of the plan

execution_id: str

The unique ID which identifies the plan execution. Multiple plans will share the same execution_id if they were generated due to replanning.

property component_name: viam.gen.common.v1.common_pb2.ResourceName

The component to be moved. Used for tracking & stopping. NOTE: A plan may move more components than just the component_name.

property status: global___PlanStatus
HasField(field_name: Literal['component_name', b'component_name', 'status', b'status']) 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.motion.PlanStep(*, step: collections.abc.Mapping[str, global___ComponentState] | 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.

class StepEntry(*, key: str = ..., value: global___ComponentState | 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.

key: str
property value: global___ComponentState
HasField(field_name: Literal['value', b'value']) 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.

property step: google.protobuf.internal.containers.MessageMap[str, global___ComponentState]

A step is the component state each component resource should reach while executing that step of the plan. Keys are the fully qualified component name.

class viam.proto.service.motion.PlanWithStatus(*, plan: global___Plan | None = ..., status: global___PlanStatus | None = ..., status_history: collections.abc.Iterable[global___PlanStatus] | None = ...)

Bases: google.protobuf.message.Message

Describes a plan, its current status & all status changes that have occured previously on that plan

property plan: global___Plan

The plan

property status: global___PlanStatus

The current status of the plan

property status_history: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlanStatus]

The prior status changes that have happened during plan execution

HasField(field_name: Literal['plan', b'plan', 'status', b'status']) 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.motion.StopPlanRequest(*, name: str = ..., component_name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., 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.

name: str

The name of the motion service

property component_name: viam.gen.common.v1.common_pb2.ResourceName

The component of the currently executing plan to stop

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['component_name', b'component_name', '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.service.motion.StopPlanResponse

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.