Home Programming

Discussion

Left ArrowBack to discussions page
LaurieLaurie Founding Pro Posts: 3 Handy
Hi everyone,

The 3-Finger robot hand from Robotiq has a complete software package available on ROS. The ROS Industrial software package for the 3-Finger robot hand is hosted on GitHub under the “robotiq_s_model_control” designation.

This ROS package can be used to control the S-Model through a driver node. Simple commands can be sent via the controller, like opening and closing the hand with a certain speed and strength. The gripper can also receive command to close or open to a precise position. One of the four modes of the gripper (basic, pinch, wide, and scissor) can also be chosen via the controller. The package also contains a node to listen and interpret the status of the gripper, called the status listener node. The package can be modified to send custom commands as your application needs to.

You can find enclosed to this publication the updated tutorial for the S-Model.

If you have any suggestions/comments for the tutorial, let me know and I'll be glad to make the change.
Laurie Marceau
Student in Engineering
École de technologie supérieure (ÉTS), Montreal, Canada

Comments

  • JeanPhilippe_JobinJeanPhilippe_Jobin Beta Tester VIsion 1.1 Program, Wrist Camera URCap 1.3.0 Posts: 63 Handy
    edited June 2016
    Thanks Laurie for this update. I am sure it will be much appreciated by our ROS-based customers.
    Jean-Philippe Jobin
    Eng., M.Sc. / ing., M.Sc.
    Chief Technical Officer / V.P. R&D 
  • SamNewSamNew Posts: 6 Apprentice
    Hello, do you know if I can control the 3 finger gripper using ros and EtherCAT protocol? I just find the tutorial is about using ModBus TCP instead of EtherCAT...
  • jprobergejproberge Tactile Sensor Beta Testers Posts: 41 Crew
    Hello @SamNew !

    Yes you can! You are right about the tutorials showing only how to use the gripper with Modbus TCP. However there's another specific node you can run to use your gripper with the EtherCAT protocol. The node is part of the "robotiq_3f_gripper_control" package and its name is "robotiq_3f_gripper_ethercat_node" . Don't hesitate to reach out to me for more questions about how to use ROS with your gripper.

    Best regards,

    Jean-Philippe Roberge, 
    ROS Package Developper / Maintainer 
    [email protected]
  • MGHMGH Unconfirmed Posts: 1 Recruit
    Hi,

    Can I send torque control commands to the finger joints with the ROS package? 

    Thanks!
  • jprobergejproberge Tactile Sensor Beta Testers Posts: 41 Crew
    edited November 2018
    Hello @MGH

    Yes, you can adjust the finger force using our ros package. Basically, you'll also have access to all the gripper's registers (see for reference sections 4.3 and 4.4 of the Robotiq 3-Finger Adaptative Robot Gripper Instruction Manual ). Don't hesitate to reach out to me again for more questions!

    Best regards,

    Jean-Philippe Roberge, 
    ROS Package Developper / Maintainer 
    [email protected]
  • SamNewSamNew Posts: 6 Apprentice
    edited November 2018
    Hello @jproberge


     Thank you very much for your reply.

    I tried the following commands on ubuntu ros kinetic:

    cd ~/catkin_ws/devel/lib/robotiq_s_model_control 
    sudo setcap cap_net_raw+ep s_model_ethercat_node
    rosrun robotiq_s_model_control s_model_ethercat_node

    Then I got the following error: [ INFO] [1542644233.749811070]: Initializing etherCAT master
    wkc = -1
    [ WARN] [1542644233.807141367]: No slaves found on eth0
    terminate called after throwing an instance of 'robotiq_ethercat::EtherCatError'
      what():  Could not initialize SOEM
    Aborted (core dumped)

    PS: our 3 finger gripper is a EtherCAT model, I connect the communication port directly to my laptop ethernet port, is there a problem? should I buy a device to convert EtherCAT signal to ethernet signal?

  • SamNewSamNew Posts: 6 Apprentice
    edited November 2018
    @jproberge
     I also tried the following command: rosrun robotiq_s_model_control SModelSimpleController.py /dev/ttyUSB0, but no response from the gripper when I typed in different commands such as r (reset), a (Activate), etc.., doesn't 3 finger model work on USB port? Our 2 finger model has no problem with the 'robotiq_c_model_control' ros node using port /dev/ttyUSB0.

  • jprobergejproberge Tactile Sensor Beta Testers Posts: 41 Crew
    edited November 2018
    Hello @SamNew !

    Here are comments about your two last posts:

    1) I have very little experience with Ethercat networks unfortunately. However, most of the time, a laptop cannot be used as an Ethercat Master, since Ethercat networks need very good deterministic during data transfers. Unfortunately, most of the laptops' Ethernet card out there suffer from having jitter, among other issues, which make them unfitted to become an EtherCAT Master (or any kinds of Ethercat nodes). If you want to use ros to communicate with an Ethercat gripper, then you'll probably have to consider a dedicated Ethernet card, as noted in the README.md of our Github Repo . One way of making this work is to buy a card that would be connected to a PCI Express slot of the motherboard of your computer, which is not problematic for most desktop computer, but which will most likely be problematic if you're using a laptop. However, I've heard some people had success with a simple dedicated Ethernet card plugged into a USB 3.0 port of their computer, which could be a good alternative to consider if you have to use a laptop.  

    Also, please note that you'll also have to install an EtherCAT driver on your laptop, you can install the driver from EtherLab (see also this link). Finally, please note that instead of running the single node as noted in your first post, you should rather use the launch file, such that you would type:

    roslaunch robotiq_s_model_control s_model_ethercat.launch 

    2) Is this the same 3-Finger Adaptive Robot Gripper as the one from "1)" ? To be able to control a gripper with ROS using USB, the said gripper needs to be configured with the Modbus RTU communication protocol. Modbus RTU grippers have a RS485 serial output, which is converted to USB (RS485 <-> USB) allowing you to plug it to your computer. A first debugging step would be to simply type "dmesg | tail | grep ttyUSB" (without quotes) right after you plugged the gripper to your computer. If there's no output in your terminal, I feel it might be due to the communication protocol not being the right one, i.e. Modbus RTU.

    Please do not hesitate to reach out to me should you have any other questions about this.

    Best regards,

    Jean-Philippe Roberge, 
    ROS Package Developper / Maintainer 
    [email protected]
  • SamNewSamNew Posts: 6 Apprentice
    Hello @jproberge

       Thanks again for your reply, I tried "dmesg | tail | grep ttyUSB", then I got the following output:
    [  350.890895] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
    [  350.891062] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB1

    I managed to control the 3 finger gripper using the robotiq interface on windows using USB port and it worked on demo mode, scissor mode and other modes, but now we need to control it using USB port and ROS interface under ubuntu. Our robotiq 2 finger gripper has no problem with USB and ROS under ubuntu by the way. Do you know how to control the 3 finger gripper using USB and ROS? And for the Ethernet card to USB 3.0 port, do you have any suggestions about which one should I buy?
  • jprobergejproberge Tactile Sensor Beta Testers Posts: 41 Crew
    edited November 2018
    Hello @SamNew !

    Yes, I understand that you are able to control your 2-finger gripper using a USB port with ROS. I also get that you are able to control your 3-finger Adaptive Robot Gripper on Windows using the Robotiq User Interface software by connecting your computer directly to the gripper's USB port. So here are my comments regarding your questions:

    1) If you want to control your gripper with ROS/Ubuntu using USB, you cannot use the gripper's USB port. Now I know this might sound misleading, but it's actually because this USB port does not provide Modbus RTU capabilities. If you want to use your gripper over USB with ROS, you'll have to use the RS485 modbus RTU serial communication. If your gripper is recent (is it?), then you have this communication protocol already available for you: indeed, if you take a look at the 3-Finger Adaptative Robot Gripper Instruction Manual, you'll see the RS485 serial communication wires are located into the power cable (see specifically pages 22, 29 and 56-62). Thus, you'll have to buy a RS485 <--> USB converter and plug the RS485 wires coming from the gripper to the RS485 end of the converter, and plug the USB end of the converter to your computer. Good news is that RS485/USB converters are rather easy to find and not so expensive. Once everything is connected properly, you should be able to use ROS to control the gripper exactly in the way you were trying to do ( rosrun robotiq_s_model_control SModelSimpleController.py /dev/ttyUSB0 ). 

    2) I would be uncomfortable to recommend any specific Ethernet cards, since I never tried to use a laptop in an EtherCAT network... But, basically you need an Ethernet card that supports real-time Ethernet. Without any guarantees, if I were you, I would probably consider devices like this, or this (this last one seems unavailable at the moment, but I've heard people saying they had success with it, so I put it as a reference). Please also see discussions regarding buying a Real-time Ethernet capable Ethernet card here.  Also, before buying an external card, have you tested your laptop's builtin card with the roslaunch file as I discussed in my last comment? I would make sure to give that a try before buying a new external card.

    Again, please do not hesitate to add more questions below.

    Best regards, 

    Jean-Philippe Roberge, 
    ROS Package Developper / Maintainer 
    [email protected]
Sign In or Register to comment.
Left ArrowBack to discussions page