Peg-in-hole is the benchmark robotic insertion task in which a manipulator must guide a cylindrical or prismatic part into a mating hole whose clearance is smaller than the robot’s positioning error. In robotics and especially in manipulation research, peg-in-hole insertion stands for a whole family of assembly operations, from pressing bearings and dowel pins to plugging connectors and fitting shafts into housings.
The task is difficult not because of its geometry but because of contact uncertainty. A typical industrial arm repeats positions to within 0.02-0.1 mm, while a precision fit may allow only 0.005-0.05 mm of radial clearance, so the part almost never meets the hole perfectly. Success depends on compliance, force sensing and a search strategy that turns contact forces into corrective motion.
How peg-in-hole insertion works
Peg-in-hole insertion proceeds through a sequence of contact phases, each with its own failure modes. The robot first moves the peg near the hole in free space, then establishes contact, finds the hole, aligns the axes and finally pushes the peg to its target depth while the contact state changes several times.
Classical analysis models the peg as a rigid body touching the hole at one or two points. During one-point contact, the peg rim touches the chamfer or the hole edge; during two-point contact, the peg touches opposite walls and can wedge or jam if the applied force points in the wrong direction. The geometry of the chamfer, the friction coefficient and the clearance ratio determine how much angular error the system can tolerate.
The following table summarizes the phases that a controller must handle in order.
| Phase | Goal | Typical sensing signal |
|---|---|---|
| Approach | Move the peg above the hole quickly | Joint positions only |
| Contact | Touch the surface with a bounded force | Rising axial force, about 5-20 N |
| Search | Locate the hole opening | Sudden drop in axial force |
| Alignment | Reduce tilt between peg and hole axes | Lateral forces and moments |
| Insertion | Reach the target depth | Steady friction force and depth |
Clearance, chamfers and the jamming condition
The clearance ratio, defined as the diametral clearance divided by the hole diameter, is the single most important parameter of a peg-in-hole problem. Fits with ratios above roughly 0.01 can often be done by position control alone, while ratios below about 0.001 demand active force feedback or passive compliance.
Jamming occurs when the forces applied to the peg are in the wrong proportion, so the peg stops moving even though the robot keeps pushing. Wedging is worse: the peg locks geometrically between two walls early in the insertion and can only be freed by backing out. The classical jamming diagram shows which ratios of lateral force, moment and axial force allow the peg to slide, and it explains why the point where the compliance acts matters so much.
The table below relates the main design parameters to their effect on insertion difficulty.
| Parameter | Typical range | Effect on the task |
|---|---|---|
| Radial clearance | 0.005-0.5 mm | Smaller clearance raises jamming risk |
| Chamfer size | 0.2-2 mm at 30-45 degrees | Larger chamfer widens the capture region |
| Friction coefficient | 0.1-0.4 for dry metals | Higher friction narrows the stable force cone |
| Initial tilt error | 0.1-2 degrees | Larger tilt causes earlier two-point contact |
| Insertion depth | 1-5 peg diameters | Deeper insertion accumulates friction |
Compliance and control strategies
Every successful peg-in-hole system introduces compliance somewhere between the robot and the part, either passively in hardware or actively in software. Compliance lets the peg yield to contact forces instead of fighting them, which converts small misalignments into self-correcting motion.
The remote center compliance device is the classical passive solution: an elastic wrist whose center of compliance lies near the peg tip, so lateral forces translate the peg and moments rotate it about the right point. Active approaches use impedance control or admittance control, which make the end effector behave like a programmable spring-damper, and hybrid force-position control, which regulates force along the insertion axis while controlling position in other directions.
Each family of strategies trades cost, speed and flexibility differently.
| Strategy | Strength | Limitation |
|---|---|---|
| Remote center compliance | Fast, no sensors, very reliable | Tuned to one peg length and geometry |
| Impedance control | Programmable stiffness per axis | Needs a torque-controlled or sensed arm |
| Hybrid force-position control | Precise force regulation on the axis | Sensitive to contact model errors |
| Spiral or raster search | Finds holes despite position error | Adds cycle time of seconds |
| Learned policies | Adapt to varied parts and tolerances | Require training data and validation |
A common practical recipe combines a spiral search in the surface plane, a constant downward force of 10-30 N and a compliant wrist. When the axial force suddenly drops, the controller infers that the peg tip has entered the hole and switches to alignment and insertion.
Peg-in-hole in relation to neighboring manipulation tasks
Peg-in-hole is a contact-rich assembly problem, which separates it from tasks dominated by free-space motion. It shares hardware with pick and place and depends on grasp planning, yet the critical decisions happen only after contact begins.
The comparison below places it among related concepts from the same field.
| Task | Dominant challenge | Main tool |
|---|---|---|
| Peg-in-hole | Small clearance under uncertainty | Compliance and force feedback |
| Pick and place | Reliable grasping and transport | Grasp planning and trajectories |
| Bin picking | Perception in clutter | Pose estimation and grasp scoring |
| In-hand manipulation | Reorienting objects in the fingers | Dexterous hands and tactile sensing |
| Motion planning | Collision-free paths | Sampling or optimization planners |
Because the task is simple to set up yet hard to master, it serves as a standard benchmark for reinforcement learning, tactile sensing and sim-to-real research, with variants such as square pegs, multi-pin connectors and gear meshing.
Common failure modes and how to avoid them
Most failed insertions trace back to excessive stiffness, poor force limits or a wrong assumption about where the hole is. Practitioners use the following checks when commissioning a cell.
- Overly stiff control turns micrometer errors into large forces, damaging parts or triggering protective stops.
- Missing force limits let the robot push through a jam instead of retracting and retrying.
- Ignoring fixture tolerance shifts the true hole position beyond the search radius.
- Wrong compliance center amplifies tilt instead of correcting it, which leads directly to wedging.
- Uncalibrated force sensors drift with temperature and cable load, producing false contact detection.
A robust cell therefore logs force profiles per insertion. A stable profile indicates healthy parts and fixtures, while a growing peak force is an early warning of burrs, worn chamfers or a drifting fixture.
Put simply
Peg-in-hole is the robot version of putting a key into a lock in the dark. A person does not hit the keyhole perfectly at first; they feel the metal, slide the key around until it drops into the opening, then wiggle it straight and push.
A robot faces the same problem because its hand is never exactly where the hole is. The fix is to make the robot feel and give a little instead of pushing rigidly, so that small mistakes correct themselves. Sensing touch matters more than perfect aim.
In practice
An automotive supplier assembles electric power steering units and needs a robot to press a steel shaft of 12 mm diameter into a bearing seat with about 0.02 mm of radial clearance. The six-axis arm repeats its position to only 0.05 mm, and the fixture adds further variation, so pure position control jams in roughly one cycle out of ten.
The integrator mounts a six-axis force-torque sensor at the wrist, adds a 0.5 mm chamfer to the bearing seat and programs an impedance controller with low lateral stiffness. The robot touches down with 15 N, runs a small spiral search of up to 1 mm radius and detects the hole when axial force drops. It then aligns the shaft using the measured moments and presses to depth with a 150 N force limit.
After commissioning, the cell reaches a first-time success rate above 99.5 percent with a cycle time of about 4 seconds. Logged force curves also reveal when a batch of bearings arrives with burrs, allowing quality staff to stop the batch before parts are damaged.