Python Driver for Robotiq Grippers
Project description
Python Driver for Robotiq Grippers.
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.
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
import pyrobotiqgripper as rq
#Create a Robotiq gripper object.
gripper = rq.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.
import pyrobotiqgripper as rq
#Create a Robotiq gripper object.
gripper = rq.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.position()
print(position_in_bit)
gripper.move_mm(25)
position_in_mm = gripper.positionmm()
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-Joystick CLI Feature
pyRobotiqGripper includes a command-line interface (CLI) tool for controlling the gripper using a joystick or gamepad.
To use the Joystick CLI, run:
pyrobotiqgripper-joystick
You can also check the available options: .. code-block:: bash
pyrobotiqgripper-joystick –help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrobotiqgripper-3.2.3.tar.gz.
File metadata
- Download URL: pyrobotiqgripper-3.2.3.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e21aefe4eefd1a9aaff1b95579af8af3dbb8c05b28ac98d74be95c85a2a9f57
|
|
| MD5 |
09762b41f7dcc0d9f815a5639ac21872
|
|
| BLAKE2b-256 |
8bdc2fcbb07a05fce378ba8ba903a86479377965d37f6dcbbdbbbb751dc21719
|
Provenance
The following attestation bundles were made for pyrobotiqgripper-3.2.3.tar.gz:
Publisher:
release.yaml on castetsb/pyRobotiqGripper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrobotiqgripper-3.2.3.tar.gz -
Subject digest:
0e21aefe4eefd1a9aaff1b95579af8af3dbb8c05b28ac98d74be95c85a2a9f57 - Sigstore transparency entry: 1245797903
- Sigstore integration time:
-
Permalink:
castetsb/pyRobotiqGripper@097b8849bc68d8714a20c90c8ae5613d16b00455 -
Branch / Tag:
refs/tags/3.2.3 - Owner: https://github.com/castetsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@097b8849bc68d8714a20c90c8ae5613d16b00455 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyrobotiqgripper-3.2.3-py3-none-any.whl.
File metadata
- Download URL: pyrobotiqgripper-3.2.3-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85b9f3c64a2bfd46c76aea88d746adb1280dcbf070418565e5bf63c0a3b3c616
|
|
| MD5 |
3f364ed44612504a1f7df15ca417a577
|
|
| BLAKE2b-256 |
fc81830fab3a137dc6279c10234f120ecf841d1cf3a74ecfdf8ed46e449f3455
|
Provenance
The following attestation bundles were made for pyrobotiqgripper-3.2.3-py3-none-any.whl:
Publisher:
release.yaml on castetsb/pyRobotiqGripper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrobotiqgripper-3.2.3-py3-none-any.whl -
Subject digest:
85b9f3c64a2bfd46c76aea88d746adb1280dcbf070418565e5bf63c0a3b3c616 - Sigstore transparency entry: 1245797905
- Sigstore integration time:
-
Permalink:
castetsb/pyRobotiqGripper@097b8849bc68d8714a20c90c8ae5613d16b00455 -
Branch / Tag:
refs/tags/3.2.3 - Owner: https://github.com/castetsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@097b8849bc68d8714a20c90c8ae5613d16b00455 -
Trigger Event:
release
-
Statement type: