ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Robotiq Gripper via Universal Robot Failure

asked 2021-05-18 13:07:39 -0500

fruitbot gravatar image

updated 2021-05-18 17:19:57 -0500


I am attempting to use the Robotiq Hand-E gripper on a UR3e. Unfortunately, there seems to be a connection issue to the Robotiq gripper.

The following command seems to run successfully. Communication with the UR is enabled, communication with the gripper seems successful as the file at /tmp/ttyUR is created. There are variables I have omitted because their default values are correct (baud, parity, etc)

$ roslaunch ur_robot_driver ur3e_bringup.launch robot_ip:= use_tool_communication:=true tool_device_name:=/tmp/ttyUR

The following node fails and afterward the file no longer exists at /tmp/ttyUR

$ rosrun robotiq_2f_gripper_control /tmp/ttyUR


/home/xavier/august_demo_ws/src/robot_arm_demo_v2/robotiq/robotiq_2f_gripper_control/nodes/ SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see for more information.
  pub = rospy.Publisher('Robotiq2FGripperRobotInput', inputMsg.Robotiq2FGripper_robot_input)
Traceback (most recent call last):
  File "/home/xavier/august_demo_ws/src/robot_arm_demo_v2/robotiq/robotiq_2f_gripper_control/nodes/", line 89, in <module>
  File "/home/xavier/august_demo_ws/src/robot_arm_demo_v2/robotiq/robotiq_2f_gripper_control/nodes/", line 75, in mainLoop
    status = gripper.getStatus()
  File "/home/xavier/august_demo_ws/src/robot_arm_demo_v2/robotiq/robotiq_2f_gripper_control/src/robotiq_2f_gripper_control/", line 107, in getStatus
    status = self.client.getStatus(6);
  File "/home/xavier/august_demo_ws/src/robot_arm_demo_v2/robotiq/robotiq_modbus_rtu/src/robotiq_modbus_rtu/", line 95, in getStatus
       output.append((response.getRegister(i) & 0xFF00) >> 8)
AttributeError: 'ModbusIOException' object has no attribute 'getRegister'

Extra Info:

xavier@xavier-desktop:~$ ls -l /tmp/ttyUR
lrwxrwxrwx 1 xavier xavier 10 May 18 10:44 /tmp/ttyUR -> /dev/pts/0
  • The gripper works as expected with the URCap on the UR touchpad -> hardware must be fine
  • rs485 URCap Version: 1.0.0 (from ROS-I UR Package)
  • External Control 1.0.5 (from ROS-I UR Package)
  • Jetson Xavier as ROS host
  • Jetpack 4.5.1
  • Universal Robots Software: URSoftware 5.9.1
  • ROS Melodic
  • Universal Robot Driver
  • Robotiq ROS-I Package
  • The robotiq Hand-E gripper should work fine with the 2f controller as all the registers for control are exactly the same.
edit retag flag offensive close merge delete


I've experienced similar issues when using a 3F-Gripper from robotiq, but the device wasn't gone for me after the failed startup. In the end, multiple retries eventually made it work, but this is, of course, not a solution. See also this issue

fexner gravatar image fexner  ( 2021-05-19 03:42:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-09 14:00:24 -0500

fruitbot gravatar image

So instead of enabling gripper communication through the UR package, I ended up SSH-ing directly into the UR computer and forwarding the USB port (that connects to the gripper) to my ROS host computer.

From ROS Host:

$ roscore
$ sudo socat pty,link=/dev/ttyTool,raw,ignoreeof,waitslave tcp:<robot-ip>:54321

From UR Computer:

$ socat tcp-l:54321,reuseaddr,fork file:/dev/ttyTool,nonblock,raw,waitlock=/var/run/tty

From Ros Host

$ sudo chmod 777 /dev/ttyTool
$ rosrun robotiq_2f_gripper_control /dev/ttyTool
$ rosrun robotiq_2f_gripper_control

Additional Notes:

  1. To Access the UR computer ssh root@<robot-ip>. The default UR password is easybot
  2. socat was not installed on the UR computer by default. I had to install it from a .deb file found here
  3. I am not sure if it made a difference, but I deleted the rs-485 URCAP from the touchpad

I am currently rewriting this as a bash script that I can call from a roslaunch file. It isn't the most beautiful solution, but it works :)

I got the socat stuff from this Robotiq DOF thread:

edit flag offensive delete link more


I'm happy for you that it works, but this is basically what ur_robot_driver does. It even uses socat ..

See tool_communication.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-09 14:07:36 -0500 )edit

If your solution works, but using the tool_communication didn't that's strange, as the driver's tool_communication mechanism uses exactly the same socat commands. we should compare the socat arguments and maybe improve tool_communication from the driver, then. As @gvdhoorn wrote, this is exactly how the driver's tool communication works.

The urcap runs socat using this line

fexner gravatar image fexner  ( 2021-06-10 02:26:07 -0500 )edit

@gvdhoorn@fexner Thanks for the feedback. I am not sure what is causing the error in my configuration. I see that many other people have set this up successfully. If I find out what was tripping me up I will update here.

fruitbot gravatar image fruitbot  ( 2021-06-10 10:55:51 -0500 )edit

Question Tools



Asked: 2021-05-18 13:07:39 -0500

Seen: 745 times

Last updated: Jun 09 '21