A gantry crane whose load hangs on a physics joint, so it behaves as a pendulum. We built it to fault trainees whose load swung too much, then measured what swing actually looks like. The swing during a traverse is the same every time. What is left at the end depends entirely on when you stop.
How we built it
The load is a dynamic body on a spherical joint beneath a kinematic trolley, solved by Rapier. Swing is not authored: it emerges from how the trolley is driven, which is the only way the exercise can teach anticipation.
In the full WebXR version the four signals — index up to hoist, index down to lower, index out to travel, flat palm to stop — are rules over hand-joint positions rather than a trained model, so each can be read and explained. This page drives the same rig with buttons and keys instead.
We assumed bad driving meant a load swinging wide, and set the fault at 18°. Nothing reached it. We recalibrated to 10° from readings taken as the crane changed phase, which looked like measurements but were not peaks. Then we quoted a residual figure that was worse still: the angle at the single frame a run ended, which samples a pendulum at whatever phase it happens to be in.
Residual swing is now the maximum angle over a full period after the signal stops. The difference is not academic. Ending a traverse at 1.10 s reads 0.19° at that instant, because the load is passing through vertical, while the swing it is actually carrying is 18.25°.
Sweeping traverse length from 0.8 s to 3.0 s, the peak swing during the move is 9.76° every single time: it is set by the acceleration at the start, not by the journey. What changes is what is left. Stopping after one full pendulum period leaves 1.0°; stopping half a period out leaves 18.25°. The rope sets the period — 2 pi root L over g is 2.10 s for our 1.1 m rope — and the whole skill is arriving on it. That is anticipation, and it is measurable.
Limits