Discussion

Left ArrowBack to discussions page
SebastienSebastien Posts: 219 Handy
edited October 2016 in Programming
@Annick_Mottard
I was just working on a program where I want to read the gripper position once closed on an object. The way I tried to do it is as follows:
I started from an empty program.
I added a GRIPPER command and used Edit action to set the gripper close command.
Then I tried to add subprogram rq_current_pos from the legacy UR package from your support website.
Then I simply added a variable gripperPosition = rq_pos in the program to get the gripper position.

However when I try to run the program there is an error popping up saying Contextual error: The function rq_current_pos is double defined. I am guessing this is probably related to the UR Cap interface which is probably using this function. However, if I try to include only the rq_pos in the program it does not work saying that this variable rq_pos is not defined. What should I do to get fingertips position?
 

Best Answer

Comments

  • Annick_MottardAnnick_Mottard Posts: 147 Handy
    @Sebastien

    The URCap already contains all the subprograms needed to control the gripper. They are simply embedded so you do not actually see them defined in your program. Try to suppress or delete those two subprograms to run your program. 
    Annick Mottard
    Product Expert
    Robotiq
    [email protected] 
  • SebastienSebastien Posts: 219 Handy
    @Annick_Mottard
    So I use the same variables as we used in the legacy package but I simply don't use subprograms is this right?

  • abeachy_HG24abeachy_HG24 Posts: 79 Handy
    What I do that works well, is I use an assignment with a variable I created called RQ_Pos and in the assignment set it equal to rq_current_pos(). You can place that anywhere in your program and see the position of the gripper. 
  • lawrencelawrence Posts: 12Partner Apprentice
    @Sebastien @Etienne_Samson @Annick_Mottard @abeachy_HG24
    Hi guys, how about to read the speed and force?
  • SebastienSebastien Posts: 219 Handy
    @lawrence
    Here is a link to the section in the manual where the different functions are described.
    For speed and force if you are asking about getting the live measures I don't think you can for speed and force. You can only retrieve the values that have been set for force and speed but not the live measure. Is this right @Annick_Mottard


  • Annick_MottardAnnick_Mottard Posts: 147 Handy
    @Sebastien @lawrence manual link was missing, here it is. Sebastien, you are right you can only read the values that were set, there is no direct force sensing on the Gripper. However, if you want to have an estimate of the values you will get, check the tables in section 4.5 of the manual.
    Annick Mottard
    Product Expert
    Robotiq
    [email protected] 
  • T800_412T800_412 Posts: 51 Apprentice
    edited August 2018
    by the same concept here, is it possible to programmatically set the gripper position based on a calculation? For example, if I close the gripper on an object, I want to then open the gripper 2mm to adjust the grip, then close it fully again. I was trying to do just an open and close function, with the "do not wait for action to complete", but it is too inconsistent, causing the gripper to often open much further than I want.

    Maybe I found it in the manual 
    rq_move_and_wait("position") I can get the position, calcualte the new position and tell it to go there.
Sign In or Register to comment.
Left ArrowBack to discussions page