Skip to main content

Python Driver for Robotiq Grippers via Modbus RTU

Project description

Python Driver for Robotiq Grippers via Modbus RTU

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

Documentation: pyRobotiqGripper Documentation

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.

How to Install

Install the pyRobotiqGripper python package using PIP.

python -m pip install minimalmodbus
python -m pip install pyRobotiqGripper

Typical Usage

Import the pyRobotiqGripper module.

from pyrobotiqgripper import RobotiqGripper

Create a Robotiq gripper object.

gripper = pyRobotiqGripper.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. You can now activate the gripper and eventually calibrate the gripper if you want to control the opening in mm instead of bit.

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: The gripper finger position varies from 0 to 255. It is coded on 8 bits.

gripper.activate()
gripper.calibrate(0, 40)

You can now do whatever you want with the gripper: open, close, get position feedback, etc.

gripper.open()
gripper.close()
gripper.goTo(100)
position_in_bit = gripper.getPosition()
print(position_in_bit)
gripper.goTomm(25)
position_in_mm = gripper.getPositionmm()
print(position_in_mm)

You can print the current status of gripper registers using printInfo.

gripper.printInfo()

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-1.0.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

pyrobotiqgripper-1.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrobotiqgripper-1.0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyrobotiqgripper-1.0.1.tar.gz
Algorithm Hash digest
SHA256 541427349bc37b46e3f23d0c4711882782429cb71d4fe8bb1d2511fe0bc4ee49
MD5 7171d558b8871f30665d399010e87ad0
BLAKE2b-256 3200b6929c7dc626b09361733bd2120eb157bc9df0bba038b77074f81a5d1b0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyrobotiqgripper-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42ce40c00b67b9a4ccd2c9fe33d2083ba8daf8692252b15895eab9b6fba759d2
MD5 8cbe5dec7deab66cb49d7cae349ec632
BLAKE2b-256 2831d211d8d0f503b23d8baa7cdfeb33cd3876b341736b1abf78277d29c49d34

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