Discussion

Left ArrowBack to discussions page
Tyler_BerrymanTyler_Berryman Posts: 110 Handy
edited January 25 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!



Comments

  • EnricEnric Posts: 72 Handy
    @Tyler_Berryman

    Great!
    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).

    Thanks!


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

    evila@vicosystems.com

    twitter  linkedIn  YouTube  Google
  • abeachy_HG24abeachy_HG24 Posts: 76 Apprentice
    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: 76 Apprentice
    @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 Posts: 418 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: 18 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: 110 Handy
    @Student
    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. 

  • StudentStudent Posts: 18 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: 110 Handy
    @Student ;
    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
           socket_open("127.0.0.1",63350,"stream")"

    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. 
       "Thread_1
         socket_send_string("READ DATA", "stream")
         sensor_data≔socket_read_ascii_float(6,"stream")
         If sensor_data[0] ≥6
           Fx≔sensor_data[1]
           Fy≔sensor_data[2]
           Fz≔sensor_data[3]
           Mx≔sensor_data[4]
           My≔sensor_data[5]
           Mz≔sensor_data[6]
         Else
           Fx≔0.0
           Fy≔0.0
           Fz≔0.0
           Mx≔0.0
           My≔0.0
           Mz≔0.0"

    Let me know if this works for you!
Sign In or Register to comment.
Left ArrowBack to discussions page