DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
ur5eUser

Hello everyone,

as the title says, I would like to access the force of the tools z-Axis on my UR5e. Saying that, the task my robot has to accomplish is to press lots valves into drillings. The force here has to be at a level of 50 newtons. Once that is reached the robot has to stop and go back to its original position, as this means that the valve has already been pressed into the drilling successfully.

As every drilling has got a different position and more importantly different angles, im having problems with just grabbing the current value of the "force()" function, as it seems to calculate a three dimensional force vector. The "force()" function works perfectly fine as long as the drillings are in a vertical position. However, as soon as they are not in a vertical position, meaning angles are involved, the "force()" function does not fulfill my requirements. Hence i would like to have access to the tools z-Axis force component only, as its always oriented exactly vertically to the tool.

I am using a C# program, that writes a .script language program, which gets sent to the UR5e by Ethernet (Port 30002). Here's a minimized example of what Im sending to the UR5e (i've deleted some parts which, in this matter, are not neccessary). Also i've marked the crucial parts:


def myfunction():
 threadId_Thread_1 = run Thread_1()
 while i < 2:
  set_payload(0.0)
  pose_wrt_tool = p[0,0,0.065,0,0,0]
  global pose_wrt_base2 = pose_trans(pose_wrt_base, pose_wrt_tool)
  global thread_flag_4 = 0
  thread Thread_if_1():
   movel( pose_wrt_base2 , a=0.03, v=0.03)
   thread_flag_4 = 1
  end
  if ( force ()<50):
   global thread_handler_4 = run Thread_if_1()
   while (thread_flag_4 == 0):
    if not( force ()<50):
     kill thread_handler_4
     thread_flag_4 = 2
    else:
     sync()
    end
   end
  else:
   thread_flag_4 = 2
  end
  set_payload(0.0)
  movel( pose_wrt_base , a=0.03, v=0.03)
  i = i + 1
 end
end

So, basically all I want to do is to replace "if ( force ()<50):" with something like "if (Fz_Tool < 50):". However, I could not find a way to achieve this yet. Also, if somebody knows the .script language command on how to grab the force of the tools z-Axis it would help me most. However, a polyscope (.urp) command would also be helpful as then it could executed and thus translated into the corresponding .script language file.