An industrial 6-revolute-joint arm. Forward kinematics chains Denavit–Hartenberg transforms; an iterative Jacobian solver drives the joints toward a draggable target.
How it works ▾
Forward kinematics (DH): each of the 6 joints carries Denavit–Hartenberg parameters (aᵢ, αᵢ, dᵢ, θᵢ). The chain of homogeneous transforms
Tᵢ = Rz(θᵢ)·Tz(dᵢ)·Tx(aᵢ)·Rx(αᵢ)
multiplies out to the end-effector's position and its full orientation (the small red/green/blue axes at the tool tip).
Inverse kinematics (Jacobian): every frame the geometric Jacobian J is rebuilt from the joint axes zᵢ₋₁ and origins pᵢ₋₁:
Jᵥᵢ = zᵢ₋₁ × (p_end − pᵢ₋₁)
Jωᵢ = zᵢ₋₁
Given the 6-D pose error e (position + orientation), a damped least-squares pseudo-inverse solves
Δθ = Jᵀ(JJᵀ + λ²I)⁻¹ e
and the joints step toward the target every frame — a real gradient-based IK solver, not a canned animation.
- If the target is farther than the arm's total reach, it stretches toward it but never quite arrives — watch the distance readout stay non-zero.
- Near full extension the Jacobian becomes near-singular (det(J) → 0): the same pose error demands huge joint velocities, so motion gets jerky and the HUD warns you.