:py:mod:`viam.proto.common` =========================== .. py:module:: viam.proto.common .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: viam.proto.common.ActuatorStatus viam.proto.common.AnalogStatus viam.proto.common.Capsule viam.proto.common.DigitalInterruptStatus viam.proto.common.DoCommandRequest viam.proto.common.DoCommandResponse viam.proto.common.GeometriesInFrame viam.proto.common.Geometry viam.proto.common.GeoObstacle viam.proto.common.GeoPoint viam.proto.common.GetGeometriesRequest viam.proto.common.GetGeometriesResponse viam.proto.common.GetKinematicsRequest viam.proto.common.GetKinematicsResponse viam.proto.common.GetReadingsRequest viam.proto.common.GetReadingsResponse viam.proto.common.KinematicsFileFormat viam.proto.common.LogEntry viam.proto.common.Orientation viam.proto.common.PointCloudObject viam.proto.common.Pose viam.proto.common.PoseInFrame viam.proto.common.RectangularPrism viam.proto.common.ResourceName viam.proto.common.ResponseMetadata viam.proto.common.Sphere viam.proto.common.Transform viam.proto.common.Vector3 viam.proto.common.WorldState .. py:class:: ActuatorStatus(*, is_moving: bool = ...) Bases: :py:obj:`google.protobuf.message.Message` ActuatorStatus is a generic status for resources that only need to return actuator status. .. py:attribute:: is_moving :type: bool .. py:class:: AnalogStatus(*, value: int = ...) Bases: :py:obj:`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. .. py:attribute:: value :type: int Current value of the analog reader of a robot's board .. py:class:: Capsule(*, radius_mm: float = ..., length_mm: float = ...) Bases: :py:obj:`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. .. py:attribute:: radius_mm :type: float .. py:attribute:: length_mm :type: float .. py:class:: DigitalInterruptStatus(*, value: int = ...) Bases: :py:obj:`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. .. py:attribute:: value :type: int Current value of the digital interrupt of a robot's board .. py:class:: DoCommandRequest(*, name: str = ..., command: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` DoCommandRequest represents a generic DoCommand input .. py:property:: command :type: google.protobuf.struct_pb2.Struct .. py:attribute:: name :type: str .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: DoCommandResponse(*, result: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` DoCommandResponse represents a generic DoCommand output .. py:property:: result :type: google.protobuf.struct_pb2.Struct .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GeometriesInFrame(*, reference_frame: str = ..., geometries: collections.abc.Iterable[global___Geometry] | None = ...) Bases: :py:obj:`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. .. py:property:: geometries :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Geometry] Dimensional type .. py:attribute:: reference_frame :type: str Reference frame of the observer of the geometry .. py:class:: Geometry(*, center: global___Pose | None = ..., sphere: global___Sphere | None = ..., box: global___RectangularPrism | None = ..., capsule: global___Capsule | None = ..., label: str = ...) Bases: :py:obj:`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. .. py:property:: center :type: global___Pose Pose of a geometries center point .. py:property:: sphere :type: global___Sphere .. py:property:: box :type: global___RectangularPrism .. py:property:: capsule :type: global___Capsule .. py:attribute:: label :type: str Label of the geometry. If none supplied, will be an empty string. .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:method:: 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. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: GeoObstacle(*, location: global___GeoPoint | None = ..., geometries: collections.abc.Iterable[global___Geometry] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` GeoObstacle contains information about the geometric structure of an obstacle and the location of the obstacle, captured in latitude and longitude. .. py:property:: location :type: global___GeoPoint Location of the obstacle .. py:property:: geometries :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Geometry] Geometries that describe the obstacle, where embedded Pose data is with respect to the specified location .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GeoPoint(*, latitude: float = ..., longitude: float = ...) Bases: :py:obj:`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. .. py:attribute:: latitude :type: float .. py:attribute:: longitude :type: float .. py:class:: GetGeometriesRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str The component name .. py: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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetGeometriesResponse(*, geometries: collections.abc.Iterable[global___Geometry] | None = ...) Bases: :py:obj:`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. .. py:property:: geometries :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Geometry] All geometries associated with the component, in their current configuration, in the frame of that component. .. py:class:: GetKinematicsRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str The component name .. py: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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetKinematicsResponse(*, format: global___KinematicsFileFormat = ..., kinematics_data: bytes = ...) Bases: :py:obj:`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. .. py:attribute:: format :type: 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 .. py:attribute:: kinematics_data :type: bytes The byte contents of the file .. py:class:: GetReadingsRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str Name of a sensor .. py: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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetReadingsResponse(*, readings: collections.abc.Mapping[str, google.protobuf.struct_pb2.Value] | None = ...) Bases: :py:obj:`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. .. py:class:: ReadingsEntry(*, key: str = ..., value: google.protobuf.struct_pb2.Value | None = ...) Bases: :py:obj:`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. .. py:property:: value :type: google.protobuf.struct_pb2.Value .. py:attribute:: key :type: str .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:property:: readings :type: google.protobuf.internal.containers.MessageMap[str, google.protobuf.struct_pb2.Value] .. py:class:: KinematicsFileFormat Bases: :py:obj:`_KinematicsFileFormat` .. py:class:: 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: :py:obj:`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. .. py:property:: time :type: google.protobuf.timestamp_pb2.Timestamp .. py:property:: caller :type: google.protobuf.struct_pb2.Struct .. py:property:: fields :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.struct_pb2.Struct] .. py:attribute:: host :type: str .. py:attribute:: level :type: str .. py:attribute:: logger_name :type: str .. py:attribute:: message :type: str .. py:attribute:: stack :type: str .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: Orientation(*, o_x: float = ..., o_y: float = ..., o_z: float = ..., theta: float = ...) Bases: :py:obj:`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. .. py:attribute:: o_x :type: float x component of a vector defining axis of rotation .. py:attribute:: o_y :type: float y component of a vector defining axis of rotation .. py:attribute:: o_z :type: float z component of a vector defining axis of rotation .. py:attribute:: theta :type: float degrees .. py:class:: PointCloudObject(*, point_cloud: bytes = ..., geometries: global___GeometriesInFrame | None = ...) Bases: :py:obj:`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 .. py:property:: geometries :type: global___GeometriesInFrame volume of a given geometry .. py:attribute:: point_cloud :type: bytes image frame expressed in bytes .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: Pose(*, x: float = ..., y: float = ..., z: float = ..., o_x: float = ..., o_y: float = ..., o_z: float = ..., theta: float = ...) Bases: :py:obj:`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. .. py:attribute:: x :type: float millimeters from the origin .. py:attribute:: y :type: float millimeters from the origin .. py:attribute:: z :type: float millimeters from the origin .. py:attribute:: o_x :type: float z component of a vector defining axis of rotation .. py:attribute:: o_y :type: float x component of a vector defining axis of rotation .. py:attribute:: o_z :type: float y component of a vector defining axis of rotation .. py:attribute:: theta :type: float degrees .. py:class:: PoseInFrame(*, reference_frame: str = ..., pose: global___Pose | None = ...) Bases: :py:obj:`google.protobuf.message.Message` PoseInFrame contains a pose and the and the reference frame in which it was observed .. py:property:: pose :type: global___Pose .. py:attribute:: reference_frame :type: str .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: RectangularPrism(*, dims_mm: global___Vector3 | None = ...) Bases: :py:obj:`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 .. py:property:: dims_mm :type: global___Vector3 .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: ResourceName(*, namespace: str = ..., type: str = ..., subtype: str = ..., name: str = ...) Bases: :py:obj:`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. .. py:attribute:: namespace :type: str .. py:attribute:: type :type: str .. py:attribute:: subtype :type: str .. py:attribute:: name :type: str .. py:class:: ResponseMetadata(*, captured_at: google.protobuf.timestamp_pb2.Timestamp | None = ...) Bases: :py:obj:`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. .. py:property:: captured_at :type: 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. .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:method:: 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. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: Sphere(*, radius_mm: float = ...) Bases: :py:obj:`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. .. py:attribute:: radius_mm :type: float .. py:class:: Transform(*, reference_frame: str = ..., pose_in_observer_frame: global___PoseInFrame | None = ..., physical_object: global___Geometry | None = ...) Bases: :py:obj:`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. .. py:property:: pose_in_observer_frame :type: global___PoseInFrame the pose of the above reference frame with respect to a different observer reference frame .. py:property:: physical_object :type: global___Geometry .. py:attribute:: reference_frame :type: str the name of a given reference frame .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:method:: 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. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: Vector3(*, x: float = ..., y: float = ..., z: float = ...) Bases: :py:obj:`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. .. py:attribute:: x :type: float .. py:attribute:: y :type: float .. py:attribute:: z :type: float .. py:class:: WorldState(*, obstacles: collections.abc.Iterable[global___GeometriesInFrame] | None = ..., transforms: collections.abc.Iterable[global___Transform] | None = ...) Bases: :py:obj:`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. .. py:property:: obstacles :type: 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 .. py:property:: transforms :type: 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