ELAI S.r.l.

Teaching a robot its tool tip: why many poses may not be enough

A tip stays at one point, yet its offset may remain ambiguous. Geometry, rank and noise explained through synthetic TCP calibration.

Teaching a robot its tool tip: why many poses may not be enough

The problem: the flange is not the tip

A robot knows its flange position, the mounting surface for a tool. To place a tip on a hole it also needs the flange-to-tip offset. An intuitive method holds the tip at one reference point while changing tool orientation. Do four, ten or a hundred poses guarantee the right offset? No: what matters is which motions reveal unknown coordinates, not just the number of data rows.

Abstract. We derive a linear Tool Center Point (TCP) calibration model for tip position only, not full tool orientation. One case has nearly zero residual yet a 225 mm vertical error; another is identifiable but noise-sensitive. We compare geometries using 20,000 synthetic replicates. These are not robot tests or a vendor-algorithm reconstruction, but calculations explaining informative measurements.

Two coordinate frames, one tip

Let t be the flange-to-tip vector in flange coordinates, constant for a rigid securely mounted tool. At pose i, rotation Rᵢ maps flange vectors to base coordinates; pᵢ is flange position in the base. Fixed point c is also in base coordinates and initially unknown. Vectors t, p and c use millimetres; R is dimensionless. Rotate t and then add pᵢ to obtain the tip in base coordinates.

Rᵢ t + pᵢ = c [Rᵢ −I] [t; c] = −pᵢ

The first line places the same tip at the same point in every pose. The second rearranges it for six unknowns: three in t and three in c. I is the identity, leaving vectors unchanged. Stack poses into Hx=b, x=[t;c]. Four poses give twelve equations, but twelve equations need not contain twelve different pieces of information.

A complete noise-free example

Choose t=(30,−20,150) mm and c=(500,200,300) mm, synthetic truth known to the generator but hidden from estimation. Set pᵢ=c−Rᵢt for each rotation. With R=I, p=(470,220,150). A 90° z rotation gives R t=(20,30,150) and p=(480,170,150). Data change, but the rotated vector’s vertical component remains 150: the key warning sign.

Use z rotations 0°, 90°, 180° and 270°. Add 100 mm to both t_z and c_z: all pᵢ remain identical, because z rotations preserve (0,0,100). No statistical estimator can distinguish the two tools from these equations alone; the data lack that difference. This is non-identifiability, not something more numerical precision can fix.

Zero residual can accompany a wrong result

Residual Hx−b measures agreement with calibration data. NumPy least squares gives t=(30,−20,−75) mm and residual norm about 3.4×10⁻¹³ mm. The z coordinate is 225 mm from truth despite near-perfect reconstruction. The solver chooses the minimum-norm member of infinitely many solutions: a mathematical convention, not physical knowledge of tool length.

Rank counts independently constrained unknown combinations. H has rank five rather than six: one direction is missing. Repeating poses a hundred times does not change rank, although it may reduce noise in observed directions. Four identical poses have rank three: only the rotated-tip versus fixed-point difference is known. Measurement count and diversity are different resources.

Identifiable does not mean stable

Rotations around different axes can give rank six. Yet tiny differences between poses may leave the problem almost indistinguishable from the deficient case. Compare four orientations: identity plus 1° rotations about x, y and z; identity plus 90° rotations about those axes. These are mathematical constructions, not instructions for moving a real robot. Reachability, collisions, contact and mechanical limits are absent from the model.

To understand sensitivity, decompose H into three operations: rotate unknown coordinates, scale each direction, then rotate into data coordinates. This is singular value decomposition, SVD. A zero factor means a direction disappears from the data; a tiny factor leaves a very weak trace. Reconstructing the unknown divides by that factor, amplifying errors in the trace too.

H = U Σ Vᵀ x̂ = Σⱼ vⱼ (uⱼᵀ b) / sⱼ (sⱼ > 0) κ₂(H) = s_max / s_min (rank H = 6)

Columns uⱼ and vⱼ are data and unknown directions; sⱼ are dimensionless singular values in this parameterization. The sum reconstructs observed directions. Omitting a missing direction gives a minimum-norm solution, not its measurement. Condition number κ compares largest and smallest factors: about 205 for 1° rotations and 2.22 for 90°. It is neither millimetre accuracy nor a universal score: it depends on the matrix, units and parameterization.

How much noise is amplified?

Add independent zero-mean Gaussian noise with 0.2 mm standard deviation to every p coordinate; rotations remain exact. Generate 20,000 calibrations for each identifiable geometry, solving all poses jointly each time. Measure the root mean squared distance between estimated and true tip: three-dimensional RMSE in millimetres. This is neither maximum error nor a single-coordinate standard deviation.

OrientationsRankκ₂Tip RMSE (mm)
I × 43∞—
Rz(0°,90°,180°,270°)5∞—
I, Rx(1°), Ry(1°), Rz(1°)6204.98716.6504
I, Rx(90°), Ry(90°), Rz(90°)62.215250.220980

Small rotations turn 0.2 mm flange-coordinate noise into about 16.65 mm tip RMSE; diverse orientations give about 0.221 mm. This reflects this geometry and synthetic model, not an improvement ratio transferable to every robot. Dashes mark unidentifiable cases, without inventing precision. NumPy uses seed 20260929, small angles first and diverse orientations second; code, versions and results are downloadable.

Left: six singular values; zero marks an invisible direction. Right: synthetic tip RMSE on a logarithmic millimetre axis, where tenfold values have equal spacing. These are not hardware measurements.
Left: six singular values; zero marks an invisible direction. Right: synthetic tip RMSE on a logarithmic millimetre axis, where tenfold values have equal spacing. These are not hardware measurements.

Dispersion can also be predicted analytically. For exact full-rank H and independent noise variance σ², estimate covariance is σ²H⁺(H⁺)ᵀ, with H⁺ the pseudoinverse. Square roots of its first three diagonal entries give tip-coordinate standard deviations: about 9.588 mm for small angles and 0.1277 mm for diverse orientations, consistent with replicates. Three-dimensional distance combines all three components, so its RMSE exceeds a single-coordinate deviation.

The formula does not justify zero uncertainty in a rank-five system’s missing direction: the pseudoinverse imposes a convention where data impose no constraint. If rotations are uncertain, H itself is noisy, not just b; the simple model no longer suffices. Small angular errors cause tip displacement that grows with distance from the flange, making this limitation especially relevant for long tools.

From a linear system to credible validation

The code solves least squares using a numerically stable decomposition. Explicitly inverting HᵀH is less prudent: its condition number is the square of H’s and can worsen precision loss. With m poses and six unknowns, the matrix has 3m rows and six columns; dense factorization costs on the order of m·6² operations, ignoring constants. For this small problem, informative geometry generally matters more than saving a few multiplications.

Compare methods that add physical information. If c is independently measured, one pose formally yields t=Rᵀ(c−p), since transposition inverts a rotation. But c’s measurement uncertainty remains; accuracy is not free. A known length or regularization restricts solutions through an external constraint. State and verify it, or information supplied by an assumption will be mistaken for calibration evidence.

Device validation should use poses outside the fitting set and, where possible, an independent metrological reference. Separate repeatability, the spread of repeated trials, from accuracy against a reference; quantify tool deformation, fixture play, slipping at the point and robot-kinematics uncertainty. These checks are proposed, not executed here. Low training-pose residual is an internal check, not accuracy or safety certification.

The consulted Universal Robots documentation describes teaching TCP position with three or four differently oriented positions at one point and warns about insufficient pose diversity. That supports the practical relevance of the question, without proving the vendor uses our exact model, solver or noise treatment. We analyzed an explicit reproducible model, not validated a commercial product.

What we learned about the tip

Many poses are insufficient if they all tell the same story. Identifying the tip requires variations revealing every coordinate; stable identification also requires traces large enough relative to measurement errors. Our example separated three often-confused questions: is the solution unique, how noise-sensitive is it, and how reliable is it on the device? Rank, conditioning and independent validation address those respective questions without replacing one another.

Industrial and collaborative robotics is a direction EL-AI intends to explore. This monograph explains the problem; it does not announce a calibration service, installation or company experimental results. Practical questions remain where the ideal model ends: reference quality, angular uncertainty and validation under actual working conditions.

Sources and reproducibility

Universal Robots — PolyScope X, SW10.12, Teaching TCP Position.

The following program reproduces the single-axis counterexample. Rᵀ is unnecessary because stacked poses are solved together; lstsq also returns rank, five here. The archive includes the full experiment, 20,000 replicates per geometry, plotting code and results. Equations and examples are educational analysis carried out here, not original peer-reviewed research.

import numpy as np
I = np.eye(3)
Rz = np.array([[0.,-1,0],[1,0,0],[0,0,1]])
t = np.array([30.,-20,150]); c = np.array([500.,200,300])
Rs = [I, Rz, Rz@Rz, Rz@Rz@Rz]
H = np.vstack([np.hstack([R,-I]) for R in Rs])
b = -np.concatenate([c-R@t for R in Rs])
x, _, rank, _ = np.linalg.lstsq(H,b,rcond=None)
print("rank:", rank, "estimated tip mm:", x[:3])
print("residual mm:", np.linalg.norm(H@x-b))
# Zero residual does not identify the missing direction.

Code, data, and instructions · JSON. Educational calculations executed with Python 3.14.0; figures with Matplotlib 3.11.2. AI-assisted analysis, without claiming peer review or human review. Original illustrative ImageGen cover: it does not document EL-AI people, premises, or installations. Sources accessed 29 September 2026.