Get the 3D models of the component
Get the position of the end of the arm expressed as a pose
const arm = new VIAM.ArmClient(machine, 'my_arm');
const pose = await arm.getEndPosition();
For more information, see Arm API.
Get the geometries of the component in their current configuration
const arm = new VIAM.ArmClient(machine, 'my_arm');
const geometries = await arm.getGeometries();
console.log(geometries);
For more information, see Arm API.
Gets the current position of each joint.
const arm = new VIAM.ArmClient(machine, 'my_arm');
const jointPositions = await arm.getJointPositions();
For more information, see Arm API.
Get the kinematics information associated with the arm.
Optionalextra: StructThe legacy kinematics data shape or the newer object containing kinematics data plus a map of URDF mesh file paths to mesh data.
Get whether the arm is currently in manual mode.
Get the optional features the arm supports.
Get if the arm is currently moving.
const arm = new VIAM.ArmClient(machine, 'my_arm');
const isMoving = await arm.isMoving();
console.log(isMoving);
For more information, see Arm API.
Move each joint of the arm based on the angles on the joint positions.
const arm = new VIAM.ArmClient(machine, 'my_arm');
// Move an arm with 6 joints (6 DoF)
await arm.moveToJointPositions([90, 0, 0, 0, 15, 0]);
For more information, see Arm API.
Move the end of the arm to the pose.
const arm = new VIAM.ArmClient(machine, 'my_arm');
// Create a pose for the arm to move to
const pose: Pose = {
x: -500,
y: -200,
z: 62,
oX: 1,
oY: 0,
oZ: 1,
theta: 90,
};
// Move the arm to the pose
await arm.moveToPosition(pose);
For more information, see Arm API.
ReadonlynameThe name of the resource.
Enter or exit manual mode for an arm that supports it.
Whether to enter (true) or exit (false) manual mode.
OptionalenabledFor: number
How long to stay in manual mode, in seconds. 0 or undefined means no time limit.
Optionalextra: StructStop the motion of the arm.
const arm = new VIAM.ArmClient(machine, 'my_arm');
await arm.stop();
For more information, see Arm API.
Get the status of the resource.
Represents a physical robot arm that exists in three-dimensional space.