viam.components.arm

Submodules

Attributes

KinematicsReturn

Classes

KinematicsFileFormat

Mesh

Abstract base class for protocol messages.

Pose

Pose is a combination of location and orientation.

JointPositions

Abstract base class for protocol messages.

MoveOptions

MoveOptions specifies kinematic constraints for an arm motion. All fields

Package Contents

viam.components.arm.KinematicsReturn
class viam.components.arm.KinematicsFileFormat

Bases: _KinematicsFileFormat

class viam.components.arm.Mesh(*, content_type: str = ..., mesh: bytes = ..., original_file_source_path_diagnostic: str | 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.

content_type: str

Content type of mesh (e.g. ply)

mesh: bytes

Contents of mesh data in binary form defined by content_type

original_file_source_path_diagnostic: str

Path the mesh was loaded from, relative to the kinematics file. Informational on the wire.

HasField(field_name: _HasFieldArgType) → 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: _WhichOneofArgType__original_file_source_path_diagnostic) → _WhichOneofReturnType__original_file_source_path_diagnostic | 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.components.arm.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.components.arm.JointPositions(*, values: collections.abc.Iterable[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.

values() → google.protobuf.internal.containers.RepeatedScalarFieldContainer[float]

A list of joint positions. Rotations values are in degrees, translational values in mm. There should be 1 entry in the list per joint DOF, ordered spatially from the base toward the end effector of the arm

class viam.components.arm.MoveOptions(*, max_vel_degs_per_sec: float | None = ..., max_acc_degs_per_sec2: float | None = ..., max_vel_degs_per_sec_joints: collections.abc.Iterable[float] | None = ..., max_acc_degs_per_sec2_joints: collections.abc.Iterable[float] | None = ..., max_tcp_speed: float | None = ...)

Bases: google.protobuf.message.Message

MoveOptions specifies kinematic constraints for an arm motion. All fields are optional ceilings; any combination may be set. Every constraint that is set is respected at every point along the executed trajectory. The limiting constraint may change throughout execution.

max_vel_degs_per_sec: float

Maximum allowable velocity of an arm joint, in degrees per second. The arm driver will move as fast as possible up to the set value. Ignored when max_vel_degs_per_sec_joints is set.

max_acc_degs_per_sec2: float

Maximum allowable acceleration of an arm joint, in degrees per second squared. The arm driver will accelerate as fast as possible up to the set value. ignored when max_acc_degs_per_sec2_joints is set.

max_tcp_speed: float

Maximum allowable speed of an arm’s tool center point in meters per second. The arm driver will move the tool center point as fast as possible up to this set value.

max_vel_degs_per_sec_joints() → google.protobuf.internal.containers.RepeatedScalarFieldContainer[float]

Per-joint maximum velocity in degrees per second. The arm driver will move each joint as fast as possible up to its respective set value.

max_acc_degs_per_sec2_joints() → google.protobuf.internal.containers.RepeatedScalarFieldContainer[float]

Per-joint maximum acceleration in degrees per second squared. The arm driver will accelerate each joint as fast as possible up to its respective set value.

HasField(field_name: _HasFieldArgType) → 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: _WhichOneofArgType__max_acc_degs_per_sec2) → _WhichOneofReturnType__max_acc_degs_per_sec2 | None
WhichOneof(oneof_group: _WhichOneofArgType__max_tcp_speed) → _WhichOneofReturnType__max_tcp_speed | None
WhichOneof(oneof_group: _WhichOneofArgType__max_vel_degs_per_sec) → _WhichOneofReturnType__max_vel_degs_per_sec | 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