Inverse kinematics: from a desired hand position back to joint angles
逆运动学
Given where the end effector should be, find joint values that put it there: closed-form solutions for the planar 2R arm, Newton–Raphson with the pseudoinverse, what happens near singularities and with unreachable targets, damped least squares and redundancy, tested on small original planar-arm programs.
inverse-kinematicsThe hand knows where to go; the joints do not
A robot arm is told to put its gripper at a point on the table. The controller does not command points; it commands joint angles. Forward kinematics answers the easy question: given the joint angles, where is the gripper? Inverse kinematics (IK) answers the reverse one: given where the gripper should be, which joint angles put it there? Chapter 6 problem statement
The reverse question is harder because its answer need not exist and need not be unique. Hold your own shoulder still and touch a point on a desk with your fingertip: you can usually do it with your elbow pointing out or tucked in. Reach for a point beyond your arm’s length and there is no answer at all. At full extension, there is just one. A snake-like arm with more joints than the task needs can reach most points in infinitely many ways. Planar examples
This article covers two groups of methods. Analytic (closed-form) IK writes the joint angles as formulas in the target, which lists every solution but works only for special geometries. Numerical IK starts from a guess and improves it with the Jacobian. This approach works for almost any arm, but it returns one solution at a time, depends on the starting guess and can misbehave near singular postures and unreachable targets. Numerical motivation Why iterative methods
It builds on neighbouring articles without repeating them: robot kinematics for forward kinematics and how the manipulator Jacobian is obtained, the Jacobian and pseudoinverse articles for the underlying linear algebra, and Newton’s method for root finding in general. Every number from code below comes from small original planar-arm programs with unit link lengths; they are toy illustrations, not measurements of any real robot.
Solutions, iterations and what breaks them
The problem. For an open chain with n joints and forward kinematics T(θ), IK asks: given a desired end-effector configuration X, find θ with T(θ) = X. For a spatial arm X is a full position and orientation. To keep everything computable by hand, this article mostly uses the planar two-joint (2R) arm with link lengths L1 and L2, whose tip position is: Problem and 2R arm
Workspace and the number of solutions. With L1 > L2, the reachable tip positions form an annulus with inner radius L1 − L2 and outer radius L1 + L2. Compare the distance of the target from the base, , with that interval: outside it there is no solution, on its boundary one, strictly inside two. (The book’s sentence states the test with x² + y², but the radii it gives are distances, so the square root is what belongs there.) The two interior solutions differ in the sign of the elbow angle and are called lefty and righty, or elbow-up and elbow-down. Workspace
The closed form. The law of cosines in the triangle formed by the two links and the line from base to target gives the elbow, and a second application gives the angle between link 1 and that line. The direction of the line comes from atan2(y, x), the four-quadrant arctangent whose values lie in (−π, π], unlike tan⁻¹(y/x), which only covers (−π/2, π/2) and cannot tell opposite quadrants apart. With β ∈ [0, π]: 2R closed form
The same picture explains redundancy. A planar three-link chain has infinitely many solutions for interior targets. For spatial arms and targets inside the workspace, six joints typically give a finite number of solutions and more than six give infinitely many; outside the workspace there are none. The most general six-revolute chain has up to 16 solutions, a result the book credits to Lee and Liang (1988) and Raghavan and Roth (1990). Counting solutions
Decoupling for common industrial arms. When the last three joint axes of a six-joint arm intersect at a point, as in PUMA-type arms with orthogonal intersecting wrist axes, the wrist center’s position depends only on the first three joints. IK then splits into an inverse-position problem for the wrist center (which reduces to a planar two-link problem like the one above) and an inverse-orientation problem for the last three joints, which are ZYX Euler angles of a known rotation. With a shoulder offset there are generally four inverse-position solutions (lefty or righty, combined with elbow-up or elbow-down). For the zero-offset arm, a wrist center on the base z-axis leaves θ1 undetermined: infinitely many solutions, a singular configuration. PUMA-type arms
Newton–Raphson. When no closed form exists, or when a real arm’s axes are not exactly intersecting or orthogonal, IK becomes root finding. Let f(θ) be the tip coordinates and x_d the target. Linearizing around the current iterate gives a linear system in the step; for a square invertible J the step is J⁻¹ times the error, and replacing J⁻¹ by the Moore–Penrose pseudoinverse J† extends it to any shape: Newton–Raphson IK
The pseudoinverse has the two properties that matter here. If the linear system is solvable, J† picks the exact solution with the smallest two-norm (there are infinitely many when J is wide, n > m, a redundant arm). If it is not solvable (J tall, or rank-deficient at a singularity), J† gives the step that minimizes the residual. For full rank, J† = Jᵀ(JJᵀ)⁻¹ for wide J and (JᵀJ)⁻¹Jᵀ for tall J. Pseudoinverse cases
For a full target pose in SE(3), the error vector is replaced by the body twist obtained from the matrix logarithm of the pose error, and the update uses the body Jacobian; iteration stops when both the angular and linear parts of that twist are below tolerances. The book’s Example 6.1 runs this on a 2R arm with unit links, target joint angles (30°, 90°) and tip (0.366, 1.366) m, including orientation; from (0°, 30°) it converges in three iterations, through (34.23°, 79.18°) and (29.98°, 90.22°) to (30.00°, 90.00°). Those are the book’s numbers. Our program below solves a different, position-only problem with the same target and start, and behaves quite differently. SE(3) algorithm and Example 6.1
Basins of attraction. When several solutions exist, Newton–Raphson tends to converge to the one “closest” to the initial guess; each solution has a basin of attraction, and a guess in no basin may not converge at all. In practice the guess is kept close by starting from a known home posture, moving the target slowly relative to the IK rate, and using the previous timestep’s solution as the next guess. Initial guesses
Singularities. A kinematic singularity is a posture where the Jacobian loses rank, so the end effector cannot move instantaneously in some direction. For the 2R arm this happens at θ2 = 0° or 180°, fully stretched or folded, where the manipulability ellipse collapses to a line segment. Whether a posture is singular does not depend on using the space or body Jacobian, or on the choice of fixed and end-effector frames. Singularities The pseudoinverse is well behaved exactly at a singularity, where it simply does not try to move in the impossible direction. The trouble is the neighbourhood: there, tiny target motions produce very large joint changes. Roundoff means exact singularities are rarely hit, so near-zero tests are needed. Pseudoinverse near singularities
Jacobian transpose. Buss’s report surveys the main Jacobian-based alternatives. The simplest step is Δθ = αJᵀe. Because the inner product of JJᵀe with e equals the squared norm of Jᵀe, which is non-negative, a small enough α reduces the error; Buss gives a reasonable α as the ratio of ⟨e, JJᵀe⟩ to ⟨JJᵀe, JJᵀe⟩, and credits its use for IK to Balestrino et al. (1984) and Wolovich and Elliot (1984). It is cheap, but in his tests its quality was poor. Jacobian transpose
Damped least squares. Instead of the minimum-norm exact step, damped least squares (DLS) penalizes large steps with a damping constant λ > 0: DLS
The right-hand form inverts only an m × m matrix. The method is also called Levenberg–Marquardt; Buss credits its first IK uses to Wampler (1986) and to Nakamura and Hanafusa (1986). It is the same penalty as in ridge regression. The singular value decomposition shows what damping does. Writing J as a sum of σ_i u_i v_iᵀ: SVD view
For σ_i much larger than λ the two gains agree. As σ_i → 0 the pseudoinverse gain 1/σ_i explodes while the DLS gain goes back to zero. The price is that DLS no longer solves the linear model exactly: λ must be large enough for well-behaved steps near singularities, but too large a value makes convergence slow, and a number of proposed schemes, which Buss cites but we did not read, choose λ dynamically from the current configuration. Choosing λ
Unreachable targets and clamping. Buss stresses that unreachable targets matter in practice: a barely reachable target needs full extension and behaves almost like an unreachable one. Pseudoinverse and Jacobian-transpose methods can oscillate badly there, while damped methods can still perform well. Clamping each error component to a maximum length (he reports about half a typical link length working well) reduces oscillation and allows a smaller λ; he also recommends capping the joint-angle change per update. Unreachable targets and clamping
Redundancy and the null space. When J is wide, I − J†J projects onto the null space of J, joint motions that do not move the end effector to first order. Adding any such motion keeps the least-squares property: Null-space method
The vector φ can pursue a secondary goal: a rest posture, manipulability, obstacle avoidance, or staying away from joint limits, the use Buss attributes to Liégeois (1977). At the velocity level, θ̇ = J†V_d avoids solving position IK at every step, but velocity errors accumulate, so position feedback is needed; the kinetic-energy-minimizing alternative replaces J† by the mass-weighted pseudoinverse M⁻¹Jᵀ(JM⁻¹Jᵀ)⁻¹, where M is the mass matrix from robot dynamics. For redundant arms, numerical IK can also turn a closed end-effector loop into a joint motion that does not return to its start. Inverse velocity kinematics and closed loops
Five small experiments on planar arms
The program uses only numpy and contains no random numbers. All arms have unit links. Part 1 runs the closed form on three targets. Part 2 runs position-only Newton–Raphson (the update above, with J† from np.linalg.pinv) and DLS from (0°, 30°) towards the Example 6.1 tip. Part 3 takes one step near the straight-arm singularity. Part 4 iterates 200 times towards an unreachable target with several damping constants. Part 5 solves a redundant three-link arm from two starts and checks the null-space projector. Joint angles are not wrapped to (−180°, 180°].
import numpy as np
np.set_printoptions(precision=4, suppress=True)
def fk(theta, lengths):
a = np.cumsum(theta)
return np.array([np.sum(lengths * np.cos(a)), np.sum(lengths * np.sin(a))])
def jacobian(theta, lengths):
a = np.cumsum(theta)
n = len(theta)
J = np.zeros((2, n))
for j in range(n):
J[0, j] = -np.sum(lengths[j:] * np.sin(a[j:]))
J[1, j] = np.sum(lengths[j:] * np.cos(a[j:]))
return J
def analytic_2r(x, y, l1, l2):
r2 = x * x + y * y
if r2 > (l1 + l2) ** 2 + 1e-12 or r2 < (l1 - l2) ** 2 - 1e-12:
return []
beta = np.arccos(np.clip((l1 * l1 + l2 * l2 - r2) / (2 * l1 * l2), -1, 1))
alpha = np.arccos(np.clip((r2 + l1 * l1 - l2 * l2) / (2 * l1 * np.sqrt(r2)), -1, 1))
gamma = np.arctan2(y, x)
sols = [(gamma - alpha, np.pi - beta), (gamma + alpha, beta - np.pi)]
unique = []
for s in sols:
if not any(np.allclose(s, u, atol=1e-9) for u in unique):
unique.append(s)
return unique
def step(J, e, lam):
if lam == 0.0:
return np.linalg.pinv(J) @ e
return J.T @ np.linalg.solve(J @ J.T + lam ** 2 * np.eye(J.shape[0]), e)
def solve(theta0, target, lengths, lam, iters=200, tol=1e-8):
theta = np.array(theta0, dtype=float)
steps = []
for k in range(iters):
e = target - fk(theta, lengths)
if np.linalg.norm(e) < tol:
return theta, k, steps
d = step(jacobian(theta, lengths), e, lam)
theta = theta + d
steps.append(np.linalg.norm(d))
return theta, iters, steps
L2R = np.array([1.0, 1.0])
print("1) Analytic 2R IK (L1 = L2 = 1)")
for tgt in [(0.366, 1.366), (2.0, 0.0), (2.5, 0.5)]:
sols = analytic_2r(tgt[0], tgt[1], 1.0, 1.0)
print(f" target {tgt}: {len(sols)} solution(s)")
for s in sols:
err = np.linalg.norm(fk(np.array(s), L2R) - np.array(tgt))
print(f" theta (deg) = {np.degrees(s)}, fk error = {err:.1e}")
print("\n2) Newton-Raphson / DLS on a reachable target, start (0, 30 deg)")
tgt = np.array([0.366, 1.366])
th0 = np.radians([0.0, 30.0])
theta = th0.copy()
for k in range(4):
e = tgt - fk(theta, L2R)
print(f" iter {k}: theta (deg) = {np.degrees(theta)}, |e| = {np.linalg.norm(e):.2e}")
theta = theta + step(jacobian(theta, L2R), e, 0.0)
for lam in [0.0, 0.1, 0.5]:
th, k, _ = solve(th0, tgt, L2R, lam)
print(f" lambda = {lam}: {k} iterations to |e| < 1e-8, theta (deg) = {np.degrees(th)}")
print("\n3) One step near the straight-arm singularity, theta = (0, 0.05 rad)")
th = np.array([0.0, 0.05])
J = jacobian(th, L2R)
U, S, Vt = np.linalg.svd(J)
print(f" singular values = {S}, condition number = {S[0] / S[1]:.1f}")
e = 0.01 * U[:, 1]
for lam in [0.0, 0.1]:
d = step(J, e, lam)
moved = fk(th + d, L2R) - fk(th, L2R)
print(f" lambda = {lam}: |dtheta| = {np.linalg.norm(d):.4f} rad, "
f"requested |dx| = 0.0100, actual |dx| = {np.linalg.norm(moved):.4f}, "
f"miss = {np.linalg.norm(moved - e):.4f}")
for lam in [0.0, 0.1]:
gains = [1 / s if lam == 0 else s / (s * s + lam * lam) for s in S]
print(f" lambda = {lam}: per-direction gains = {np.array(gains)}")
print("\n4) Unreachable target (2.5, 0.5), start (0.3, 0.5 rad), 200 iterations")
tgt = np.array([2.5, 0.5])
print(f" best possible error = {np.linalg.norm(tgt) - 2.0:.4f}")
for lam in [0.0, 0.1, 0.3, 0.5, 1.0]:
th, k, steps = solve([0.3, 0.5], tgt, L2R, lam)
err = np.linalg.norm(tgt - fk(th, L2R))
print(f" lambda = {lam}: final error = {err:.4f}, "
f"largest |dtheta| in last 50 steps = {max(steps[-50:]):.3g}")
print("\n5) Redundant 3R arm (L = 1, 1, 1), target (1.5, 1.0)")
L3R = np.array([1.0, 1.0, 1.0])
tgt = np.array([1.5, 1.0])
for th0 in ([0.1, 0.5, 0.5], [1.5, -1.0, -0.5]):
th, k, _ = solve(th0, tgt, L3R, 0.0)
print(f" start {th0}: {k} iterations, theta (rad) = {th}, "
f"fk error = {np.linalg.norm(fk(th, L3R) - tgt):.1e}")
J = jacobian(th, L3R)
P = np.eye(3) - np.linalg.pinv(J) @ J
phi = np.array([1.0, -2.0, 0.5])
print(f" null-space projection: |J (I - J+J) phi| = {np.linalg.norm(J @ P @ phi):.1e}, "
f"rank of (I - J+J) = {np.linalg.matrix_rank(P)}")
Recorded output (CPython 3.12, numpy 1.26.4)
1) Analytic 2R IK (L1 = L2 = 1)
target (0.366, 1.366): 2 solution(s)
theta (deg) = [29.9995 90.0025], fk error = 2.2e-16
theta (deg) = [120.002 -90.0025], fk error = 5.0e-16
target (2.0, 0.0): 1 solution(s)
theta (deg) = [0. 0.], fk error = 0.0e+00
target (2.5, 0.5): 0 solution(s)
2) Newton-Raphson / DLS on a reachable target, start (0, 30 deg)
iter 0: theta (deg) = [ 0. 30.], |e| = 1.73e+00
iter 1: theta (deg) = [-99.2432 301.1334], |e| = 3.09e+00
iter 2: theta (deg) = [ 59.1251 -52.9643], |e| = 1.21e+00
iter 3: theta (deg) = [ 137.4919 -148.7059], |e| = 8.93e-01
lambda = 0.0: 8 iterations to |e| < 1e-8, theta (deg) = [120.002 -90.0025]
lambda = 0.1: 10 iterations to |e| < 1e-8, theta (deg) = [29.9995 90.0025]
lambda = 0.5: 20 iterations to |e| < 1e-8, theta (deg) = [29.9995 90.0025]
3) One step near the straight-arm singularity, theta = (0, 0.05 rad)
singular values = [2.2354 0.0224], condition number = 100.0
lambda = 0.0: |dtheta| = 0.4473 rad, requested |dx| = 0.0100, actual |dx| = 0.0299, miss = 0.0399
lambda = 0.1: |dtheta| = 0.0213 rad, requested |dx| = 0.0100, actual |dx| = 0.0004, miss = 0.0096
lambda = 0.0: per-direction gains = [ 0.4473 44.7266]
lambda = 0.1: per-direction gains = [0.4465 2.1294]
4) Unreachable target (2.5, 0.5), start (0.3, 0.5 rad), 200 iterations
best possible error = 0.5495
lambda = 0.0: final error = 4.3385, largest |dtheta| in last 50 steps = 197
lambda = 0.1: final error = 0.5953, largest |dtheta| in last 50 steps = 2.81
lambda = 0.3: final error = 0.5843, largest |dtheta| in last 50 steps = 0.819
lambda = 0.5: final error = 0.5495, largest |dtheta| in last 50 steps = 1.59e-16
lambda = 1.0: final error = 0.5495, largest |dtheta| in last 50 steps = 9.78e-17
5) Redundant 3R arm (L = 1, 1, 1), target (1.5, 1.0)
start [0.1, 0.5, 0.5]: 5 iterations, theta (rad) = [-0.5461 1.1152 1.1999], fk error = 3.8e-15
start [1.5, -1.0, -0.5]: 4 iterations, theta (rad) = [ 1.8773 -1.4031 -0.8967], fk error = 6.0e-14
null-space projection: |J (I - J+J) phi| = 2.1e-16, rank of (I - J+J) = 1Part 1, closed form. The target (0.366, 1.366) has two solutions, (29.9995°, 90.0025°) and (120.002°, −90.0025°), each reproducing the target to about 1e-16. The small offsets from (30°, 90°) arise because 0.366 and 1.366 are rounded tip coordinates. The target (2.0, 0.0) lies on the outer boundary and has the single solution (0°, 0°); (2.5, 0.5) lies outside and has none.
Part 2, basins. The first full Newton step from (0°, 30°) is enormous: it jumps to (−99.2432°, 301.1334°) and the error grows from 1.73 to 3.09 before falling to 1.21 and 0.893. The undamped iteration reaches an error below 1e-8 after 8 iterations, but at the lefty solution (120.002°, −90.0025°), not the righty one near the start. DLS with λ = 0.1 needs 10 iterations and λ = 0.5 needs 20, both ending at the righty solution (29.9995°, 90.0025°). Damping shortened the first steps enough to stay in the nearer basin, and paid for it with more iterations. This is a position-only problem; it is not the book’s Example 6.1, whose orientation-including iteration converges to (30°, 90°) in three steps.
Part 3, one step near a singularity. At θ = (0, 0.05 rad) the singular values are 2.2354 and 0.0224, a condition number of 100.0. A request of 0.01 along the weak direction u₂ gets pseudoinverse gain 44.7266, so the joints move by 0.4473 rad. The linear model is useless at that size: the tip actually moves 0.0299 in a different direction and misses the requested point by 0.0399, more than the request itself. DLS with λ = 0.1 caps the gain at 2.1294, moves 0.0213 rad, moves the tip only 0.0004 and misses by 0.0096: it is stable because it largely declines the request. Along the strong direction the gains are 0.4473 and 0.4465, almost equal, as the SVD formula predicts.
Part 4, an unreachable target. The best possible error for (2.5, 0.5) is its distance minus 2, i.e. 0.5495. The undamped iteration never settles: its joint steps stay huge to the end and its final error is far above that bound. That run is chaotic, so its exact final numbers depend on floating-point details and are not worth quoting. λ = 0.1 ends at 0.5953 with steps up to 2.81 rad in the last 50 iterations, and λ = 0.3 at 0.5843 with steps up to 0.819 rad: both still oscillate, so their last digits are also sensitive to floating-point details. λ = 0.5 and λ = 1.0 settle at the best possible error 0.5495, the arm stretched straight towards the target, with final steps at round-off level. The threshold between 0.3 and 0.5 is specific to this arm, start and budget, not a rule for choosing λ.
Part 5, redundancy. The three-link arm reaches (1.5, 1.0) from (0.1, 0.5, 0.5) in 5 iterations at θ = (−0.5461, 1.1152, 1.1999) rad and from (1.5, −1.0, −0.5) in 4 iterations at (1.8773, −1.4031, −0.8967) rad, both to within 1e-13. Two different exact solutions, each chosen by where the iteration started. The projector I − J†J has rank 1 (three joints, two task coordinates), and J times a projected vector is 2.1e-16, i.e. zero up to round-off: that one-dimensional family of joint motions is free for a secondary goal.
What this treatment leaves out
The examples are planar and position-only. A real arm needs orientation (the SE(3) body-twist version), joint limits, self-collision and obstacle avoidance, none of which the code handles; Buss’s report likewise treats “pure” IK without joint limits or self-collision. Scope Task-priority control, trajectory optimization and visual servoing build on these pieces but are beyond this article.
Damping is not free and not automatic. In Part 2 it more than doubled the iteration count; in Part 4 too small a λ still oscillated. Buss found in his tests on multi-end-effector “Y” figures that minimizing average error left visible shaking, so λ had to be raised at the expense of tracking accuracy. Experiments Those experiments were on graphics figures with timings from older hardware; they are not industrial-robot benchmarks. The code does not implement error clamping, per-update step caps, selectively damped least squares (which Buss’s report names but defers to a separate paper with Kim that we did not read) or any adaptive λ.
Numerical IK returns one solution, picked by the basin of the starting guess, and can silently jump to another posture, as Part 2 did. Applications that care which posture they get, for example to avoid a large elbow flip, need either analytic enumeration or explicit continuity from the previous solution. Buss’s overview also lists neural-net and other artificial-intelligence methods as a family, but we read no such paper and make no claims about them.
Solve, step and choose
-
In Part 3, why does a request of 0.01 move the joints by 0.4473 rad, and why does the tip then miss by more than the request itself?
Answer: The request lies along u₂, whose singular value is σ₂ = 0.0224, so the pseudoinverse gain is 1/σ₂ ≈ 44.7 and the joint step is about 44.7 × 0.01 ≈ 0.447 rad. The linear model JΔθ is valid only for small steps; a 0.45 rad change of the elbow alters the geometry so much that the actual tip displacement (0.0299) points elsewhere and misses by 0.0399. DLS caps the gain at σ/(σ² + λ²) ≈ 2.13 and accepts a miss of 0.0096 instead of a violent motion.
-
A planar 2R arm has L1 = L2 = 1 and target (1, 1). Find both solutions with the closed form and check one. Then compute the DLS gain for σ = 0.0224 and λ = 0.1.
Answer: x² + y² = 2, so the distance √2 lies inside [0, 2] and there are two solutions. cos β = (1 + 1 − 2)/2 = 0, so β = 90°. cos α = (2 + 1 − 1)/(2·1·√2) = 1/√2, so α = 45°. γ = atan2(1, 1) = 45°. Righty: (γ − α, π − β) = (0°, 90°); lefty: (γ + α, β − π) = (90°, −90°). Check righty: x = cos 0° + cos 90° = 1 and y = sin 0° + sin 90° = 1. DLS gain = 0.0224/(0.0224² + 0.01) = 0.0224/0.01050176 ≈ 2.13; the program prints 2.1294 because it uses the unrounded σ.
-
A colleague says “damped least squares is always better than the pseudoinverse.” Give two counterexamples from the program, and say what an exact singularity does to the pure pseudoinverse.
Answer: (a) On the reachable target, λ = 0.5 needs 20 iterations against 8 undamped: damping slows convergence where the singular values are not small. (b) In Part 3, DLS moves the tip only 0.0004 for a request of 0.01; it is stable because it refuses most of the task. Also, λ = 0.1 and 0.3 still oscillated on the unreachable target, so damping alone guarantees nothing; its value matters. At an exact singularity the pseudoinverse sets the gain of the zero singular value to zero and does not try to move in the impossible direction; the danger is near the singularity, where 1/σ is huge.
-
Choose a method for each: (a) a six-axis industrial arm with intersecting orthogonal wrist axes that must pick among discrete postures; (b) an animated character with many joints whose hand targets often move out of reach; (c) a seven-joint arm that must reach a pose while staying away from joint limits.
Answer: (a) Analytic IK by wrist-center decoupling enumerates the discrete solutions (generally four inverse-position solutions with a shoulder offset, each with its wrist angles); a few Newton–Raphson iterations can then refine them for manufacturing deviations. (b) Damped least squares with error clamping and a cap on the joint change per update, because pseudoinverse and Jacobian-transpose iterations oscillate on unreachable targets. (c) The arm is redundant: use the pseudoinverse or DLS for the task plus a null-space term (I − J†J)φ whose φ pushes away from joint limits, remembering that a closed task loop need not produce a closed joint loop.
Sources and open problems
Lynch and Park’s Modern Robotics is the main source. We read the May 2017 preprint’s Chapter 6 main text (pp. 219–236: the 2R closed form, PUMA- and Stanford-type arms, Newton–Raphson, the pseudoinverse, Example 6.1, inverse velocity kinematics, closed loops and the chapter notes), the Chapter 5 passages on the 2R Jacobian, manipulability ellipse and singularity analysis (pp. 172–180 and 191–194) and two bibliography entries; we did not read the Chapter 6 exercises or the rest of Chapter 5. Modern Robotics preprint Buss’s report, dated October 7, 2009 and written as the introduction to a paper with Kim, was read in full (printed pp. 1–19): Jacobian construction, error clamping, Jacobian transpose, pseudoinverse and null space, damped least squares, the SVD analysis and his experiments. Buss report The papers it and the book cite (Liégeois, Wampler, Nakamura and Hanafusa, Lee and Liang, Raghavan and Roth) are mentioned only through those citations.
Open questions sit where the simple picture stops. How should the damping constant adapt to the configuration and the reachability of the target without hand tuning? How should several end effectors or several task priorities share an arm’s freedom when they conflict? How can an iterative solver keep a chosen posture continuously while also respecting joint limits and collisions? A useful IK report states the arm, whether orientation is included, the method and its parameters, the starting-guess policy, and what happens when the target is out of reach.
Make a prediction, then check
At some configuration the Jacobian's smallest singular value is 0.02 and the damping constant is λ = 0.1. For a small end-effector request along that singular direction, what are the pseudoinverse and damped-least-squares gains roughly?
Learning objectives
- Solve the planar two-link arm in closed form with the law of cosines and atan2, and use the workspace to tell zero, one and two solutions apart.
- Compare Newton–Raphson pseudoinverse iteration with damped least squares near singularities and on unreachable targets, explaining the difference through singular-value gains.
Prerequisites & connections
Explore related knowledge →References
- Modern Robotics: Mechanics, Planning, and Control — May 2017 preprint, scoped
Kevin M. Lynch; Frank C. Park · 2017 - Introduction to Inverse Kinematics with Jacobian Transpose, Pseudoinverse and Damped Least Squares methods
Samuel R. Buss · 2009
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Claude · 2026-12-03 · Independent AI check (Claude subagent, not the author; not a human or expert review). Research was done by a separate research subagent (facts.md) and the prose by a writer subagent; style-only edits suggested by the Gemini app were applied to the opening (intuition) sections before this check, and all seven logged edits for this topic in gemini-edits-016a.json were compared old-versus-new. Ran example.py with the pinned interpreter (CPython 3.12, numpy 1.26.4): output identical to example.stdout.txt; the python blocks in en.mdx and zh.mdx are byte-identical to example.py; display equations identical across languages; diffed against the numpy 2.x output to confirm which digits are build-sensitive. Re-derived the 2R closed form, the pseudoinverse and damped-least-squares SVD gains, exercise 2 (target (1, 1)), the DLS gain 0.0224/(0.0224^2+0.01) and the quiz gain 0.02/0.0104. Downloaded and re-read myself via pdftotext: Modern Robotics May 2017 preprint Chapter 6 main text pp. 219-236 (annulus workspace and the book's x^2+y^2 sentence, atan2, law-of-cosines solution, PUMA zero-offset singularity and four offset solutions, ZYX wrist, basins, initial-guess practice, Example 6.1 table, mass-weighted pseudoinverse, closed loops, summary, notes with refs 87 and 143), Chapter 5 passages on the manipulability ellipse and singularity invariance; and Buss's report dated October 7, 2009 in full (pp. 1-19). Compared zh and en section by section and checked data.json IDs against src/data/catalogue.txt. Not checked: Chapter 6 exercises, the cited primary papers (Lee-Liang, Raghavan-Roth, Liegeois, Wampler, Nakamura-Hanafusa, Buss-Kim SDLS), rendered HTML.
- Pinned-interpreter (numpy 1.26.4) output matches example.stdout.txt exactly; both code blocks are byte-identical to example.py; every quoted number matches the output, and no numbers are quoted from the chaotic undamped unreachable-target run.
- 2R reachability compares the distance sqrt(x^2+y^2) with [L1-L2, L1+L2] and correctly notes that the book's sentence says x^2+y^2; the Example 6.1 iterates (34.23, 79.18), (29.98, 90.22), (30.00, 90.00) degrees match the book's table and are quoted only as the book's, kept separate from our position-only run.
- Claims attributed to Buss's report (2009-10-07) on the Jacobian transpose, pseudoinverse behaviour at versus near singularities, null space and Liegeois, DLS with Wampler and Nakamura-Hanafusa, clamping at about half a link length, and raising lambda against shaking in the Y-figure tests are supported; the experiments are not presented as industrial benchmarks.
- Exercise answers, the quiz answer (option 0, gains about 50 and 1.92) and prerequisite/related IDs check out; the Chinese is a full translation; the Gemini style edits changed no fact, hedge or attribution.
Source locations checked:
- Modern Robotics: Mechanics, Planning, and Control — May 2017 preprint, scoped · Downloaded MR.pdf (642 pages, PDF creation date 2017-05-03) and read via pdftotext. Printed page numbers: pp. 172–177 (Ch. 5 opening: 2R Jacobian Eq. 5.1, singular at θ2 = 0°/180°, manipulability ellipse collapses, Jacobian at (0, π/4) and (0, 3π/4), statics τ = Jᵀf); pp. 178–180 (start of §5.1, column i = twist for unit θ̇i, space/body Jacobian); pp. 191–194 (§5.3: singularity = rank drop; invariance to space/body Jacobian and to fixed/end-effector frame; Case I collinear axes); pp. 219–236 (all Ch. 6 text: problem statement, annulus workspace, atan2 range, law-of-cosines 2R solution, multiple/redundant solutions, PUMA zero-offset and offset cases with four solutions, singular px = py = 0, ZYX wrist, Stanford arm, §6.2 motivation, Newton–Raphson Eqs. 6.3–6.6, basins Fig. 6.7, pseudoinverse two cases and left/right inverse formulas, SE(3) body-twist algorithm, initial-guess practice, Example 6.1 table, §6.3 inverse velocity kinematics and mass-weighted pseudoinverse, §6.4 closed loops, §6.5 summary, §6.6 software names, §6.7 notes: up to 16 solutions); bibliography refs [87] Lee & Liang 1988 and [143] Raghavan & Roth 1990. NOT read: Ch. 6 exercises (pp. 236ff.), §5.1.2–5.2, §5.3 Cases II–VI, §5.4 manipulability measures, Appendices B and D. Note: the repo already has a source row 'modern-robotics' pointing to the book's resource page; this row is the preprint PDF actually read and could be merged by the integrator.
- Introduction to Inverse Kinematics with Jacobian Transpose, Pseudoinverse and Damped Least Squares methods · Downloaded iksurvey.pdf (10 PDF sheets, printed pages 1–19) and read in full via pdftotext: §1 pp. 1–3 (method families, unreachable targets, pinv/transpose oscillate, scope excludes joint limits and self-collision); §2 pp. 3–7 (θ, s, t, e notation, Eqs. 1–5, Jacobian entries v_j × (s_i − p_j) and v_j on p. 5, alternate Jacobian, ClampMag with D_max ≈ half a link); §3 p. 7 (Jacobian transpose, Theorem 1, α formula); §4 pp. 8–9 (pseudoinverse properties, instability near singularity, null-space Eq. 7 and Liégeois, normal equations, Eq. 9); §5 pp. 9–10 (DLS objective, Eqs. 10–11, Levenberg–Marquardt, Wampler and Nakamura–Hanafusa, choosing λ); §6 pp. 11–12 (SVD, Eqs. 12–14); §§7–8 pp. 12–14 (SDLS deferred to Buss–Kim; Y/double-Y experiments, runtimes table, recommendations); references pp. 14–19 (used for years of refs 5, 28, 34, 41, 46). The Buss–Kim SDLS paper and the code on the ikmethods page were not read.
Related topics