set_payload(m, cog)

Parameters

m: mass in kilograms

cog: Center of Gravity, a vector [CoGx, CoGy, CoGz] specifying the displacement (in meters) from the toolmount.

Deprecated: See set_target_payload to set mass, CoG and payload inertia matrix at the same time.

Set payload mass and center of gravity while resetting payload inertia matrix

Sets the mass and center of gravity (abbr. CoG) of the payload.

This function must be called, when the payload mass or mass CoG offset changes - i.e. when the robot picks up or puts down a workpiece.

Note: The force torque measurements are automatically zeroed when setting the payload. That ensures the readings are compensated for the payload. This is similar to the behavior of zero_ftsensor()

Warnings:

  • This script is deprecated since SW 5.10.0 because of the risk of inconsistent payload parameters. Use the set_target_payload instead to set mass, CoG and inertia matrix.

  • Omitting the cog parameter is not recommended. The Tool Center Point (TCP) will be used if the cog parameter is missing with the side effect that later calls to set_tcp will change also the CoG to the new TCP. Use the set_payload_mass function to change only the mass or use the get_target_payload_cog as second argument to not change the CoG.

  • Using this script function to modify payload parameters will reset the payload inertia matrix.

Example command:

  • set_payload(3., [0,0,.3])
    • Example Parameters:
      • m = 3 → mass is set to 3 kg payload
      • cog = [0,0,.3]    Center of Gravity is set to x=0 mm, y=0 mm, z=300 mm from the center of the tool mount in tool coordinates
  • set_payload(2.5, get_target_payload_cog())
    • Example Parameters:
      • m = 2.5 → mass is set to 2.5 kg payload
      • cog = use the current COG setting