Overview
Curated: · Written: · Reviewed:
Robot Kinematics
In one line
Kinematics maps joint positions to end-effector pose (forward kinematics) and searches for joints that realise a pose (inverse kinematics). A Jacobian maps joint rates to tool twist. Reach for it whenever a vision target, taught pose or planner waypoint has to become joint commands or be expressed in another frame.
Key definitions
- Frame: a named, directional coordinate system. T_base_tool maps points given in tool coordinates into base coordinates.
- Homogeneous transform: 4x4 [R t; 0 1]. Its inverse is [R^T, -R^T t; 0 1], never a negated t.
- Jacobian J(q): maps joint rates to end-effector twist. It loses rank at a singularity.
- Smallest singular value sigma_min: tip speed the weakest direction gets per rad/s. Small means expensive joint rates.
- Branch: one of several IK solutions for the same pose (elbow up or down, shoulder left or right, wrist flipped).
- Null space: joint rates with J qdot = 0. On a 7-DOF arm this is the self-motion you use for secondary objectives.
- Quaternion double cover: q and -q are the same rotation. Flip into the same hemisphere before slerp.
Formulas and complexity
Planar 2-link FK, with theta1 measured from the base x-axis and theta2 measured relative to link 1, so link 2 sits at theta1+theta2:
Rigid-transform inverse:
Damped least squares (resolved rate):
Unmodelled joint error at the tool, with r the reach and delta theta in radians:
A 1.5 m arm with 0.1 degree of offset error is about 2.6 mm at the tool. A valid rotation matrix has det = +1.
How it works
- Forward kinematics multiplies the per-joint transforms from base to tool at the current q.
- The Jacobian stacks one column per joint: the joint axis and the perpendicular from that axis to the tip.
- Numerical IK drives a stacked residual (position in metres, orientation scaled to metres) to zero. Analytic IK returns up to eight branches that must be filtered.
- Resolved rate turns a desired tip twist into qdot. Damping and speed limits bound it near singularities.
- Treat every solved pose as a claim. Check task-space residual, reachability, limits, collision and frame before executing.
When to use and when not to
| Situation | Use | Why |
|---|---|---|
| Pose from known joints | FK product of joint transforms | Exact and cheap |
| Target inside reach, near singular or redundant | Damped least squares, multistart if needed | Pseudoinverse blows up near singularities |
| Continuous Cartesian path | Differential IK seeded from current q | Stays on one branch |
| Position and orientation residual | Scale orientation into metres, or weight it | Plain 2-norm lets metres dominate |
| Six-DOF closed-form pose | Analytic IK plus branch filter | Fast and deterministic, but several branches |
| Beyond max reach or in collision | Reject or re-plan | No joint solution, and a tolerance pass is not safe |
Traps interviewers probe
- Wrong direction. For a tool at (1,0,0) rotated 90 degrees about z, p_tool = T_base_tool * p_base with p_base = (1,1,0) gives (0,1,0), which is wrong. The correct result is p_tool = R^T(p_base - t) = (1,0,0). Fix: name the direction and invert properly.
- Convergence on step size. A 1.45 m target with 1.2 m reach returned converged=true with a 0.25 m error, because the joint step was small at a stretched pose. Fix: test the Cartesian residual and reachability first.
- Singular seed. A numerical solver seeded at full extension sees zero gradient and returns the seed with a 0.4 m error. Fix: use a non-singular seed and multistart.
- Clipping the output. Clipping joint 2 to [-30, 60] degrees after an unbounded solve stopped the arm 259 mm short. Fix: put the bound inside the solve. The bounded optimum is q1 = -30 degrees, q2 = +60 degrees, 159 mm from the target.
- Round-trip validation. FK then IK returning the same joints proves self-consistency only. Fix: compare against an external measurement at full extension, not just near the base.
Interview tips
Open by naming frames, units and conventions: column vectors, right-handed, radians, metres. Then answer with a concrete example.
Expect these follow-ups: why negating the translation is wrong to invert a transform; what the extra joint on a 7-DOF arm buys and costs; what a small sigma_min tells the controller; why slerp rather than component interpolation; why a passing round-trip test does not prove accuracy.
30-second outline: name the frames and units. FK is the product of joint transforms, and the inverse uses R^T, not a negated translation. For a target, solve IK with damped least squares seeded from the current q. Check the task-space residual, limits and collision, and log the branch. Near a singularity, sigma_min tells me the joint-rate cost of the weak direction, so I damp or slow the motion. Validate at the tool across the envelope against an external measurement.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.