Automating Flexible Manufacturing: A Generative AI Approach for Code Generation and Validation for Robotics

dc.contributor.authorZhichao, Zhou
dc.contributor.departmentChalmers tekniska högskola / Institutionen för industri- och materialvetenskapsv
dc.contributor.departmentChalmers University of Technology / Department of Industrial and Materials Scienceen
dc.contributor.examinerStahre, Johan
dc.date.accessioned2026-06-29T07:41:01Z
dc.date.issued2026
dc.date.submitted
dc.description.abstractFlexible manufacturing demands that industrial robots be reprogrammed whenever product variants change. Writing executable code in specific robot languages is unreliable, and verifying such code against physical constraints still depends on slow manual simulation by domain experts. Automating both steps is therefore a prerequisite for wider robotic deployment. This thesis presents an agentic system that generates, validates, and iteratively corrects ABB RAPID code from natural language task descriptions. A dual stream Retrieval Augmented Generation (RAG) pipeline, combined with Hypothetical Document Embeddings (HyDE), grounds generation in verified technical documentation and production code templates. This grounding removes most of the domain specific hallucinations observed in ungrounded large language models. Four cooperating roles run the workflow and catch semantic defects that rule based static analysis often misses. At the heart of the system sits a custom Model Context Protocol (MCP) server that plugs the AI agent directly into ABB RobotStudio. Code uploads, simulation runs, and diagnostic feedback all flow through this channel, with no manual step in between. Inside the loop the agent catches physical constraint violations—wrist singularities, joint limit exceedances, arc geometry errors, suction release failures—that would pass through both static checks and semantic review. Over seven experiments of rising complexity, the simulation feedback loop cut correction rounds from six on the first task to first-attempt success by the fifth, since fixes learned earlier carried over to new tasks. Across three compared configurations, retrieval grounding alone lifts the content pass rate from 20% to near-complete; adding the MCP simulation loop on top catches a further family of physically grounded errors that would otherwise go unnoticed before deployment. Such a pipeline suits industrial settings that call for quick reconfiguration and little expert time in the loop.
dc.identifier.coursecodeIMSX30
dc.identifier.urihttps://hdl.handle.net/20.500.12380/311589
dc.language.isoeng
dc.setspec.uppsokTechnology
dc.subjectRetrieval Augmented Generation
dc.subjectAgentic AI
dc.subjectRAPID
dc.subjectRobotics
dc.subjectModel Context Protocol
dc.subjectCode Generation
dc.subjectFlexible Manufacturing
dc.titleAutomating Flexible Manufacturing: A Generative AI Approach for Code Generation and Validation for Robotics
dc.type.degreeExamensarbete för masterexamensv
dc.type.degreeMaster's Thesisen
dc.type.uppsokH
local.programmeData science and AI (MPDSC), MSc

Ladda ner

Original bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
Master Thesis Zhichao Zhou.pdf
Size:
8.83 MB
Format:
Adobe Portable Document Format

License bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
license.txt
Size:
2.35 KB
Format:
Item-specific license agreed upon to submission
Description: