Skip to main content

Simple Python interface for Robotiq grippers over a TCP socket (URCap/UR controller).

Project description

pyRobotiqUR pyRobotiqUR for Universal Robots

CI codecov

pyRobotiqUR is a small Python library that provides a simple socket-based interface to Robotiq grippers connected to a Universal Robots (UR) controller via the Robotiq URCap.

It talks to the UR controller over TCP using the Robotiq ASCII GET/SET protocol on the URCap’s internal server port (typically 63352).

Features

  • Connect to a UR controller over TCP/IP
  • Activate / reset the Robotiq gripper
  • Move to a raw position 0–255
  • Move using a convenient 0–100 % interface (0% open, 100% closed)
  • Read status, object status and fault codes

Installation

Install the URCap on your Universal Robots controller first:

  • Download the Robotiq URCap from the Robotiq website
  • Install and activate the URCap on your UR controller
  • Tested with URCap version 3.27.0 and UR Polyscope version 5.12.4

Install from PyPI via pip:

pip install pyRobotiqUR

Usage

Example script:

import time
from pyrobotiqur import RobotiqGripper


UR_IP = "192.168.0.10"   # <-- replace with your UR controller IP


if __name__ == "__main__":
    with RobotiqGripper(UR_IP) as g:
        # Activate gripper (if not already active)
        g.activate()

        print("Opening gripper...")
        g.open(speed=128, force=10)
        time.sleep(3.0)
        print("POS after open:", g.get_position())

        print("Closing gripper...")
        g.close(speed=200, force=200)
        time.sleep(3.0)
        print("POS after close:", g.get_position())

        print("Moving gripper to position 50%...")
        g.move_percent(50, speed=128, force=128)
        time.sleep(3.0)
        print("POS after move_percent:", g.get_position())

        print("Object status:", g.get_object_status())
        print("Fault code:", g.get_fault())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrobotiqur-0.2.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrobotiqur-0.2.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file pyrobotiqur-0.2.2.tar.gz.

File metadata

  • Download URL: pyrobotiqur-0.2.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrobotiqur-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e44e37f2deaa13d483592b768cfc55d00e4213d2284c5eecc6fcffa15ac19bd8
MD5 02a8141ed6ed272048230de7fe731f06
BLAKE2b-256 b04183a395658d87f8b0a29eba8522bb15f882a8ad976aca3d396eee773e5dde

See more details on using hashes here.

File details

Details for the file pyrobotiqur-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pyrobotiqur-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrobotiqur-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68f445c7d4ec049925473d41e6038062b901eaaab798578776c0bec7c5f666ac
MD5 28ac8f61a6e540eebc242bf291c3fbcc
BLAKE2b-256 fe6a74dc310b15588d7e77519549a1655905ba5674082e7b13be880f15524495

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page