Skip to content

Gripper Set Max Pump Speed

SUMMARY

Set Max Pump Speed configures the maximum speed of a suction gripper's vacuum pump.

This skill is used to tune how quickly vacuum builds - lower speeds reduce noise and air consumption; higher speeds reduce cycle time.

UNITS

max_speed in percent (0-100).

The Skill

python
gripper.set_max_pump_speed(max_speed=80)

The Code

Safety first!

A real robot will faithfully do whatever you ask of it - so please take a moment to clear the workspace, keep an E-Stop within reach, and be ready to disconnect.

Operating real hardware is at your own risk.

python
"""
Demonstrates setting the maximum vacuum-pump speed of a suction gripper.

Supports Piab grippers only on the URCAP protocol. Not supported for the
simulation-only custom.SuctionGripper - it has no set_max_pump_speed()
method at all, since it models no pump.

Usage:
    python set_max_pump_speed.py --ip <ROBOT_IP>
"""

import argparse
from loguru import logger

from telekinesis.synapse.tools.suction_grippers import piab


def main(ip: str) -> None:
    """Sets the maximum pump speed of a Piab gripper to 80%."""

    #===================== Create Gripper ======================================
    gripper = piab.PiabPiCobotElectric()

    # ==================== Run Skill ===========================================
    try:
        gripper.connect(ip=ip, protocol="URCAP")
        gripper.set_max_pump_speed(max_speed=80)
        logger.success("Maximum pump speed set to 80%.")
    except (ConnectionError, OSError) as e:
        logger.error(f"Error occurred: {e}")
    finally:
        gripper.disconnect()


if __name__ == "__main__":
    p = argparse.ArgumentParser(description="Piab gripper set max pump speed")
    p.add_argument("--ip", default="192.168.2.2", help="IP for Robot Controller")
    args = p.parse_args()

    main(ip=args.ip)

Parameter Configuration

ParameterTypeDefaultDescription
max_speedint-Maximum pump speed as a percentage, 0-100.

Returns

This skill returns nothing (None).

Raises

ExceptionCondition
TypeErrormax_speed is not an integer
ValueErrormax_speed is outside 0 to 100
ConnectionErrorThe backend is not connected
RuntimeErrorThe command fails, or the gripper is not connected
NotImplementedErrorOn Piab with MODBUS_RTU, because the pump's serial protocol documentation lists no parameter index for the maximum pump PWM; on Piab with ISAACSIM, because the simulation has no pump
AttributeErrorCalled on custom.SuctionGripper - this class does not define set_max_pump_speed()

How to Tune the Parameters

max_speed only caps how fast the pump is allowed to ramp toward the target vacuum level set by grasp/set_vacuum_level - it does not change that target. Lower it in noise-sensitive cells or where compressed-air supply is limited; raise it, or leave it at the gripper's unrestricted default, when cycle time matters more than noise or air use. This parameter is only available on Piab with protocol="URCAP" - it raises NotImplementedError on Piab with MODBUS_RTU or ISAACSIM, and AttributeError on custom.SuctionGripper, which has no pump to speed-limit.

Where to Use the Skill

  • Noise-sensitive cells - Cap pump speed to reduce audible noise in shared workspaces
  • Air-consumption limits - Lower the cap when the facility's compressed-air supply is constrained

When Not to Use the Skill

Do not use Set Max Pump Speed when:

  • The gripper is not connected - always call connect before issuing commands
  • Fast cycle time is the priority - leaving the pump at its default (unrestricted) speed grasps fastest