Move until force applied detecting wrong values UR3


i am trying to make the UR3 move into its tool z direction until it reaches a surface and detects a force. (50N)

In some of the arm positions it is working fine, but in others it detects very high values (like almost 130N), right at the beginning of the motion. So it doesn’t even start going towards the surface.

It feels like the internal forces are very different in different arm-positions. Anything i can do about it? I am using a=1.2, v=0.01 atm.

When using the force() command, you need to tare the force torque sensor before taking a measurement, otherwise you can see exactly what you’re experiencing right now. To do this, insert a Script node before you use force() and type “zero_ftsensor()”. This will zero out the sensor so it’s ready for use. The manual also recommends adding a small wait (0.02 seconds) to ensure that it has zeroed before using it.

This is one of our common design patterns:

wait is_steady()

sleep(0.05)  # Optional


# Continously checking if
if force() < XXX:
    movel(pose_trans(get_actual_tcp_pose(), p[0, 0, -0.5, 0, 0, 0]), a=XXX, v=XXX)  # Seek downwards
    stopl(XXX)  # Safely decelerate
    movel(pose_trans(get_actual_tcp_pose(), p[0, 0, 0.002, 0, 0, 0]), a=XXX, v=XXX)  # come up a little bit

Thank you very much. It worked. At first i implemented it to early into my code, but now it’s working fine.

Thank you very much. It worked.