Inconsistent internal force sensor

Hi,

I am integrating a spot weld application with a UR10e. To get to the correct position, I use a Direcation node in the Z-axis “Until expression force()>40” to make the robot apply a force of 40N before welding. To exit the weld spot I use a Direction node in the opposite direction "Until expression force()<5 and then go up.

This method works great 99/100 times but sometimes the internal force sensor gets stuck at around 24N when I go up, resulting in the robot moving upwards without ever fulfilling the expression force()<5N.

Any ideas what causes the internal force sensor to not function properly? No cables seem to be stretched wihen this happens.

Is there a smarter way to get the right amount for force applied?

Cheers,
Tor

You could try to specify the force that you’re exerting by saving get_tcp_force() into a variable (var) and compare only the force in the Z-Axis by doing var[2] > 5N.