viam.proto.common

@generated by Viam. Do not edit manually!

Classes

ActuatorStatus

ActuatorStatus is a generic status for resources that only need to return actuator status.

Capsule

Abstract base class for protocol messages.

DoCommandRequest

DoCommandRequest represents a generic DoCommand input

DoCommandResponse

DoCommandResponse represents a generic DoCommand output

GeoGeometry

GeoGeometry contains information describing Geometry(s) that is located at a GeoPoint

GeometriesInFrame

GeometriesinFrame contains the dimensions of a given geometry, pose of its center point, and the reference frame by which it was

Geometry

Geometry contains the dimensions of a given geometry and the pose of its center. The geometry is one of either a sphere or a box.

GeoPoint

Abstract base class for protocol messages.

GetGeometriesRequest

Abstract base class for protocol messages.

GetGeometriesResponse

Abstract base class for protocol messages.

GetKinematicsRequest

Abstract base class for protocol messages.

GetKinematicsResponse

Abstract base class for protocol messages.

GetReadingsRequest

Abstract base class for protocol messages.

GetReadingsResponse

Abstract base class for protocol messages.

KinematicsFileFormat

LogEntry

Abstract base class for protocol messages.

Orientation

Abstract base class for protocol messages.

PointCloudObject

PointCloudObject contains an image in bytes with point cloud data of all of the objects captured by a given observer as well as a

Pose

Pose is a combination of location and orientation.

PoseInFrame

PoseInFrame contains a pose and the and the reference frame in which it was observed

RectangularPrism

RectangularPrism contains a Vector3 field corresponding to the X, Y, Z dimensions of the prism in mms

ResourceName

Abstract base class for protocol messages.

ResponseMetadata

Abstract base class for protocol messages.

Sphere

Abstract base class for protocol messages.

Transform

Transform contains a pose and two reference frames. The first reference frame is the starting reference frame, and the second reference

Vector3

Abstract base class for protocol messages.

WorldState

WorldState contains information about the physical environment around a given robot. All of the fields within this message are optional,

Package Contents

class viam.proto.common.ActuatorStatus(*, is_moving: bool = ...)

Bases: google.protobuf.message.Message

ActuatorStatus is a generic status for resources that only need to return actuator status.

is_moving: bool
class viam.proto.common.Capsule(*, radius_mm: float = ..., length_mm: 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.

radius_mm: float
length_mm: float
class viam.proto.common.DoCommandRequest(*, name: str = ..., command: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

DoCommandRequest represents a generic DoCommand input

name: str
property command: google.protobuf.struct_pb2.Struct
HasField(field_name: Literal['command', b'command']) 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.common.DoCommandResponse(*, result: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

DoCommandResponse represents a generic DoCommand output

property result: google.protobuf.struct_pb2.Struct
HasField(field_name: Literal['result', b'result']) 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.common.GeoGeometry(*, location: global___GeoPoint | None = ..., geometries: collections.abc.Iterable[global___Geometry] | None = ...)

Bases: google.protobuf.message.Message

GeoGeometry contains information describing Geometry(s) that is located at a GeoPoint

property location: global___GeoPoint

Location of the geometry

property geometries: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Geometry]

Geometries associated with the location, where embedded Pose data is with respect to the specified location

HasField(field_name: Literal['location', b'location']) 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.common.GeometriesInFrame(*, reference_frame: str = ..., geometries: collections.abc.Iterable[global___Geometry] | None = ...)

Bases: google.protobuf.message.Message

GeometriesinFrame contains the dimensions of a given geometry, pose of its center point, and the reference frame by which it was observed.

reference_frame: str

Reference frame of the observer of the geometry

property geometries: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Geometry]

Dimensional type

class viam.proto.common.Geometry(*, center: global___Pose | None = ..., sphere: global___Sphere | None = ..., box: global___RectangularPrism | None = ..., capsule: global___Capsule | None = ..., label: str = ...)

Bases: google.protobuf.message.Message

Geometry contains the dimensions of a given geometry and the pose of its center. The geometry is one of either a sphere or a box.

label: str

Label of the geometry. If none supplied, will be an empty string.

property center: global___Pose

Pose of a geometries center point

property sphere: global___Sphere
property box: global___RectangularPrism
property capsule: global___Capsule
HasField(field_name: Literal['box', b'box', 'capsule', b'capsule', 'center', b'center', 'geometry_type', b'geometry_type', 'sphere', b'sphere']) 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['geometry_type', b'geometry_type']) Literal['sphere', 'box', 'capsule'] | 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.common.GeoPoint(*, latitude: float = ..., longitude: 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.

latitude: float
longitude: float
class viam.proto.common.GetGeometriesRequest(*, 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.

name: str

The component name

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.common.GetGeometriesResponse(*, geometries: collections.abc.Iterable[global___Geometry] | 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 geometries: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Geometry]

All geometries associated with the component, in their current configuration, in the frame of that component.

class viam.proto.common.GetKinematicsRequest(*, 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.

name: str

The component name

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.common.GetKinematicsResponse(*, format: global___KinematicsFileFormat = ..., kinematics_data: 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.

format: global___KinematicsFileFormat

The kinematics of the component, in either URDF format or in Viam’s kinematic parameter format (spatial vector algebra) https://docs.viam.com/internals/kinematic-chain-config/#kinematic-parameters

kinematics_data: bytes

The byte contents of the file

class viam.proto.common.GetReadingsRequest(*, 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.

name: str

Name of a sensor

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.common.GetReadingsResponse(*, readings: collections.abc.Mapping[str, google.protobuf.struct_pb2.Value] | 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 ReadingsEntry(*, key: str = ..., value: google.protobuf.struct_pb2.Value | 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: google.protobuf.struct_pb2.Value
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 readings: google.protobuf.internal.containers.MessageMap[str, google.protobuf.struct_pb2.Value]
class viam.proto.common.KinematicsFileFormat

Bases: _KinematicsFileFormat

class viam.proto.common.LogEntry(*, host: str = ..., level: str = ..., time: google.protobuf.timestamp_pb2.Timestamp | None = ..., logger_name: str = ..., message: str = ..., caller: google.protobuf.struct_pb2.Struct | None = ..., stack: str = ..., fields: collections.abc.Iterable[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.

host: str
level: str
logger_name: str
message: str
stack: str
property time: google.protobuf.timestamp_pb2.Timestamp
property caller: google.protobuf.struct_pb2.Struct
property fields: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.struct_pb2.Struct]
HasField(field_name: Literal['caller', b'caller', 'time', b'time']) 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.common.Orientation(*, o_x: float = ..., o_y: float = ..., o_z: float = ..., theta: 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.

o_x: float

x component of a vector defining axis of rotation

o_y: float

y component of a vector defining axis of rotation

o_z: float

z component of a vector defining axis of rotation

theta: float

degrees

class viam.proto.common.PointCloudObject(*, point_cloud: bytes = ..., geometries: global___GeometriesInFrame | None = ...)

Bases: google.protobuf.message.Message

PointCloudObject contains an image in bytes with point cloud data of all of the objects captured by a given observer as well as a repeated list of geometries which respresents the center point and geometry of each of the objects within the point cloud

point_cloud: bytes

image frame expressed in bytes

property geometries: global___GeometriesInFrame

volume of a given geometry

HasField(field_name: Literal['geometries', b'geometries']) 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.common.Pose(*, x: float = ..., y: float = ..., z: float = ..., o_x: float = ..., o_y: float = ..., o_z: float = ..., theta: float = ...)

Bases: google.protobuf.message.Message

Pose is a combination of location and orientation. Location is expressed as distance which is represented by x , y, z coordinates. Orientation is expressed as an orientation vector which is represented by o_x, o_y, o_z and theta. The o_x, o_y, o_z coordinates represent the point on the cartesian unit sphere that the end of the arm is pointing to (with the origin as reference). That unit vector forms an axis around which theta rotates. This means that incrementing / decrementing theta will perform an inline rotation of the end effector. Theta is defined as rotation between two planes: the first being defined by the origin, the point (0,0,1), and the rx, ry, rz point, and the second being defined by the origin, the rx, ry, rz point and the local Z axis. Therefore, if theta is kept at zero as the north/south pole is circled, the Roll will correct itself to remain in-line.

x: float

millimeters from the origin

y: float

millimeters from the origin

z: float

millimeters from the origin

o_x: float

z component of a vector defining axis of rotation

o_y: float

x component of a vector defining axis of rotation

o_z: float

y component of a vector defining axis of rotation

theta: float

degrees

class viam.proto.common.PoseInFrame(*, reference_frame: str = ..., pose: global___Pose | None = ...)

Bases: google.protobuf.message.Message

PoseInFrame contains a pose and the and the reference frame in which it was observed

reference_frame: str
property pose: global___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.common.RectangularPrism(*, dims_mm: global___Vector3 | None = ...)

Bases: google.protobuf.message.Message

RectangularPrism contains a Vector3 field corresponding to the X, Y, Z dimensions of the prism in mms These dimensions are with respect to the referenceframe in which the RectangularPrism is defined

property dims_mm: global___Vector3
HasField(field_name: Literal['dims_mm', b'dims_mm']) 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.common.ResourceName(*, namespace: str = ..., type: str = ..., subtype: str = ..., 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.

namespace: str
type: str
subtype: str
name: str
class viam.proto.common.ResponseMetadata(*, captured_at: google.protobuf.timestamp_pb2.Timestamp | 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 captured_at: google.protobuf.timestamp_pb2.Timestamp

captured_at is the time at which the resource as close as physically possible, captured the data in the response. Note: If correlating between other resources, be sure that the means of measuring the capture are similar enough such that comparison can be made between them.

HasField(field_name: Literal['_captured_at', b'_captured_at', 'captured_at', b'captured_at']) 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['_captured_at', b'_captured_at']) Literal['captured_at'] | 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.common.Sphere(*, radius_mm: 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.

radius_mm: float
class viam.proto.common.Transform(*, reference_frame: str = ..., pose_in_observer_frame: global___PoseInFrame | None = ..., physical_object: global___Geometry | None = ...)

Bases: google.protobuf.message.Message

Transform contains a pose and two reference frames. The first reference frame is the starting reference frame, and the second reference frame is the observer reference frame. The second reference frame has a pose which represents the pose of an object in the first reference frame as observed within the second reference frame.

reference_frame: str

the name of a given reference frame

property pose_in_observer_frame: global___PoseInFrame

the pose of the above reference frame with respect to a different observer reference frame

property physical_object: global___Geometry
HasField(field_name: Literal['_physical_object', b'_physical_object', 'physical_object', b'physical_object', 'pose_in_observer_frame', b'pose_in_observer_frame']) 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['_physical_object', b'_physical_object']) Literal['physical_object'] | 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.common.Vector3(*, x: float = ..., y: float = ..., z: 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.

x: float
y: float
z: float
class viam.proto.common.WorldState(*, obstacles: collections.abc.Iterable[global___GeometriesInFrame] | None = ..., transforms: collections.abc.Iterable[global___Transform] | None = ...)

Bases: google.protobuf.message.Message

WorldState contains information about the physical environment around a given robot. All of the fields within this message are optional, they can include information about the physical dimensions of an obstacle, the freespace of a robot, and any desired transforms between a given reference frame and a new target reference frame.

property obstacles: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GeometriesInFrame]

a list of obstacles expressed as a geometry and the reference frame in which it was observed; this field is optional

property transforms: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Transform]

a list of Transforms, optionally with geometries. Used as supplemental transforms to transform a pose from one reference frame to another, or to attach moving geometries to the frame system. This field is optional