Diagnosing large arm swings caused by IK solution flips
Two nearby Cartesian poses can map to different elbow configurations, causing the arm to swing across a tight cell instead of making a short move.
How to test it
Log start and goal joint vectors and inspect the largest single-axis jump. Test Cartesian path interpolation or joint-jump constraints in the workcell before running live.

ZHILIANHAI