Skip to main content

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

Project description

pyRobotiqUR icon 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.0.tar.gz (5.1 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.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrobotiqur-0.2.0.tar.gz
  • Upload date:
  • Size: 5.1 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.0.tar.gz
Algorithm Hash digest
SHA256 0d5601659a80f533f6173c85b3bcc8c374a963b36aab17347057109e6e80e745
MD5 b68c88306207d702596e0ec4a0bc4cd4
BLAKE2b-256 1affebf72e1e6cdfae5e78f54187b2bb7bd9cc02114a59d7e71d82aae4b7b232

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrobotiqur-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a88d0edc1cbb95cee658d4c5acbd1849d4675d0f02731de9a37c5623db284bd
MD5 0d60bcfe98197ccb07b6ef33712e4513
BLAKE2b-256 030514c9f58567fcd4ac3bf96e455c6156e54e1213d912ecf55961b2de2e1cc7

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