SetTorqueLimits#

This command sets thresholds for the torques applied to each motor, as percentages of the maximum allowable torques that can be applied at each motor. These thresholds can be interpreted in two different ways:

  • When the second argument of SetTorqueLimitsCfg is 0 or 1, the absolute values of the actual motor torques (GetRtJointTorq), also reported as percentages of the maximum allowable torques, are compared to the respective thresholds.

  • When the second argument of SetTorqueLimitsCfg is 2, which is the default setting as of firmware 11.1, the absolute value of the difference between the actual (GetRtJointTorq) and calculated motor torque (GetRtTargetJointTorq) of each joint is compared with the respective threshold. Thus, in this case, the arguments of SetTorqueLimits should be rather small, for example, about 10 (percent).

When a torque thresholds is exceeded, a customizable event is created. The event behavior can be set by the first argument of SetTorqueLimitsCfg.

This command is intended only to improve the chances of protecting your robot, its end-effector, and the surrounding equipment in the event of a collision. The actual torque in each motor (GetRtJointTorq) is estimated by measuring the current in the corresponding drive. The calculated torque (GetRtTargetJointTorq) is obtained from the dynamic model of the robot.

Syntax#

SetTorqueLimits(τ1234)

Arguments#

  • τi: torque threshold represented by a percentage of the maximum allowable torque that can be applied at motor i, where i = 1, 2, …, 4 ranging from 0.001 to 100.

Default values#

The default settings are applied whenever the robot is activated or reactivated.

By default, all torque thresholds are set to 100%.

Further details#

Unlike the SetJointLimits commands, the SetTorqueLimits command can only be applied after the robot has been activated. Note that high accelerations or large movements may also produce high torque peaks. Therefore, you should rely on this command only in the vicinity of obstacles, for example, while applying an adhesive. Remember that SetTorqueLimits is a motion command and will therefore be inserted in the motion queue and not necessarily executed immediately.

Usage restrictions#

This command is added to the robot’s motion queue and can only be executed when the robot is ready for motion, not in an error state and when no safety signal conditions are present. Otherwise, the robot will report one of the following:

  • [1005][The robot is not activated.]

  • [1011][The robot is already in error.]

Cyclic protocols#

In cyclic protocols, the SetTorqueLimits command is represented by MotionCommandID 27. See Section 4.2 for more details.