December 19, 2018, 12:28:38 AM

# How does calculate the tool frame?

### Author Topic:  How does calculate the tool frame?  (Read 4605 times)

0 Members and 1 Guest are viewing this topic.

August 23, 2016, 07:44:36 AM

#### SergeyG

##### How does calculate the tool frame?
The reason I ask is I'm trying to create a routine to automatically set the tool frame   using input from a touch probe. Has anyone done a similar thing?
Thanks in advance for any help!

Today at 12:28:38 AM

Guest
##### Re:  How does calculate the tool frame?

August 23, 2016, 08:21:45 AM

#### Kirill Morozov

##### Re: How does calculate the tool frame?
I'm also very interested in this topic.

I kinda understand the basic principles of tool frame calibration, but I do not have exact formulas.

BTW check out Leoni advintec TCP. I've found this solution while searching the net.

August 27, 2016, 03:07:10 PM

#### SkyeFire

Global Moderator
##### Re: How does calculate the tool frame?
Exact implementations vary, but it's mostly about reverse-engineering a sphere.

When you mount a tool to a robot, the robot knows nothing about that tool's dimensions.  However, what the robot does know, by design, is the location of it's "zero tool" -- that is usually the center of the mounting flange where end effector tooling is mounted to the robot.  Because this point is part of the robot, the robot always knows where this "zero tool" is located in space, relative to the robot base, from the forward kinematics of the various axis angles.

So, when you perform a tool calibration by (on most robots) touching the tool tip to the same point in space from four different angles, the robot knows nothing about the tool, or the point in space you're touching.  But it does know the location of the "zero tool" at each of those four measurements.  This then becomes a problem for determining the center of a sphere from points on its surface:

http://math.stackexchange.com/questions/894794/sphere-equation-given-4-points
http://stackoverflow.com/questions/13600739/calculate-centre-of-sphere-whose-surface-contains-4-points-c
https://www.safaribooksonline.com/library/view/engineering-mathematics/9789332515611/xhtml/chapter011-02.xhtml

The center of the sphere is the fixed point in space being used as the reference for the tool tip, relative to the robot base.  At that point, it becomes a matter of finding the XYZ transform that, using the "zero tool" as the point of origin, will make the transition from the spatial location of the "zero tool" at each of those measurement locations to the reference point.
Technically, in a perfect world, any one of these 4 points would be enough to determine the tool dimensions relative to the "zero tool," once the reference point (sphere center) has been determined.  However, since the robot is an imperfect device, the algorithm performs this transform/fit calculation for all 4 measurements, and attempts to average their results.  If the error range between the four measurements are too great, the robot decides that the measurements were insufficiently precise and throws an error, usually telling the operator to start over and try again.

November 30, 2016, 04:50:00 PM

#### tom.svilans

##### Re: How does calculate the tool frame?
Sorry to revive an old post...

... but I was wondering if there is any literature anywhere about doing this with a probe (https://www.haimer-usa.com/products/measuring-instruments/sensors/3d-sensor/universal-3d-sensor/universal-3d-sensor.html) and a sphere of known diameter? That is, instead of touching two spikes - which can be imprecise and frustrating if one gets blunted - touching the round point of a probe to a sphere of known diameter. This would then shift the precision to the roundness of the sphere and the precision of the probe - both of which would most likely be way more precise than the ol' eyeball.

Off the top of my head, if one were to do a kind of 12- or 16-point calibration, by touching the probe to the sphere 3-4 times from each direction as in a normal 4-point calibration (4 sets of 3-4 points), you could potentially derive the 'true' point at each direction from the corresponding set of points... though there still seem to be many unknowns to sort out...

Any ideas?

December 01, 2016, 11:35:35 PM

#### SkyeFire

Global Moderator
##### Re: How does calculate the tool frame?
It should be possible.  But the math would be rather more complex.

To make such an arrangement work using the standard 4-pt method, for example, it would only work if you could guarantee that the same point on the surface of the probe was what made contact with the target sphere at each of the 4 points.  Otherwise the circular fit would fail, since it is designed for touching two points (think spheres with radius of 0) to each other.  Then you would have to remove the radius of the target sphere (and possibly the radius of the probe sphere) from the resulting tool measurement.

Someone who had the math skills could probably create an algorithm that could do the calibration using many points of contact (probably would need to be automated), if the radii of both the target sphere and the probe sphere were known with high accuracy.  Theoretically, reverse-engineering the sphere radii would be possible, but given the robot's inherent accuracy issues, that would likely be self-defeating.

If I started with knowledge of both radii, and had a rough idea of the TCP dimensions to start from, I think I could brute-force a program to iteratively fine-tune the TCP using this method.  But it would take some serious work.  Getting a professional mathematician's input would be valuable, I think.

January 05, 2017, 12:12:19 PM

#### tom.svilans

##### Re: How does calculate the tool frame?
Interesting...

I will have to chat with some of my colleagues who are much better versed in computational geometry. I've just got a 3d taster probe, so maybe I'll give it a go when I get a bit of time.

Yes, I figured the radii should be very precise and known, though how that would enter into the equation, I still have no idea...

It's kind of frustrating, because other than the 4-point method or directly measuring the flange-to-TCP transform with some system, there doesn't seem to be a way to accurately get the TCP.

January 05, 2017, 08:24:41 PM

#### SkyeFire

Global Moderator
##### Re: How does calculate the tool frame?
Well, it's an inherent limitation of physical reality.  With an unknown TCP, you have to measure it somehow.  And the only methods are to measure it directly, or to (somehow) correlate the TCP position in Cartesian space with the corresponding robot pose aver a sufficiently large number of poses.  Any method that relies on the robot is at the mercy of the robot's average accuracy, and any method that purely measures the mechanical relationship between the TCP and the mounting flange is at the mercy of the same problem, just from the other direction.

Today at 12:28:38 AM

Guest
##### Re:  How does calculate the tool frame?

January 09, 2017, 03:27:22 PM

#### tom.svilans

##### Re: How does calculate the tool frame?
Of course, I guess what I meant was getting the TCP by the 4-point method seems to mostly depend on the operator's eyeballs and meat computer. I suppose the easiest way to improve that would just be to setup a couple of cameras roughly perpendicularly around the teaching spike and zoom in on the spikes to really pin down the measurement points. It's just interesting to hear about how other people get a reliable TCP measurement for machining since it still is my least favorite part of the process :p

January 11, 2017, 01:31:34 PM

#### SkyeFire

Global Moderator
##### Re: How does calculate the tool frame?
Well, part of the trick is to limit your variables.  Measure your TCP in the same orientation that you're going to work with, do your milling all in the same orientation, etc.  Tool orientation changes are the biggest killer of robot accuracy -- I've learned this the hard way, trying to do high-accuracy applications.
Also, be aware of backlash -- doing tiny back-and-forth motions "hunting" for the optimum point is another way to kill robot accuracy, since you end up "floating" in the "lost motion" of the robot axes.  This happens on both the TCP-measurement side and the production side.
So far, the best method I've found for measuring a TCP accurately is to position the TCP close to the working volume&orientation, then using a laser tracker, run the robot through a series of iterative motions while tuning the TOOL_DATA value until the deviations between the commanded motion and actual motion are minimized.  But that's a laborious process, and really more suited to initial setup than to regular updates.

### Similar Topics

###### How does Fanuc calculate the tool frame?
6 Replies
8669 Views
April 25, 2016, 03:52:36 AM
by WalterPintor
###### Transformation of coordinate system from Base Frame to Tool Frame

Started by Austenite on Yaskawa Motoman Robot Forum

2 Replies
1795 Views
March 03, 2016, 03:00:19 PM
by motofoto
###### about the sequence of calibrating tool frame and base frame in KRC4

Started by Deejay on KUKA Robot Forum

1 Replies
710 Views
August 10, 2017, 11:34:53 AM
by panic mode
###### set User Frame and Tool Frame in program for multiple groups

Started by robot take over on Fanuc Robot Forum

2 Replies
5618 Views
July 10, 2014, 02:02:11 PM
by robot take over