Hi everyone,
I wanted to share an open-source project I’ve been working on to experiment with agentic workflows in ROS 2: a custom 2-axis CNC plotter controlled via natural language using an LLM Agent.
The Goal: I wanted to move away from strict pre-programming and explore how an LLM agent could utilize registered ROS tools (in this case, CNC axis control) to fulfill abstract requests.
System Architecture:
-
Hardware: 2-axis mechanism using stepper motors salvaged from CD-ROM drives.
-
Compute: Raspberry Pi (ROS 2 Jazzy) + Arduino (GRBL firmware).
-
Digital Twin: A real-time RViz visualization that mirrors the machine’s state.
How it works:
-
Agent Node: A custom
llm_commandernode (built with the OpenAI Agents SDK) accepts natural language (e.g., “draw a square”). -
Tool Use: The agent parses the intent and uses a registered
draw_shapetool to generate path coordinates. -
Execution: Coordinates are sent to a
grbl_drivernode, which drives the physical motors while simultaneously publishing joint states to update the URDF model in RViz.
Tech Stack:
-
ROS 2 Jazzy
-
Python
-
GRBL
-
OpenAI Agents SDK
Repository:
https://github.com/yacin-hamdi/ros-pi-cnc
Connect: https://www.linkedin.com/in/yacin-hamdi-53825721b/
I’m particularly interested in feedback on the bridge between the Agent SDK and the ROS 2 action/service layer. If you have any thoughts or suggestions on the approach, I’d love to hear them!
