ros-industrial-attic / robotiq

Robotiq packages (http://wiki.ros.org/robotiq)
BSD 2-Clause "Simplified" License
242 stars 383 forks source link

ROS + moveit for robotiq 2f_85 with UR5e (next steps and errors) #197

Closed vickyvou closed 2 years ago

vickyvou commented 2 years ago

Summary

Hello all. I need to control both the UR5e and robotiq 2f_85 with ROS and moveit!. I have two basic issues and the most important is: I am not which is the next step so I can have access to the gripper. I can control the UR5e with moveit. Also, a bit of a n00b when it comes to manipulators, so apologies in advance in case I have missed something.

So I run the ur_robot_driver ur5e_bringup.launch and things are ok. I test with moveit and it works. Now from what I understand, the next step is to somehow set the communication tools. This is where things get blurry and also I get errors.

When I run the rosrun ur_robot_driver tool_communication command I get the following:

[INFO] [1643296476.184035]: Remote device is available at '/tmp/ttyUR'
[INFO] [1643296476.185039]: Starting socat with following command:
socat pty,link=/tmp/ttyUR,raw,ignoreeof,waitslave tcp:10.161.5.10:54321

So the thing is: I am a bit lost. I have read most of the other threads but it looks like there is information that I am somehow missing because I just don't seem to be able to move forward.

From my understanding, the next step would be to run rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /tmp/ttyUR but when I run that I get the following error:

 rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /tmp/ttyUR
Traceback (most recent call last):
  File "/home/control/control_ws/src/robotiq/robotiq_2f_gripper_control/nodes/Robotiq2FGripperRtuNode.py", line 90, in <module>
    mainLoop(sys.argv[1])
  File "/home/control/control_ws/src/robotiq/robotiq_2f_gripper_control/nodes/Robotiq2FGripperRtuNode.py", line 76, in mainLoop
    status = gripper.getStatus()
  File "/home/control/control_ws/src/robotiq/robotiq_2f_gripper_control/src/robotiq_2f_gripper_control/baseRobotiq2FGripper.py", line 107, in getStatus
    status = self.client.getStatus(6);
  File "/home/control/control_ws/src/robotiq/robotiq_modbus_rtu/src/robotiq_modbus_rtu/comModbusRtu.py", line 95, in getStatus
    output.append((response.getRegister(i) & 0xFF00) >> 8)
AttributeError: 'ModbusIOException' object has no attribute 'getRegister'

I understand that this has been an issue to several people. I have tried a couple of solutions #167 from this thread but it does not seem to do much.

Any input would be great! And thank you very much for your time :)

Introduction to the issue

Versions

Use Case and Setup

What does the setup look like and what are the objectives? I am trying to get our system (UR5e+ robotiq 2f_85) to work, especially via ROS and moveit. The gripper is connected to the control box of the UR5e via USB and to the 24v. I have uninstalled (given the advice of several posts) the robotiq URCaps and I have installed the following: external control and RS485 on the teach pendant. And the RS-485 daemon runs.

When I ssh the system and I do:

dmesg | grep tty
[    0.000000] Kernel command line: BOOT_IMAGE=(hd0,3)/vmlinuz root=LABEL=rootfs.0 rootfstype=ext3 console=ttyS0,115200 consoleblank=0 net.ifnames=0 biosdevname=0 panic=60 intel_idle.max_cstate=0 processor.max_cstate=0 sdhci_pci.max_freq=0 idle=poll splash quiet rauc.slot=A isolcpus=3
[    0.000000] console [ttyS0] enabled
[    3.553684] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    7.531730] systemd[1]: Expecting device dev-ttyS0.device...
[    8.341233] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

I run the external control and by running the ur_robot_driver ur5e_bringup.launch I can actually control the arm with rviz and moveit. The problem is the gripper.

The ur5e bringup has the following parameters:

use_tool_communication = true
tool_voltage = 24
tool_parity = 0
tool_baud_rate = 115200
tool_stop_bits = 1
tool_rx_idle_chars = 1.5
tool_tx_idle_chars = 3.5
tool_device_name = =/tmp/ttyUR

Also:

ls -l /tmp/ttyUR
lrwxrwxrwx 1 control control 10 Jan 27 19:33 /tmp/ttyUR -> /dev/pts/5

I have installed in the same workspace the robotiq packages from the ros robotiq repo.

gavanderhoorn commented 2 years ago

First: please note the "this repository is unmaintained" notice in the readme on the main page of this repository.

Having written that: you write:

The gripper is connected to the control box of the UR5e via USB and to the 24v.

that's not how the tool communication of ur_robot_driver is supposed to work.

The /tmp/ttyUR is a proxy for the RS485 port on the flange of the robot. You cannot use tool_communication for anything else.

At this point this is more an issue with the UR driver than with the packages in this repository.

I'd suggest you ask Universal Robots for support in getting the tool_communication to work, and then start working on getting the gripper driver to work.

But again: this issue tracker may not be the most time-efficient way to get support, as it doesn't see much activity any more these days.

vickyvou commented 2 years ago

Ah I see, so there is something that I am missing as information then to access the robot. The problem is that the robotiq that they gave us didn't have the appropriate module to mount it on the flange (which would also look more elegant) so trying to figure out what is the best configuration.

Thank you very much for your reply I will take this to the UR :)

rrapi commented 2 years ago

Hi everyone!!

I am doing the same thing for my master thesis and I got the same problem as @vickyvou. But unfortunately I cannot connect the gripper directly to the ROS pc. So I am able to control the robot arm but not the robotiq gripper.

Do you know if there is a way to make it work directly connected to ur controller??

Could someone help me please to solve this problem?? I am trying a lot of possible solutions this days but no one works.

Thank you very much in advance for your time!!

Franci