Project

rapid-lint

Catch offline-programming geometry bugs at the desk, before the robot moves.

A geometric linter for offline-generated ABB RAPID. It parses a generated program, reconstructs every TCP path in the work-object frame, and statically asserts geometric invariants, catching frame-sign, orientation, and axis-mapping defects on the desk before any robot time is spent. A built, pre-release tool with 66 green tests.

Status: built and working, pre-release. The command-line tool and drag-and-drop window both run, and the test suite is green (66 tests). It is not yet published to a package index.

Why it exists

An SVG-to-RAPID generator I built (RobotDraw) once produced a program that passed every offline check, loaded cleanly into RobotStudio, and then, on a physical IRB 1100, pressed the marker about 30 mm into the table. The root cause was a frame mix-up: a lift-direction sign computed in the drawing-plane-normal frame was applied to RAPID Offs() heights, which offset along the work-object Z axis, a different frame. Two sibling bugs shipped the same season: a surface quaternion emitted verbatim as the tool orientation, and a convention that silently rotated portrait drawings by 90 degrees.

None of these are syntax errors. All are geometric invariant violations that are trivially checkable from the program text, and every one was found the expensive way, on hardware. rapid-lint is the tool that would have caught all three before the robot moved.

What it does

rapid-lint tolerantly parses the RAPID subset that offline path generators emit, reconstructs the TCP path, and checks it against a series of geometric invariants. It runs as a command-line tool for CI and pre-flight scripts, and as a local drag-and-drop window for humans. It is not a simulator and does no joint-space or inverse-kinematics analysis; it is the fast geometric check that runs where RobotStudio is not.

A sample of the geometric rules

  • Every lift or traverse offset must be strictly positive in the work-object frame (the exact frame mix-up from the June bug).
  • Pen-down TCP height must stay at or above the work plane (the lift-sign bug in depth form).
  • Quaternions must be normalized and orientation constant per stroke, with no roughly 180-degree pen-up flips (the orientation bug).
  • The drawing bounding-box aspect must match the source SVG (the portrait axis-swap bug).
  • All targets must lie inside the robot's reach sphere, caught early instead of as a controller fault.

How it is tested

The test suite is anchored on a golden corpus. Real hardware-validated RobotDraw output must lint clean with zero findings, which guards against false positives, while known-bad programs regenerated from the real historical bugs must each be caught by the correct rule. The full suite is 66 tests, all green.

Stack

  • Language: Python, core with zero runtime dependencies.
  • Interfaces: a CLI with JSON output and CI-friendly exit codes, plus a standard-library local UI window.
  • Domain: ABB RAPID parsing, TCP path reconstruction, quaternion and frame math, static analysis.