Open-Source Robotics Tooling
FANUC AI TP Workflow: a safety-gated toolchain for generating and deploying robot programs.
A public, MIT-licensed toolchain that plans, generates, validates, and safely deploys AI-assisted FANUC TP programs — built around deterministic code generation, schema-based validation, human approval gates, and a Rust implementation of the FANUC SNPX/SRTP controller protocol.
Problem
Hand-writing and deploying FANUC TP programs is slow, error-prone, and hard to review. Generating them with AI raises the stakes: one wrong register write, IO action, or motion instruction reaches a machine that will execute it. The goal was a workflow that keeps the speed of generation without giving up the verifiability and safety discipline a real cell demands.
Architecture
- Plan/spec first: programs are described as validated JSON specs against project-owned schemas before any code exists.
- Deterministic
.LSgeneration from reviewed motion and program templates — no free-form robot code. - Layered validation: JSON-schema checks, LS safety scanning, and a reviewed cell resource map for every register, IO point, and CALL target.
- MakeTP / PrintTP round-trip gate compares normalized instructions to prove the compiled
.TPmatches intent. - A Rust SNPX/SRTP V2 codec (built with AI assistance) handles controller reads/writes, verified with property tests, golden wire vectors, and fuzz-corpus replay.
- Optional RoboGuide and PCDK read-only evidence packets, plus FTP upload/readback reconciliation.
Safety Model
- No auto-run: uploads never execute programs, and physical run decisions stay operator-owned.
- The build blocks risky patterns — system variable writes, DCS/UOP references,
RUN, andABORT. - Live writes require an approved plan, an exact approval phrase, and an explicit accept-live-write switch.
- Robot IPs, credentials, packet captures, and run evidence are kept out of version control by design.
Contribution
Creator and domain lead. The project covers ~60 PowerShell workflow tools, the Rust protocol codec, the JSON schemas, the safety and validation gates, the CI pipeline, and 40+ pages of workflow and safety documentation. I built it through AI-assisted development directed by hands-on FANUC experience: the judgment about what is risky on a live controller, what has to be validated, how the protocol behaves, and where a human must stay in the loop is mine. AI wrote a great deal of the implementation under that direction.
Where the difficulty actually was
Generating robot code turned out to be the easy half. The guardrails took the real work: separating planning, deterministic generation, validation, and human-approved deployment into stages that cannot be collapsed, so speed never routes around review and failure modes stay legible to whoever has to maintain the cell.
Public Repository
The full project is public and NDA-safe by design — it ships sanitized sample configs and starter specs, never real customer cells. Read the code, the schemas, the safety policy, and the CI: