Skip to main content

Python Driver for Robotiq Grippers

Project description

Python Driver for Robotiq Grippers.

pyRobotiqGripper is a Python library designed to facilitate control of Robotiq grippers using Modbus RTU communication via serial port or over ethernet. It is compatible with 2F85, 2F140, and Hande.

Documentation: pyRobotiqGripper Documentation

1-Disclaimer

This library can be seen as a starting point for a Robotiq integration project. You are responsible for what you do with this library. The author takes no responsibility for any malfunction.

Note: This library is not maintained by Robotiq.

2-How to Install

Install the pyRobotiqGripper python package using PIP.

python3 -m pip install pyRobotiqGripper

3-Typical Usage:

3-1-Robotiq gripper connected at PC USB port via a USB to RS485 converter

from pyrobotiqgripper import RobotiqGripper

#Create a Robotiq gripper object.
gripper = RobotiqGripper()

By default, the serial port on which the gripper is connected is automatically detected. However, you can manually specify the serial port name if you want to. Refer to the API documentation for more information.

3-2-Robotiq gripper connected to a UR robot with RS485 URCAP installed

Replace <UR_ROBOT_IP> with the actual IP address of your UR robot.

from pyrobotiqgripper import RobotiqGripper

#Create a Robotiq gripper object.
gripper = RobotiqGripper(connection_type="RTU_VIA_TCP", tcp_host=<UR_ROBOT_IP>)

3-3-Gripper control

Activate the gripper and do whatever you want with the gripper: open, close, get position feedback, etc.

gripper.activate()
gripper.calibrate(closemm=0, openmm=40)
gripper.open()
gripper.close()
gripper.move(100)
position_in_bit = gripper.getPosition()
print(position_in_bit)
gripper.move_mm(25)
position_in_mm = gripper.getPositionmm()
print(position_in_mm)

Note: During activation, the gripper is going to fully open and close. Do not disturb this process. Do not place an object inside the gripper.

Note: Position, Speed and Force varie from 0 to 255. It is coded on 8 bits.

You can print the current status of gripper registers using printStatus().

gripper.printStatus(()

For realtime control use the realTimeMove method.

gripper.realTimeMove(requestedPosition=100)

The realTimeMove method is designed to be called in a loop with a high frequency. It will move the gripper to the requested position with a speed that depends on the distance to the target position. This allows for a smooth and responsive control of the gripper.

4-Examples:

Examples of usage are availabe in the examples folder of the repository.

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

pyrobotiqgripper-2.0.6.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

pyrobotiqgripper-2.0.6-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file pyrobotiqgripper-2.0.6.tar.gz.

File metadata

  • Download URL: pyrobotiqgripper-2.0.6.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrobotiqgripper-2.0.6.tar.gz
Algorithm Hash digest
SHA256 d4d7784539e1f4c9e95b99e25746c5ad29939ac4947bd226841e56099e288404
MD5 ee4166864051aa62a5e16e5e612c1acb
BLAKE2b-256 d13baa3654d6f1b1bec9aafc4291e5c8a05fa3935768844b0557ab6b74a107c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrobotiqgripper-2.0.6.tar.gz:

Publisher: release.yaml on castetsb/pyRobotiqGripper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrobotiqgripper-2.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for pyrobotiqgripper-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c5bbc0869753d6dd6d1eb3896788218ea92418274993def88194b26caef6ff8f
MD5 917af29875ff9f056e81273313709e08
BLAKE2b-256 81d5eba9f878468a290d3ea9d45d3f55195f762337e0efc9d6834b1cf6a30a03

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrobotiqgripper-2.0.6-py3-none-any.whl:

Publisher: release.yaml on castetsb/pyRobotiqGripper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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