Paper #65
Retrieval-grounded robot program generation and simulation-based correction via Model Context Protocol
Presenting author: Siyuan Chen
Session: I03
Abstract
Flexible manufacturing requires industrial robots to be reprogrammed rapidly as product variants change. However, existing natural-language robot programming workflows often stop at text-level generation or retrieval grounding, leaving execution-level failures in vendor-specific simulation environments insufficiently addressed. This paper presents a language-model-based workflow that generates, validates, and iteratively corrects ABB RAPID robot programs from natural language task descriptions. A dual-stream retrieval-augmented generation (RAG) pipeline grounds code generation in verified technical documentation and production templates, substantially reducing domain-specific errors produced by ungrounded language models. A custom Model Context Protocol (MCP) server connects the language-model client directly to ABB RobotStudio for automated code upload, simulation execution, and diagnostic feedback. The evaluation combines a 30-query retrieval benchmark, scoped code-generation checks, and RobotStudio case studies in a simulated pick-and-place manufacturing cell. The simulation loop exposes execution failures that static and semantic checks alone cannot catch, including suction release-height errors, unreachable placement targets, and configuration-dependent recovery motions. The results show how RAG and MCP can connect grounded code generation with executable feedback from industrial robot simulation software, reducing domain-specific errors and iteration effort while retaining expert setup and final supervision as necessary boundaries.