set_target_payload(m, cog, inertia=[0, 0, 0, 0, 0, 0], transition_time=0)
Sets the mass, CoG (center of gravity), the inertia matrix of the active payload and the transition time for applying new settings.
This function must be called when the payload mass, the mass displacement (CoG) or the inertia matrix changes - (i.e. when the robot picks up or puts down a workpiece).
Parameters
m
: mass in kilograms.
cog
: Center of Gravity, a vector with three elements [CoGx, CoGy, CoGz] specifying the offset (in meters) from the tool mount.
inertia
: payload inertia matrix (in kg*m^2), as a vector with six elements [Ixx, Iyy, Izz, Ixy, Ixz, Iyz] with origin in the CoG and the axes aligned with the tool flange axes.
transition_time
: the duration of the payload property changes in seconds
Notes:
-
This script should be used instead of the deprecated
set_payload
,set_payload_mass
, andset_payload_cog
. -
The payload mass and CoG are required, the inertia matrix and transition time are optional.
-
When inertia matrix is left out, a zero matrix will be used.
-
When transition time is left out, the change will be applied instantaneously, identically to how the deprecated
set_payload
,set_payload_mass
andset_payload_cog
work.
-
-
The maximum value allowed for each of the components of the inertia matrix is +/- 133 kg*m^2. An exception is thrown if limits are exceeded.
-
The first three elements of the inertia matrix (i.e. Ixx, Iyy, Izz) cannot be negative. An exception is thrown if either value is negative.
-
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 behaviour of
zero_ftsensor()
. -
Setting a transition time larger than zero avoids the robot doing a small "jump" when payload changes. This is useful when picking up or releasing heavy objects.
-
The internal force/torque sensor in the robot tool is reset each time the payload is updated. This means that the final reset will be performed at the end of the payload transition time. If the payload is being accelerated at the time of the final reset, the force/torque measurement will be affected. It's always recommended to call
zero_ftsensor()
to reset the force/torque sensor before using it, e.g. in Force Mode.