Skip to content

Set Vacuum Level

SUMMARY

Set Vacuum Level configures the vacuum level a suction gripper uses on subsequent grasp calls.

This skill is used to tune grip strength for a specific part without passing vacuum_level on every grasp call.

SUPPORTED GRIPPERS

Available on Piab suction grippers.

UNITS

vacuum_level in the configured vacuum unit - "percentage" (default, 0-100%) or "kPa" (0-100 kPa max). The scales are numerically identical: 60% is the same as 60 kPa.

The Skill

python
gripper.set_vacuum_level(vacuum_level=60, unit="percentage")

The Code

Example: Configure Vacuum Level Before Grasping

python
"""
Piab set_vacuum_level example for the Synapse SDK.

Configures a 60% default vacuum level, then grasps using it.

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

import argparse
from loguru import logger

from telekinesis.synapse.tools.suction_grippers import piab


def main(ip: str):
    """Configure the default vacuum level, then grasp using it."""

    # Create and connect to the gripper
    gripper = piab.PiabPiCobotElectric()
    gripper.connect(ip=ip, protocol="URCAP")

    try:
        gripper.set_vacuum_level(60, unit="percentage")
        gripper.grasp()  # uses the 60% level just configured
        logger.success(f"Grasped at configured level: {gripper.get_vacuum_level()}%")
    finally:
        gripper.disconnect()


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Piab gripper set_vacuum_level example")
    parser.add_argument("--ip", type=str, required=True, help="UR controller IP address")
    args = parser.parse_args()

    main(ip=args.ip)

The Explanation of the Code

set_vacuum_level updates the gripper's configured vacuum level immediately - it is applied to the backend right away, not just cached for the next grasp call. The default level after connect is 50%.

How to Tune the Parameters

Piab piCOBOT Electric

ParameterTypeDefaultDescription
vacuum_levelint-Desired vacuum level, 0-100 (max 100 kPa).
unitstr"percentage"Unit of vacuum_level. Accepts "percentage" or "kPa".

Where to Use the Skill

  • Part-specific tuning - Set a lower vacuum level for delicate or porous parts, higher for heavier or non-porous ones
  • Session setup - Configure the level once after connect if every grasp in the script uses the same part

When Not to Use the Skill

Do not use Set Vacuum Level when:

  • The gripper is not connected - always call connect before issuing commands
  • Vacuum level varies per pick - pass vacuum_level directly to Grasp instead of reconfiguring the session default each time