Reading force from UR10 robot

Hi everyone,

I am currently very new to using the UR10 robot for a school project of mine regarding spot welding and am very lost thus far.
I was wondering if there was a way to write a program with the aim as follows:
- Robot continues to move down until it reaches the welding spot
- Robot then stops when a specific force is reached
- Robot then moves away from said point
I have tried using the if function like this :
if force <= 20, move to waypoint 1
else, wait 2 seconds then move to waypoint 2
However a few problems were faced:
It would skip the force check option and go straight to the else.
Also, would it possible to obtain a force reading of 3.9 to 4.9 newtons? How small of a reading can the UR10 read?

Sorry for the lengthy question as I am still new to the UR10. Thank you!

So I’m doing something similar on a UR5:

I pick up a part, put it over a plate, then bring it down until it touches the plate using the Direction node.
I then go back up 1mm so that it doesn’t drag on the plate, then send it horizontally until it contacts a V block, then release.
I’m using 8N of force as my target - less than that didn’t seem consistent, more than that is more force than I want on my part & tooling. I also tried the Until Contact option, but that didn’t work consistently in this situation.

Here’s the sequence as pulled from the program.txt file (not complete syntax)

zero_ftsensor()
Wait: 0.2
MoveL
Direction: Plane_conv_1 Z- # Move down
Until (force>=8) #touches plate
Until (distance=.025) #limit in case something misses
Popup: Did Not contact stop!
Wait: 0.2
MoveL
backup # relative move up off plate 1mm

 Wait: 0.2
 zero_ftsensor()
 Wait: 0.2
 MoveL
   Direction: Plane_conv_1 Y+  #    Move horizontally towards V block
     Until (force >=8)         #  bumps Into V block (bounces back slightly)
     Until (distance=.05)          # limit in case it misses
       	Popup: Did Not contact stop!

Hi, I was wondering if i could see how you coded this from the UR robot itself, as I am still new to the whole UR system. Sorry for the inconvenience!

That robot is shut down so I can’t access it remotely until I’m back in the factory next week.
However, what I posted above is basically what you would do in the Polyscope interface:

The wait command is a standard polyscope node
zero_ftsensor() is added in a script node - need to zero the sensor before any force measurement.
Direction node gives the options for which direction to go (it lets you test while you’re entering to make sure you have it correct)
The until… option is within the Direction move command - I think you have to type in the force= part.
You can stack multiple Until… statements - the first one to become True is the one activated.

Hope this helps.

Hi there!

I tried to do so but on my polyscope, the moveL function did not have a direction node. Is it due to the fact that my software was last updated in 2017?
I also tried to loop force<20, however at 20 the robot exited the loop immediately. While at force<30, I did manage to get it to loop however the force output (measured on scale) was not very accurate. Do you know why this is so?

Thanks and sorry for the large amount of questioning.

It may be a newer feature. When I select the Direction node, it drops in a MoveL command with the Direction: Base X+ and an Until … sub-node already placed in the program.
Here’s a screenshot showing a Direction node selected within a blank program.
This is from a different machine - as I mentioned, the one using this feature is turned off so I can’t access it from home.

I believe the Direction node is just calculating a waypoint in the right direction, so if you’re already moving towards a waypoint, then using the standard MoveL and selecting Add Until (force > 20) should give you the same functionality I’m using. (assuming the Add Until feature isn’t new, also).
This is the only application where I’ve used the Force feature, and I had to do some experimenting to get it to work - plus it’s a UR5e, notUR10… Hopefully there are other users reading this who might have some insight.
We’re currently building a UR10e system for another application. If I get a chance I’ll try experimenting on that, but that wouldn’t be for a week or 2.

Everything @dpeva is saying sounds good to me. If you aren’t getting an accurate reading, make sure you aren’t skipping the zero_ftsensor() script command, as it is vitally important. You should also try calling this while the robot is stationary, so the forces it sees when it takes the zero is purely the weight of the payload. If you call this while the robot is accelerating, you’ll get a bad force reading. Force=Mass * Acceleration after all!

So I just ran a quick experiment with our new UR10e which we have in the lab while we finish the build:

I set up a scale on a table to measure force. Horizontal distance from center of base to center of tool tip is approx. 0.8m.

Zero ft sensor then wait .25 sec.
Motion: Direction Z- until force >= “f”, hold a couple seconds, then back up approx 20mm and stop.

Found that results are VERY dependent on speed.
I believe the instructions on the “until contact” option says to keep speed under 100mm/s, so I figured that would be a good reference point.
So, I started at 50mm/s, and that was way too high - programming a force value of anything between 2 and 25 gave pretty much the same force on the scale - 16~18 kg. Below that and it didn’t register, above that I ended up with protective stops.

So, I ran some tests at speeds of 1, 2, 5, 10 & 20 mm/s:

ACTUAL FORCE - UR10e (Newtons)
Speed
(mm/s)
1 2 5 10 20
programmed
force (N):
2 2 4 7 20 88
5 7 7 15 25
10 13 17 24 39 104
20 22 28 41 64 133
25 28 34 51 74
30 32 40 59 80 157
40 46 46 74 103 172
50 57 59 86 120 181
“until contact” 10 4 3 8 44

As you can see, any speed above 1m/s results in actual forces significantly higher than programmed.
Not sure what happens in a case such as sanding, where you’re trying to just maintain a perpendicular force while travelling in another axis.

On the UR5e application that I’m having success with, I haven’t actually measured force, but it seemed to have some reasonable control over the force in the 5-12 N values. Speed is 10mm/s on that system.

In this UR10e configuration, the shoulder joint is doing almost all the work, so maybe if it was using different joints it might perform differently.
The UR5e is mounted on the wall, so it is using several joints to achieve the desired motion/force.

I’ll probably take the scale to the UR5e to get some better data & maybe fine tune that setup.