Skip to content

Custom Gripper Driver using multi-protocol interface for Universal Robots UR5e and OnRobot RG2 Grippers This driver provides seamless control of the OnRobot RG2 grippers through three communication interfaces (Modbus RTU, TCP/IP, and UR Dashboard) using two industrial protocols (Modbus and RTDE)

Notifications You must be signed in to change notification settings

UofI-CDACS/UR_OnRobot_Gripper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UR5e OnRobot RG2 Gripper Controller

Driver for controlling OnRobot RG2 Gripper on Universal Robots UR5e via Modbus TCP. The RG2 Gripper uses Modbus RTU, while the conversion is done in the Compute Box that uses Modbus TCP/IP, and the RTDE is used for status update across the devices. This provides both high-level commands (open/close) and precise width/force control.

Table of Contents

Features

  • Intuitive Control:

    • connect() - Create a connection to the gripper
    • disconnect() - Close connection
    • read_gripper_width() - Read the width of the gripper
    • set_gripper_width() - Move to specific width (0-100mm), pass the desired Force and width
  • Precision Control:

    • Set exact width (0.0-100.0mm) and force (0-40N)
    • Real-time width feedback via read_gripper_width()
  • Safety:

    • Automatic parameter validation
    • Connection management
    • Error handling

Installation

pip install pymodbus

Quickstart

from Gripper_Control import RG2_OnRobot_Gripper_Controller

gripper = RG2_OnRobot_Gripper_Controller(ip="172.23.254.233")

try:
    gripper.connect()
  
    # Open gripper with 20N force
    gripper.open_gripper(force=20)  
  
    # Move to 45mm with 25N force
    gripper.move_gripper(width=45, force=25)
  
    # Read current width
    print(f"Current width: {gripper.read_gripper_width()} mm")
  
finally:
    gripper.disconnect()

About

Custom Gripper Driver using multi-protocol interface for Universal Robots UR5e and OnRobot RG2 Grippers This driver provides seamless control of the OnRobot RG2 grippers through three communication interfaces (Modbus RTU, TCP/IP, and UR Dashboard) using two industrial protocols (Modbus and RTDE)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages