Payload

A typical task for a robotic arm often involves carrying payloads, which can vary in weight and significantly impact motion control. To address this, many robot control systems offer the option to specify a payload, ensuring that the system accounts for the payload weight during motion planning. This chapter shows how to read and modify the current payload.

Note

SetPayload is implemented by VorausIndustrialRobotArm and YuRobotArm only, so payload configuration is not available on KukaRobotArm or FanucRobotArm.

Setting a Payload

To configure an additional payload mass, call set_payload() with a Payload: the mass as Kilograms and, optionally, the center of mass as a Translation in the tool coordinate system. Payload::new(mass) alone places the center of mass at the tool origin. The call returns once the robot control reports the new mass; the center of mass cannot be read back, so it is not confirmed.

Important

The payload is the mass carried in addition to the selected tool, for example a picked part. The tool’s own mass is part of the tool configuration on the control, so do not include the gripper: a 1 kg gripper holding a 0.5 kg part is a payload of 0.5 kg. The control attaches the payload to the active tool, so set it again after selecting another tool rather than relying on it being kept.

robot.set_payload(
    Payload::new(Kilograms(1.0)).with_center_of_mass(Translation::new(
        Meters(0.1),
        Meters(0.1),
        Meters(0.1),
    )),
)?;

The current payload is removed with remove_payload(). It sets the payload mass to 0 kg and the center of mass to the origin of the tool coordinate system:

robot.remove_payload()?;

Reading the Current Payload Mass

The currently configured payload mass is read with payload_mass(), which returns the mass in Kilograms. Reading the corresponding center of mass is not supported by the control.

let mass = robot.payload_mass()?;
info!("Payload mass: {mass}"); // Should print 1kg

Full Example

Trait Definitions