End-effector camera (top-down) Hole (true position) Peg / desired centre

Visual Servoing & Precision Assembly (2D)

This 2D companion visualizes image-based visual servoing (IBVS) on an eye-in-hand robot end-effector performing a peg-in-hole insertion, viewed top-down on a canvas instead of a full 3D scene. Rather than driving to a pre-programmed coordinate, the controller continuously compares the current image positions of the hole's corner features against their desired positions and turns that pixel-space error into a velocity command — closing the loop on vision itself. Shift the part's true position with the calibration-error slider and watch the same feedback loop find and insert the peg anyway, then read the feature-error curve as it collapses toward zero with each control iteration.