Differential Kinematics and Jacobians
Forward kinematics answers 'If my joints are at these angles, where is my hand?' That's great for taking a snapshot, yet real robots don't teleport between snapshots — they move continuously. As soon as you want your gripper to glide smoothly in a straight line across a table, you need to relate joint speeds to hand velocity.
Core ideas covered in this module
- Velocity Jacobian J(q)
- Manipulability ellipsoids
- Singularities & rank loss
The Jacobian: a local speed translator
Suppose you nudge your shoulder joint by a tiny bit per second (`θ̇₁`) while holding your elbow still (`θ̇₂ = 0`). Your hand swings along an arc perpendicular to the arm. Now hold your shoulder still and nudge only your elbow (`θ̇₂`): your hand swings along a different direction perpendicular to the forearm.
The Jacobian matrix `J(q)` simply packs those individual tip-velocity arrows side by side as columns. Multiply `J(q)` by any vector of joint speeds `q̇`, and out pops the exact linear (and angular) velocity `v = J(q) q̇` of the end-effector at that instant. Notice the `(q)` in parentheses: because the arm's geometry changes as it bends, the Jacobian has to be recomputed continuously as the robot moves.
Manipulability ellipses and why singularities feel stuck
Imagine standing at a fixed joint configuration `q` and asking: 'If my motors have a total speed budget of 1 unit (`‖q̇‖ ≤ 1`), what shapes of hand velocity can I reach?' The answer is always an ellipse (or ellipsoid in 3D) called the velocity manipulability ellipsoid, whose axes come from the singular values `σ_max` and `σ_min` of `J(q)`.
When your elbow is comfortably bent near 90°, the ellipse looks round and healthy — the hand moves easily in every direction. Stretch the arm almost straight (`θ₂ → 0°`) or fold it completely onto itself (`θ₂ → ±180°`), and the ellipse flattens into a thin pancake. In the radial direction along the outstretched arm, `σ_min → 0`: the Jacobian loses rank, meaning no combination of joint speeds can move the hand straight outward, and asking the inverse Jacobian `J⁻¹ v` for even a tiny outward nudge commands infinite joint speed.
Interactive lab
Manipulability Ellipsoid & Force Vector Visualizer
marimo· LiveTaming singularities with damped least squares
In real velocity controllers, you never blindly invert `J(q)` with `J⁻¹`, because near a singularity that matrix inversion explodes. Instead, controllers add a small damping term `λ` (Damped Least Squares, `Jᵀ (J Jᵀ + λ² I)⁻¹`) that smoothly trades a millimeter of tracking accuracy for calm, bounded motor speeds whenever `σ_min` drops low.
Differential kinematics & manipulability
v = J(q) q̇ | ellipsoid axes = eigenvectors of J(q)J(q)ᵀ & singular values σᵢ = √λᵢ of J(q)
The ratio `σ_min / σ_max` (or its inverse, the condition number) measures how close the arm is to a singularity where one Cartesian direction becomes impossible.
A 2-link arm reaches out completely straight (`θ₂ = 0°`). You command a tiny outward radial velocity along the line of the arm. What happens to the manipulability ellipse and the required joint velocities?
Operational-space controllers, teleoperation rigs, and diffusion policies outputting end-effector velocity commands all rely on Jacobian velocity mappings — and safety filters routinely monitor `σ_min` so teleoperators don't slam joints near workspace edges.
Hands-On Python Notebook
04 · Jacobians, Singularities & Manipulability Ellipsoids
Compute J(q), run SVD to plot velocity manipulability ellipses, and compare exact vs. damped least-squares joint velocities near full extension.
Try this on your own inside the notebook
- Sweep θ₂ toward 0° and plot the Jacobian condition number explosion
- Tune damping λ to keep joint speeds bounded across a singularity
In Google Colab, use File → Save a copy in Drive to keep your own edits and notes. Or download the files directly:
uvx marimo edit --sandbox notebooks/course-2/04_differential_kinematics_jacobians.pyWrap up this module
Saved automatically in your browser profile so you can pick up right where you left off.