Robotics

Every lesson in the library connects to a robot you can reason about: a two-link arm, a wheeled base, a joint with real friction. Start with frames and rotations, then follow the path through kinematics, dynamics, planning, and control.

99 lessons, in library order. Search within robotics.

  1. Foundations / 9 min read

    Vector spaces: build direction from addition and scaling

    Learn vector spaces through robot displacement. Explore span, linear independence, basis, and dimension with an interactive diagram, Python, and exercises.

  2. Foundations / 9 min read

    The dot product: angles, projections, and robot motion

    Learn the dot product with an interactive vector diagram, a worked projection example, and a robot heading calculation. Includes exercises and solutions.

  3. Foundations / 8 min read

    Conditional probability: reading a robot sensor

    Learn conditional probability with an interactive robot sensor example. Work through the formula, Bayes' rule, base rates, and common mistakes using counts.

  4. Foundations / 8 min read

    Gradient descent: learn the update, then test its limits

    Work through gradient descent by hand, then explore learning rates, overshoot, and stationary points in an interactive experiment with Python and exercises.

  5. Foundations / 9 min read

    Linear regression: fit a line and inspect its errors

    Fit linear regression to robot sensor readings. Work through least squares, residuals, and MSE, then test an outlier with Python and exercises.

  6. Foundations / 8 min read

    Bayesian inference: learning a robot's grasp success rate

    Learn Bayesian inference through a robot grasp example. Update a Beta prior with successes and failures, then distinguish uncertainty from prediction.

  7. Foundations / 9 min read

    Eigenvalues and eigenvectors: find the lines a matrix preserves

    Understand eigenvalues through 2D transformations. Test stretching, reversal, zero eigenvalues, rotation, and repeated values, then connect them to robot error dynamics.

  8. Foundations / 10 min read

    Tensors: read shapes, select values, and move axes

    Learn tensors through a robot image batch. Explore shape, indexing, slicing, and axis order, then compare reshape with transpose using a runnable Python example.

  9. Foundations / 10 min read

    Logistic regression: turn a score into a probability

    Explore logistic regression with synthetic robot observations. Calculate sigmoid probabilities and log loss, then change a threshold and inspect the confusion matrix.

  10. Foundations / 9 min read

    Markov chains: transitions and stationary distributions

    Learn Markov chains with a robot example. Explore transition matrices, stationary distributions, periodic chains, and absorbing states with an interactive model.

  11. Foundations / 9 min read

    Laplace distribution: model sensor error and tolerance

    Learn the Laplace distribution through sensor error. Explore location, scale, density, interval probabilities, and the link between absolute error and median fitting.

  12. Foundations / 11 min read

    Random forests: train different trees and combine their votes

    Build a small random forest from synthetic robot observations. Inspect learned splits, bootstrap samples, random feature choices, and individual tree votes.

  13. Foundations / 8 min read

    A map of machine learning: tasks, signals, and models

    Understand how supervised learning, self-supervision, reinforcement learning, NLP, and deep learning fit together through practical robot and language examples.

  14. Foundations / 9 min read

    NLP: turn robot commands into token probabilities

    Learn natural language processing through a small robot-command corpus. Compare tokenization, unigram and bigram counts, unseen contexts, embeddings, and evaluation.

  15. Foundations / 10 min read

    pandas: select, align, and check a table of robot readings

    Learn pandas Series and DataFrames through robot readings. Compare loc and iloc, inspect label alignment, handle missing values, and check grouped summaries and joins.

  16. Foundations / 9 min read

    Vector norms and normalization: L1, L2, and L∞

    Measure vectors with L1, L2, and infinity norms. Explore unit boundaries, normalize a robot displacement, and distinguish zero vectors from tiny nonzero inputs.

  17. Foundations / 10 min read

    Matrix multiplication: calculate entries and compose transformations

    Learn matrix multiplication through row-column dot products, compatible shapes, and a rotation-and-stretch experiment that shows why transformation order matters.

  18. Foundations / 11 min read

    Cross product: find a normal direction and calculate torque

    Calculate a three-dimensional cross product, follow the right-hand rule, and connect its magnitude to area. Explore signed torque with a movable lever arm and force.

  19. Foundations / 9 min read

    Matrix transpose and inverse: when do they agree?

    Transpose rectangular matrices, calculate a 2×2 inverse, and test when a transpose reverses a transformation. Explore rotations, reflections, and singular maps.

  20. Foundations / 11 min read

    Determinants: signed area, volume, and collapsed directions

    Calculate a determinant, see how its sign records orientation, and connect zero area to singular matrices. Learn why a small determinant alone does not imply poor conditioning.

  21. Foundations / 12 min read

    Rank and null space: reachable outputs and hidden input changes

    Use rank, column space, and null space to understand a linear map. Explore rank-nullity, unreachable targets, and families of solutions with a small matrix experiment.

  22. Foundations / 10 min read

    Projections and least squares: find the closest fit

    Project a vector onto a direction, measure its orthogonal residual, and connect that geometry to least squares, regression, and nonunique coefficients.

  23. Foundations / 12 min read

    Singular value decomposition: directions, gains, and low-rank approximation

    Build an SVD from orthogonal directions and nonnegative gains. See a circle become an ellipse, identify lost directions, and measure the error from keeping one singular component.

  24. Foundations / 11 min read

    Pseudoinverse: choose the smallest least-squares solution

    Understand the Moore–Penrose pseudoinverse through exact and inconsistent systems. Separate residual error from solution norm, inspect projectors, and see how an SVD cutoff changes the problem.

  25. Foundations / 9 min read

    Coordinate frames: read the same point from a robot and the world

    Convert a fixed landmark between robot and world coordinates. Learn frame conventions, translation and rotation, inverse transforms, and point versus displacement.

  26. Foundations / 12 min read

    Rotation matrices: turn vectors, track frames, and check the order

    Build rotation matrices that preserve length and handedness. Compare fixed-axis rotations in 3D, distinguish rotating a vector from changing its coordinates, and undo a rotation with its transpose.

  27. Foundations / 12 min read

    Homogeneous transformations: map sensor coordinates into the world

    Combine rotation and translation in one matrix. Follow a sensor-to-robot-to-world frame chain, distinguish points from displacements, and calculate the inverse.

  28. Foundations / 10 min read

    Euler angles and gimbal lock: when different angles mean the same orientation

    Explore roll, pitch, and yaw with full rotation matrices. Compare equivalent orientations at ±90° pitch and separate Euler angle rates from angular velocity.

  29. Foundations / 12 min read

    Axis-angle rotation: build Rodrigues’ formula from three vector terms

    Rotate a vector around any nonzero axis. Normalize the direction, follow Rodrigues’ parallel and perpendicular terms, and understand the equivalent descriptions at zero and 180 degrees.

  30. Foundations / 12 min read

    Unit quaternions: compose rotations and understand the sign

    Rotate vectors with Hamilton quaternions, check composition order, and see why q and minus q describe the same orientation. Includes an interactive experiment and Python.

  31. Foundations / 10 min read

    Derivatives and the chain rule: predict a small change

    Understand derivatives as local rates, compare secant and tangent slopes, and multiply the correct factors through nested functions. Test a smooth curve and a corner with an interactive experiment.

  32. Foundations / 13 min read

    Partial derivatives and gradients: predict a multivariable change

    Hold one input fixed to find a partial derivative, combine the partials into a gradient, and compare a directional derivative with the actual change from a finite step.

  33. Foundations / 13 min read

    Jacobian matrices: from joint rates to robot tip velocity

    Read a Jacobian by its rows and columns, calculate a two-link arm's tip velocity, and compare a local prediction with a finite move. Includes singularities and the multivariate chain rule.

  34. Foundations / 11 min read

    Hessians: measure curvature in every direction

    Differentiate a gradient to build the Hessian, calculate directional curvature, and classify stationary points. Explore coupled quadratics, saddles, and the limits of zero eigenvalues.

  35. Foundations / 13 min read

    Taylor expansion and linearization: predict locally and check the error

    Build constant, linear, and quadratic approximations around a chosen center. Compare their errors, calculate a Taylor remainder bound, and connect the same idea to gradients, Hessians, and Jacobians.

  36. Foundations / 12 min read

    Ordinary differential equations: turn a rate law into a time course

    Solve a cooling initial-value problem, compare its exact solution with Euler steps, and separate model behavior from numerical accuracy and stability.

  37. Foundations / 12 min read

    Numerical integration: compare drift, phase, and step cost

    Advance an oscillator with forward Euler, velocity-first symplectic Euler, and classical RK4. Compare each method with the analytic solution and separate energy drift, phase error, step cost, and stability.

  38. Foundations / 12 min read

    ODE stability: equilibria, attraction, and basins

    Classify equilibria of a nonlinear rate law, use a phase line to find basins of attraction, and compare exact trajectories without confusing model stability with numerical stability.

  39. Foundations / 12 min read

    Manifolds and tangent spaces: move along a constraint

    Use the unit circle to understand local coordinates and tangent vectors. Compare straight steps, exact rotation, and normalization, then examine why averaging headings and rotations needs care.

  40. Foundations / 13 min read

    Geodesics: shortest arcs and longer routes on a circle

    Compare a shortest circle arc, a longer constant-speed geodesic, and a straight chord. Work through angle wrapping, antipodal ties, coincident endpoints, and the metric that defines distance.

  41. Foundations / 12 min read

    Lie groups and Lie algebras: connect robot poses to local motions

    Use planar robot poses to understand SE(2), its tangent space se(2), and the Lie bracket. Compare motion order, shrink a commutator loop, and reproduce the calculations in Python.

  42. Foundations / 13 min read

    Exponential and logarithm maps: turn a body twist into a pose

    Exponentiate a constant planar body twist, calculate its coupled translation, and recover a chosen logarithm. Explore straight-motion limits, half-turn branch choices, and information lost in a full turn.

  43. Foundations / 13 min read

    Twists and screw axes: connect point velocities to rigid motion

    Build a six-component twist from a screw axis, calculate point velocities, and compare exact helical motion with a tangent prediction. Separate pitch, accumulated displacement, current rate, and pure translation.

  44. Foundations / 12 min read

    Adjoint transformations: express a twist in another frame

    Transform angular-first twists between body and space frames. Derive the origin-shift term, distinguish linear twist coordinates from point velocity, and check a planar example with an interactive adjoint matrix.

  45. Foundations / 14 min read

    Product of exponentials: build a robot arm’s forward kinematics

    Build a two-joint arm's tool pose from fixed home screw axes and matrix exponentials. Check the result against geometry, inspect multiplication order, and connect space and body formulas.

  46. Foundations / 14 min read

    Wrenches: combine force, moment, and power across frames

    Calculate a force's moment about a chosen origin, include a free couple, and transform a moment-first wrench between frames. Use a worked planar load to check the inverse-transpose rule and power invariance.

  47. Foundations / 14 min read

    Space and body Jacobians: map joint rates to rigid motion

    Build space and body Jacobians from joint screw axes, recover the physical tool velocity, and compare their ranks with a position-only task. Explore a planar two-link arm and verify its derivatives in Python.

  48. Foundations / 14 min read

    Robot statics: turn tool loads into holding torques

    Use virtual work and a Jacobian transpose to calculate a robot arm's joint loads. Distinguish external and holding torque, check space and body frames, and interpret zero-torque loads.

  49. Foundations / 13 min read

    Kinematic singularities: find the tip velocities an arm can produce

    Use a two-link robot arm to distinguish exact rank loss from near-singular conditioning. Calculate the minimum-norm joint rates for a requested tip velocity and identify the component the arm cannot produce.

  50. Foundations / 11 min read

    Manipulability: read a robot’s velocity ellipse

    Map a joint-rate budget into a robot’s possible tool velocities. Read the ellipse’s singular values, compare area with conditioning, and understand singular poses, units, and the limits of force duality.

  51. Foundations / 14 min read

    Numerical inverse kinematics: solve a tool position with local steps

    Use a position Jacobian and damped least squares to refine a two-joint arm toward a target. Inspect accepted steps, compare starting guesses, and distinguish convergence, a stalled solve, and unreachable geometry.

  52. Foundations / 14 min read

    Differential inverse kinematics: turn a tip-velocity command into a joint step

    Calculate damped joint rates for a robot tip-velocity command, measure the resulting speed and direction error, and compare an instantaneous prediction with one finite joint step.

  53. Foundations / 12 min read

    Kinematic redundancy: use the motion a task leaves free

    Split a three-link arm’s joint rates into a primary solution and null-space motion. Check the exact projector, compare damping leakage, and measure why a finite step can move a tool with zero initial velocity.

  54. Foundations / 12 min read

    Joint limits in inverse kinematics: solve a bounded velocity step

    Turn physical joint ranges and speed limits into bounds on a local inverse-kinematics command. Compare a constrained least-squares solution with clipping, and check the resulting finite arm position.

  55. Foundations / 13 min read

    Analytical inverse kinematics: find both arm configurations for a target

    Derive both joint-angle solutions for a two-link robot arm, check them with forward kinematics, and identify unreachable targets and merged boundary branches.

  56. Foundations / 11 min read

    Robot workspaces: derive the reachable position set

    Derive the exact position workspace of a two-link robot with elbow limits. Test targets against its annulus, recover a valid arm configuration, and separate position reach from orientation and path feasibility.

  57. Foundations / 13 min read

    Trajectory time scaling: choose when a robot follows its path

    Separate a robot’s geometric path from its timing. Compare cubic and quintic profiles, derive joint speed and acceleration through the chain rule, and choose a duration that meets explicit limits.

  58. Foundations / 13 min read

    Configuration space: follow joint paths across angle boundaries

    Represent a robot arm as a point in joint space, follow paths across periodic angle boundaries, and distinguish angular distance from workspace motion and collision clearance.

  59. Foundations / 11 min read

    Collision checking: test the motion between endpoints

    Check a translating disk against a circular obstacle, including every point between its endpoints. Derive the closest-point test, expose missed samples, and distinguish broad-phase box overlap from a collision.

  60. Foundations / 12 min read

    Trapezoidal velocity profiles: accelerate, cruise, and stop

    Build a rest-to-rest motion for one linear joint. Derive triangular and trapezoidal velocity profiles, calculate braking distance, and inspect exact position, velocity and acceleration within explicit limits.

  61. Foundations / 11 min read

    Dijkstra’s algorithm: find the lowest-cost route

    Trace Dijkstra’s algorithm through a weighted grid, update route estimates, and see why the goal must leave the priority queue before its cost is final. Reproduce a complete search in Python.

  62. Foundations / 12 min read

    A* search: guide the search with a lower bound

    Use A* to find a low-cost route across a weighted grid. Calculate g, h, and f, compare Manhattan distance with Dijkstra, and see how an overestimate can return a worse path.

  63. Foundations / 12 min read

    Rapidly exploring random trees: grow a collision-free path

    Build an RRT for a disk robot, check every new branch for collision, and connect the tree to a goal. Explore seeded sampling, step length, narrow passages, and the limits of a finite search budget.

  64. Foundations / 13 min read

    Probabilistic roadmaps: reuse a graph for new routes

    Build a probabilistic roadmap from collision-free samples, attach new start and goal queries, and search the same graph for routes. Explore neighbor counts, missed connections, and what a finite roadmap can prove.

  65. Foundations / 12 min read

    RRT*: improve a path by rewiring the tree

    Follow RRT* as it chooses cheaper parents, rewires nearby nodes, and updates every descendant's cost. Compare the first path with later improvements and understand what asymptotic optimality does and does not promise.

  66. Foundations / 12 min read

    Path smoothing: shorten a route with checked shortcuts

    Shorten a robot path by removing unnecessary waypoints while checking every replacement segment for collision. Compare length and clearance, trace accepted and rejected shortcuts, and separate a simpler path from smooth robot motion.

  67. Foundations / 14 min read

    Differential-drive kinematics: from wheel rates to pose

    Convert left and right wheel rates into robot speed, turning rate, and an exact constant-rate pose update. Explore straight travel, arcs, spins, and reverse motion, then check the limits of wheel odometry.

  68. Foundations / 12 min read

    Nonholonomic constraints: move sideways without sliding

    Derive a wheeled robot’s no-sideways-slip constraint and trace a feasible maneuver that changes its lateral position. Separate instantaneous velocity limits from reachable poses, and see why the motion rules depend on the robot.

  69. Foundations / 13 min read

    Dubins paths: shortest routes with a turning limit

    Connect two robot poses with forward motion and a minimum turning radius. Compare all six Dubins path families, calculate arc lengths, and see why matching position alone misses the heading constraint.

  70. Foundations / 14 min read

    Ackermann steering: calculate wheel angles and turning radius

    Derive the inner and outer front-wheel angles for ideal Ackermann steering. Connect bicycle steering, wheelbase, and track width to turning radius, reverse motion, and the rear axle's path.

  71. Foundations / 12 min read

    Wheel odometry: turn encoder counts into a moving pose

    Convert wheel encoder increments into a differential-drive robot's position and heading. Replay measured counts, calculate exact arc updates, and see how calibration errors and wheel slip change the estimate.

  72. Foundations / 12 min read

    Reeds–Shepp paths: shortest car routes with reverse gear

    Add reverse travel to a car with a minimum turning radius. Read signed motion primitives, calculate a three-arc turnaround, and compare complete Reeds–Shepp solutions with forward-only Dubins paths.

  73. Foundations / 12 min read

    Omnidirectional drives: move sideways with three omniwheels

    Derive the wheel speeds for a three-wheel Kiwi drive. Command forward, sideways, and turning motion, preserve direction when motors saturate, and integrate the resulting world path.

  74. Foundations / 14 min read

    Instantaneous center of rotation: find the center from a planar velocity

    Calculate a planar rigid body's instantaneous center of rotation from its linear and angular velocity. Check point velocities, move the reporting reference, and distinguish turning, translation, and rest.

  75. Foundations / 12 min read

    Skid steering: why turning requires wheel slip

    Derive why four fixed wheels must scrub sideways during a turn. Compare a chosen effective-track model with differential-drive odometry, calculate contact slip speeds, and distinguish equivalent side rotation centers from the body's turning center.

  76. Foundations / 13 min read

    Robot dynamics: separate the torques that move an arm

    Explore robot dynamics through a two-link arm's torque budget. Separate inertia, velocity coupling, gravity, and friction, then check holding torque, link mass, and mechanical power.

  77. Foundations / 16 min read

    Inverse dynamics: calculate the torque a robot’s motion needs

    Calculate joint torque from a robot arm’s pose, velocity, and requested acceleration. Account for gravity, coupling, friction, and a known tip force, then see how actuator limits change the resulting acceleration.

  78. Foundations / 14 min read

    Forward dynamics: predict an arm’s motion from joint torques

    Solve a robot arm’s joint accelerations from torque, configuration, and velocity. Replay gravity release and compensation with RK4, then check energy balance and step-size error.

  79. Foundations / 14 min read

    Dynamic parameter identification: learn a joint model from motion

    Fit dynamic parameters from a rotating joint's motion and torque data. Recover inertia, gravity mass moment, and damping, then test excitation, noise, and held-out predictions.

  80. Foundations / 12 min read

    Friction models: torque during motion and at rest

    Compare Coulomb, viscous, and Stribeck friction in a robot joint. Calculate resisting torque and power loss during motion, check static holding at zero speed, and see where friction compensation needs a better model.

  81. Foundations / 15 min read

    Actuator dynamics: from motor voltage to joint torque

    Explore actuator dynamics with a DC motor’s current rise, back EMF, and geared load. Compare finite inductance with a reduced model, calculate reflected rotor inertia, and check torque, steady speed, and energy balance.

  82. Foundations / 14 min read

    Joint flexibility: model the twist between motor and load

    Explore joint flexibility with two rotary inertias joined by a spring and damper. Calculate transmitted torque, loaded deflection, elastic oscillation, and energy loss, then compare motor and load motion.

  83. Foundations / 13 min read

    Model uncertainty: bound a robot joint’s acceleration

    Turn uncertain inertia, damping, and disturbance torque into an acceleration range. Compare a nominal command with an actual model, handle negative acceleration correctly, and understand the assumptions behind a worst-case bound.

  84. Foundations / 14 min read

    Feedback control: measure speed and correct the error

    Explore feedback control with a robot joint speed model. Compare proportional correction with feedforward alone, calculate steady error, and test disturbances, sensor bias, and torque limits.

  85. Foundations / 14 min read

    Open-loop and closed-loop control: compare plans with position feedback

    Explore open-loop and closed-loop control by moving an axis along a planned path. Calculate how gain errors, drift, initial position, and sensor bias change tracking, then connect or disconnect the feedback path.

  86. Foundations / 14 min read

    Transfer functions: predict joint speed from torque

    Derive a robot joint transfer function with the Laplace transform. Separate zero-state and natural responses, calculate a pole and time constant, and compare torque steps with pulses.

  87. Foundations / 15 min read

    Block diagrams: trace signals and derive the feedback loop

    Read control block diagrams by naming signals and checking each junction. Combine series and parallel paths, derive feedback transfer functions, and compare reference, disturbance, and sensor-error responses.

  88. Foundations / 13 min read

    Poles and zeros: connect root locations to a step response

    Explore poles and zeros by changing one numerator zero in a stable second-order system. Calculate inverse response, compare real and complex poles, and distinguish canceled factors from hidden internal modes.

  89. Foundations / 12 min read

    Stability criteria: find the feedback gain limit

    Connect the Routh-Hurwitz criterion, Nyquist stability test, and gain and phase margins. Find when a three-lag feedback system settles, sustains oscillation, or becomes unstable.

  90. Foundations / 12 min read

    Step response characteristics: measure rise, overshoot, and settling

    Read step response characteristics from an exact second-order model. Compare rise time, overshoot, settling time, and steady error without mistaking the end of a plot for the final value.

  91. Foundations / 13 min read

    PID control: build a command from error and measured motion

    Build a PID controller from proportional, integral, and derivative terms. Compare tracking and load rejection, calculate each command contribution, and check the stability limit of integral gain.

  92. Foundations / 13 min read

    PID tuning: calculate gains, then test the response

    Tune a PID controller against explicit response and effort targets. Convert Ziegler–Nichols settings into parallel gains, understand relay auto-tuning, and compare manual adjustments.

  93. Foundations / 11 min read

    Integral windup: what happens when the actuator runs out of effort

    Explore integral windup in a sampled PI controller. Compare requested effort, actuator limits, and integral memory as an impossible reference returns to a feasible value.

  94. Foundations / 11 min read

    Derivative kick and filtering: choose what D responds to

    Explain derivative kick and filtering with a target step and measured noise. Compare derivative on error with derivative on measurement, calculate filtered command peaks, and weigh noise gain against lag.

  95. Foundations / 12 min read

    Feedforward control: predict torque, then correct error

    Calculate model-based torque from a smooth speed reference, then add feedback correction. Compare feedforward, proportional feedback, and their combination under inertia error, drag error, and unknown external torque.

  96. Foundations / 12 min read

    Cascade control: let position request velocity and velocity request torque

    Build cascade control from nested position and velocity loops. Follow command units, compare finite inner dynamics with ideal velocity tracking, and calculate the effect of an opposing load.

  97. Foundations / 12 min read

    Bode plots and loop shaping: place gain and phase together

    Read Bode plots and shape a position-control loop with a lead controller. Calculate crossover and phase margin, compare closed-loop tracking, and check what the model leaves out.

  98. Foundations / 12 min read

    Control bandwidth: tracking speed and physical limits

    Calculate closed-loop bandwidth relative to DC gain, then compare sinusoidal tracking with the torque it requires. Separate bandwidth from loop crossover and account for resonance, delay, sampling, and noise.

  99. Foundations / 11 min read

    Controller discretization: sample, compute, and hold

    Explore controller discretization with exact held-input dynamics. Compare immediate and delayed commands, calculate discrete poles, and connect sample timing to control stability.