Home Robotiq Products


Left ArrowBack to discussions page
Tyler_BerrymanTyler_Berryman Posts: 122 Handy
edited January 2017 in Robotiq Products
Hi guys,

A lot of people are aware that the FT300 sensor comes with two useful URCaps functions: the active drive toolbar and the path recording feature. However, this post aims to show you guys how the sensor can also be used in a force feedback loop for insertion applications or for assembly type applications. Following the discussion I had with @matthewd92 and @lakshmip001 on how to program a spiral motion, I decided to write a subprogram to use a spiral search to find a hole. 

First, I move in the Z axis to find the top of the part by using a force feedback loop with a force threshold in the Z axis. Once the threshold has been met, I call the subprogram for the Spiral Search. The spiral search is based on @matthewd92 code. To resume the spiral move, the x and y values of a pos are continuously incremented at a constant rate to create the spiral trajectory. While the robot is moving in the spiral motion, I am using a thread to monitor the force in the Z axis. Basically, as soon as the force in the Z axis falls below 2.5N, I trigger an event to stop the spiral movement. The robot then moves downward in the Z axis and releases the bearing into the hole. 

This subprogram can be very useful for applications that require a precise insertion or for applications that have a vision component integrated with the cell.

Here is the video of the demonstration: 

P.S. The radius and angle incrementations can be adjusted to have a finer resolution for better results!

Tyler Berryman
Robotiq Integration Coach
[email protected]
1-418-380-2788, option 3


  • EnricEnric Founding Pro, Partner, Beta Tester Multi Gripper, Vacuum Beta tester Posts: 112 Handy

    It is the most common process that customers ask. A good example to show it. You can send the example program ?.
    Sometimes you should use software that generates the code as is the case of Artiminds, but the client only needs one of the functions (Spiral for example).


    Enric Vila Avila
    Vicosystems S.L.L.
    Industrial Collaborative Systems

    [email protected]
  • abeachy_HG24abeachy_HG24 Posts: 79 Handy
    Maybe this is a dumb question, but in a situation like this is the robots repeatability not good enough to go to the same spot every time in order to install precise parts like that? Or is this just a better way to do it to ensure the part is inserted correctly?
  • abeachy_HG24abeachy_HG24 Posts: 79 Handy
    @tyler_berryman Yes that does answer my question, thanks for explaining it! I guess the reason I have not see this issue much at all is because we have custom gripper pads designed specifically for whatever that particular UR is handling. I was always curious as to how to use the force sensor like that, that makes more sense now.
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,261 Handy
    @Tyler_Berryman another thing you could have done to make it a bit simpler is to wrap the spiral function inside of a while loop and that way it would automatically exit when the force was found.  Wouldn't have to try to control the motion in a background thread that way possibly.  

    Good work though.  We have used a similar approach when placing a part on a pin, the pins did not always get into the exact same spot as the part was moving from position to position, as it moved we would place a part on each of the pins
  • StudentStudent Posts: 21 Apprentice
    Thanks @Tyler_Berryman

    I have one question, I use the script to do the spiral search while using the force function in my UR10. So, when I find the hole, the gauge I am using is inserted in the hole automatically because of the force function. But, inside the hole, the spiral search is running already. I want to stop the spiral search inmediately when I find the hole, how you do that? 
  • Tyler_BerrymanTyler_Berryman Posts: 122 Handy
    In the program I included in my comments above, I used an event to stop the spiral search. When the spiral search subprogram was called, I set the variable "search" to True. The event was triggered when the following conditions are satisfied: Fz<10N and search=True. 

    As @matthewd92 mentioned you can also include the condition Fz<10 in the spiral search's loop statement. This means that the loop would stop when the force in the Z axis is smaller than 10N. I had tried this method but had trouble exiting the spiral search loop at the right moment.

    Once you exit the spiral search subprogram, you can either have the robot move only in the z axis using a linear move or you can use another control loop if the hole is not perfectly vertical. 

    Tyler Berryman
    Robotiq Integration Coach
    [email protected]
    1-418-380-2788, option 3
  • StudentStudent Posts: 21 Apprentice
    Thanks again @Tyler_Berryman

    I can't use your program because it fails with some variables and also the installation file and the use of the robotiq gripper (I am not using sensors). Could you help me adapting your code to my robot? I am ver new with the cobots... Thanks!
  • Tyler_BerrymanTyler_Berryman Posts: 122 Handy
    To use the program without using any Robotiq products, you can start by removing all "Gripper Open" and "Gripper Close" nodes in the program. 

    You can also remove this section from the program since it is for the FT300 sensor:
          " socket_close("stream")
           Script: accessor_capt.script

    You will also have to substitute the Force component in the program with the robot's force. You can use the force() script command to return Fx, Fy and Fz exerted on the robot's TCP. In this example, you can simply use the 3rd force component (Fz) in the program. 

    You will also be able to delete the entirety of Thread_1 since this section of the program is to stream the force data from the Robotiq FT300 sensor and assigns the force components to the variables. 
         socket_send_string("READ DATA", "stream")
         If sensor_data[0] ≥6

    Let me know if this works for you!
    Tyler Berryman
    Robotiq Integration Coach
    [email protected]
    1-418-380-2788, option 3
  • Hammer1991Hammer1991 Posts: 2 Recruit
    @Tyler_Berryman first of all thank you for this. It's really useful to show people what is possible with our FT300.

    Furthermore there has arisen a question. We changed the skript a little bit to use this not only in a 0°-degree level. Now we can also use it to a 90° level like a wall. Our next step we want is to use it on a random level which we define by 3 points. Is there a way to force the robot to stay with the tool axis (which is the same like the z-axis of the ft300) orthogonal on the random level? And is there any longer a way to force him to make a translation along this axis of the tool?

  • louis_bergeronlouis_bergeron Posts: 94 Handy

    Have you tried the last template that @Tyler_Berryman has done if it does what you would like to do?

    You will find it here:

    Spiral search

    Louis Bergeron
    Integration Coach
    [email protected]
  • Tyler_BerrymanTyler_Berryman Posts: 122 Handy

    Thank you for the feedback regarding the Spiral Search program. 

    The program uses the robot's TCP position, this means that you do not have to reprogram anything as long as you position the tool in the correct orientation before calling the Spiral Search subprogram. If you position the TCP with a 90deg offset relative to the base, the spiral search will be performed in this orientation.

    Louis mentioned a revised version of the program that is available on the Robotiq website. The revised version can be downloaded by clicking on the following link : http://blog.robotiq.com/spiral-search?_ga=2.123390987.1087686588.1500726322-1745763925.1494319737
    In this program the template, the spiral search program is included in a script file. The included PDF document will explain how to setup the script file within a UR program.
    Tyler Berryman
    Robotiq Integration Coach
    [email protected]
    1-418-380-2788, option 3
Sign In or Register to comment.
Left ArrowBack to discussions page