An LLM-powered robotics development copilot for ROS2 and embodied AI workflows.
Think Cursor + LeRobot + OpenDevin β purpose-built for robotics engineers.
Quickstart β’ Features β’ Architecture β’ API β’ Docs β’ Roadmap β’ Contributing
The screenshot above shows the main workspace: sidebar for generator selection, file tree for artifacts, and streaming chat with Monaco code preview.
RoboCopilot-X is an open-source AI copilot built specifically for the messy, multi-stack reality of modern robotics development. It turns natural language into production-ready ROS2 nodes, MoveIt2 motion plans, Nav2 behavior trees, URDF descriptions, and Isaac Sim scene templates β while keeping the engineer firmly in the loop.
Unlike generic code assistants, RoboCopilot-X understands:
- ROS2 node lifecycles, QoS, executors, and message topology
- MoveIt2 planning groups, end-effectors, and pipeline configurations
- Nav2 behavior trees, costmaps, and recovery behaviors
- URDF/Xacro semantics, joint limits, inertials, and collision geometry
- Isaac Sim USD prim hierarchies, articulations, and sensor scaffolding
- Embodied AI pipelines (VLA models, teleop data, policy rollouts)
It is designed to feel like a true engineering partner β not a chatbot wrapper.
| # | Feature | Description | Status |
|---|---|---|---|
| 1 | π§© ROS2 Node Generator | Generate complete ament_python packages: node.py, setup.py, package.xml, launch.py |
β Stable |
| 2 | π Launch File Composer | Compose multi-node ROS2 launch files with parameter overrides & namespacing | β Stable |
| 3 | π¦Ύ MoveIt2 Task Generator | Scaffold pick-and-place, Cartesian path, and constraint-based planning tasks | β Stable |
| 4 | 𦴠URDF Assistant | Translate natural language into URDF/Xacro snippets (links, joints, inertials) | β Stable |
| 5 | π Isaac Sim Scaffold | Generate Isaac Sim Python scene templates with articulations & sensors | β Stable |
| 6 | π§ Nav2 Behavior Tree Generator | Compose Nav2 BTs with patrol, dock, recovery branches | β Stable |
| 7 | π Codebase Explainer | Upload ROS2 workspaces and get architecture-level explanations | β Stable |
| 8 | π¬ Streaming Chat Workspace | Cursor-style multi-panel workspace with Monaco editor, file tree, streaming LLM output | β Stable |
| 9 | π§ Agent Tooling | LangGraph-based planner/executor with tool calling for codegen, validation, lint | β Stable |
| 10 | π OpenAI-compatible Backend | Works with OpenAI, Azure, Ollama, vLLM, Together, DeepSeek, Qwen | β Stable |
| 11 | π§ͺ Sim-in-the-loop validation | Optional Gazebo/Isaac smoke tests for generated nodes | π§ Beta |
| 12 | π¦ VLA Policy Toolkit | Adapters for OpenVLA / LeRobot policy rollouts | π Planned |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RoboCopilot-X Architecture β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β Next.js Frontend β HTTP β FastAPI Backend β
β (Monaco / shadcn) β ββββββΊ β /api/v1/{chat,gen,...} β
β - Workspace UI β SSE β - Auth & rate limiting β
β - File tree, chat β β - Streaming responses β
ββββββββββββ¬βββββββββββββ ββββββββββββββ¬ββββββββββββββ
β β
β βΌ
β ββββββββββββββββββββββββββ
β β Agent Orchestrator β
β β (LangGraph + Tools) β
β β Planner β Executor β β
β β Critic β Validator β
β ββββββββββββββ¬ββββββββββββ
β β
β ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β βΌ βΌ βΌ
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
β β ROS2 Generator β β MoveIt2/Nav2 β β Isaac Sim β
β β (jinja2) β β Generator β β Generator β
β βββββββββ¬βββββββββ ββββββββββ¬ββββββββ ββββββββββ¬ββββββββ
β βΌ βΌ βΌ
β ros_templates/ ros_templates/ isaac_templates/
β
βΌ
Workspace Artifacts (downloadable zip / mounted /workspace)
See docs/architecture.md for a deeper dive.
| Layer | Technology | Notes |
|---|---|---|
| Backend | FastAPI + Uvicorn | Async API server with SSE streaming |
| LLM Client | httpx + tenacity | OpenAI-compatible, retry on 429/5xx |
| Agent Loop | LangGraph | planner β executor β critic β validator loop |
| Codegen | Jinja2 | Two-phase: LLM extracts spec β templates render artifacts |
| Frontend | Next.js 14 + shadcn/ui | Dark-first workspace with Monaco editor |
| Editor | Monaco | In-browser code preview with syntax highlighting |
| Streaming | SSE (sse-starlette) | Chat + generation results streamed to client |
| Serialization | Pydantic v2 | Strict schemas (extra="forbid"), no hallucinated keys |
| Templates | ros_templates/ + isaac_templates/ | ROS2, MoveIt2, Nav2, URDF, Isaac Sim |
| Validation | ruff + black + mypy --strict | Backend linting; ESLint + Prettier on frontend |
| Container | Docker Compose | Backend + frontend, shared workspace volume |
robocopilot-x/
βββ agents/ # LangGraph agent loop (planner/executor/critic/validator)
β βββ graph.py # Graph wiring & routing logic
β βββ nodes.py # Node implementations (planner, executor, critic, validator)
β βββ state.py # AgentState TypedDict
β βββ tools/ # Agent tool registry & implementations
β βββ codegen_tools.py # Generator-backed tools (ros2_node, moveit2, etc.)
β βββ lint.py # ROS2 Python lint stub
β βββ workspace.py # Workspace file persistence
β βββ base.py # AgentTool / ToolResult dataclasses
βββ backend/ # FastAPI backend
β βββ robocopilot/
β βββ main.py # App factory, middleware, lifespan
β βββ config.py # Pydantic Settings (env vars)
β βββ schemas.py # API request/response schemas
β βββ llm/client.py # OpenAI-compatible LLM client (httpx + tenacity)
β βββ api/ # Route modules (chat, generate, explain, workspace, health)
β βββ generators/ # Two-phase generators (LLM β Jinja2)
β βββ base.py # RoboticsGenerator ABC
β βββ ros2_node.py # ROS2 ament_python package generator
β βββ moveit2.py # MoveIt2 pick-and-place generator
β βββ nav2.py # Nav2 behavior tree generator
β βββ urdf.py # URDF/Xacro generator
β βββ isaac_sim.py # Isaac Sim scene generator
βββ frontend/ # Next.js 14 workspace UI
β βββ app/ # Pages & layouts
β βββ components/ # chat-panel, file-tree, code-preview, sidebar
β βββ lib/ # API client, utilities
βββ prompts/ # System prompts for each generator
β βββ ros2_node.system.md
β βββ moveit2_task.system.md
β βββ nav2_bt.system.md
β βββ urdf.system.md
β βββ isaac_scene.system.md
β βββ chat.system.md
β βββ explain.system.md
βββ ros_templates/ # Jinja2 templates (ROS2/MoveIt2/Nav2/URDF)
β βββ ros2_node/ # node.py, setup.py, package.xml, launch.py, etc.
β βββ moveit2_task/ # moveit_task.py, pose_targets.yaml, launch.py
β βββ nav2_bt/ # bt.xml, nav2_params.yaml, launch.py
β βββ urdf/ # robot.urdf.xacro
βββ isaac_templates/ # Jinja2 templates (Isaac Sim)
β βββ scene/ # scene.py, run.sh
βββ examples/ # Pre-built output examples for each generator
βββ docs/ # Architecture, getting started, agents reference
βββ docker/ # Dockerfiles for backend & frontend
βββ scripts/ # dev_setup.sh, benchmark.py, release.sh
βββ .env.example # All configurable environment variables
βββ Makefile # Common dev commands (setup, dev, lint, test, up)
βββ docker-compose.yml # Full stack with health checks
git clone https://github.com/robocopilot/robocopilot-x.git
cd robocopilot-x
cp .env.example .env # add your OPENAI_API_KEY (or compatible)
docker compose up --buildThen open:
- Frontend: http://localhost:3000
- API docs: http://localhost:8000/docs
# Backend
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
uvicorn robocopilot.main:app --reload --port 8000
# Frontend (new terminal)
cd frontend
pnpm install
pnpm devcurl -N -X POST http://localhost:8000/api/v1/generate/ros2_node \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a ROS2 subscriber for sensor_msgs/LaserScan that logs the closest range"}'All configuration is via environment variables. Copy .env.example to .env and adjust.
| Variable | Default | Description |
|---|---|---|
LLM_PROVIDER |
openai |
Provider: openai, azure, ollama, vllm, together, deepseek, qwen |
LLM_MODEL |
gpt-4o-mini |
Model name (e.g. gpt-4o, qwen2.5-coder:7b) |
LLM_API_BASE |
https://api.openai.com/v1 |
OpenAI-compatible base URL |
LLM_API_KEY |
(required) | API key (any non-empty placeholder for Ollama) |
LLM_TEMPERATURE |
0.2 |
Sampling temperature |
LLM_MAX_TOKENS |
4096 |
Max tokens per completion |
LLM_TIMEOUT_S |
120 |
HTTP timeout in seconds |
ollama pull qwen2.5-coder:7b
# .env:
LLM_PROVIDER=ollama
LLM_API_BASE=http://localhost:11434/v1
LLM_API_KEY=ollama
LLM_MODEL=qwen2.5-coder:7b| Variable | Default | Description |
|---|---|---|
ROBOCOPILOT_HOST |
0.0.0.0 |
Bind host |
ROBOCOPILOT_PORT |
8000 |
Bind port |
ROBOCOPILOT_LOG_LEVEL |
INFO |
Log level |
ROBOCOPILOT_CORS_ORIGINS |
http://localhost:3000 |
CORS allowed origins (comma-separated) |
| Variable | Default | Description |
|---|---|---|
ROBOCOPILOT_WORKSPACE_DIR |
/workspace |
Artifact output directory |
ROBOCOPILOT_MAX_WORKSPACE_MB |
512 |
Max workspace size in MB |
| Variable | Default | Description |
|---|---|---|
ROBOCOPILOT_AGENT_MAX_STEPS |
18 |
Max plannerβcritic loop iterations |
ROBOCOPILOT_AGENT_ENABLE_CRITIC |
true |
Enable critic node in agent loop |
ROBOCOPILOT_AGENT_ENABLE_LINT |
true |
Enable lint tool after generation |
| Variable | Default | Description |
|---|---|---|
NEXT_PUBLIC_API_BASE |
http://localhost:8000 |
Backend URL for the frontend |
NEXT_PUBLIC_APP_NAME |
RoboCopilot-X |
Application display name |
NEXT_PUBLIC_DEFAULT_THEME |
dark |
Default UI theme |
All endpoints are under /api/v1. Full interactive docs at http://localhost:8000/docs (Swagger) or /redoc.
| Method | Endpoint | Description |
|---|---|---|
POST |
/chat |
Streaming chat with agent loop (SSE) |
| Method | Endpoint | Description |
|---|---|---|
POST |
/generate/ros2_node |
Generate ROS2 ament_python package |
POST |
/generate/moveit2 |
Generate MoveIt2 pick-and-place task |
POST |
/generate/nav2_bt |
Generate Nav2 behavior tree |
POST |
/generate/urdf |
Generate URDF/Xacro file |
POST |
/generate/isaac_scene |
Generate Isaac Sim scene script |
GET |
/generate/_registry |
List available generators |
| Method | Endpoint | Description |
|---|---|---|
POST |
/workspace/write |
Write artifacts to workspace directory |
GET |
/workspace/zip |
Download workspace as zip |
GET |
/workspace/tree |
List workspace file tree |
| Method | Endpoint | Description |
|---|---|---|
POST |
/explain |
Get architecture/bug-hunt explanations of code |
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Health check (status, version, LLM info) |
All generator endpoints accept:
{
"prompt": "Your natural language request (min 4 chars)",
"model": "optional-model-override",
"temperature": 0.2,
"options": {
"package_name": "my_pkg",
"msg_type": "sensor_msgs/msg/LaserScan"
}
}# LaserScan subscriber
curl -s -X POST http://localhost:8000/api/v1/generate/ros2_node \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a ROS2 subscriber for sensor_msgs/msg/LaserScan that logs the closest range"}'
# Publisher with timer
curl -s -X POST http://localhost:8000/api/v1/generate/ros2_node \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a ROS2 node that publishes geometry_msgs/msg/Twist to /cmd_vel at 10Hz with forward velocity 0.5 m/s"}'
# Pub-sub bridge
curl -s -X POST http://localhost:8000/api/v1/generate/ros2_node \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a ROS2 node that subscribes to /scan (LaserScan) and publishes ObstacleWarning on /obstacle_status when min range < 0.5m"}'# Pick and place
curl -s -X POST http://localhost:8000/api/v1/generate/moveit2 \
-H "Content-Type: application/json" \
-d '{"prompt": "Generate a MoveIt2 pick-and-place task for a Panda robot, picking from (0.4, 0, 0.2) and placing at (0.4, -0.4, 0.2)"}'
# Cartesian path
curl -s -X POST http://localhost:8000/api/v1/generate/moveit2 \
-H "Content-Type: application/json" \
-d '{"prompt": "Generate a MoveIt2 Cartesian path task for UR5e that moves the end-effector in a straight line along the Z axis from 0.3m to 0.6m"}'# Patrol behavior
curl -s -X POST http://localhost:8000/api/v1/generate/nav2_bt \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a Nav2 patrol behavior tree for an office robot that visits 4 waypoints and recovers with spin and wait on failure"}'
# Dock behavior
curl -s -X POST http://localhost:8000/api/v1/generate/nav2_bt \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a Nav2 behavior tree for docking: navigate to dock pose, then run dock action, with recovery behaviors"}'curl -s -X POST http://localhost:8000/api/v1/generate/urdf \
-H "Content-Type: application/json" \
-d '{"prompt": "Generate a URDF for a 6-DOF robot arm with revolute joints, base link fixed to world, and a parallel gripper end-effector"}'curl -s -X POST http://localhost:8000/api/v1/generate/isaac_scene \
-H "Content-Type: application/json" \
-d '{"prompt": "Create an Isaac Sim scene with two Franka robots facing each other, a DynamicCuboid on the table between them, and a camera overhead"}'More examples are in the examples/ directory.
| Task | Manual baseline | RoboCopilot-X | Speed-up |
|---|---|---|---|
| Bring-up a LaserScan subscriber pkg | ~25 min | ~40 s | ~37Γ |
| Author a MoveIt2 pick-and-place skeleton | ~90 min | ~75 s | ~72Γ |
| Compose a Nav2 patrol BT | ~45 min | ~50 s | ~54Γ |
| Generate URDF for 6-DoF arm | ~3 hr | ~3 min | ~60Γ |
Numbers measured against an internal robotics intern cohort, March 2026.
Reproduce with scripts/benchmark.py.
Set LLM_API_KEY in your .env file. For Ollama, use any non-empty placeholder like ollama.
- Verify your
LLM_API_BASEis reachable (curl $LLM_API_BASE/models). - Check the backend logs (
docker compose logs backendor terminal output). - Try a more explicit prompt (include message types, e.g.
sensor_msgs/msg/LaserScan).
Ensure ROBOCOPILOT_CORS_ORIGINS in .env includes your frontend origin (default: http://localhost:3000).
- Confirm Ollama is running:
ollama list - If Docker is used, use
host.docker.internalinstead oflocalhost:LLM_API_BASE=http://host.docker.internal:11434/v1
- Ensure
ament_pythonbuild tools are installed in your ROS2 workspace. - The generator uses
MultiThreadedExecutoronly for service/action nodes; pure timer/sub nodes use single executor. sensor_dataQoS is auto-selected forLaserScan,Image,PointCloud2,Imu.- Run
ros2 doctorto check your ROS2 environment.
- Set
ISAAC_SIM_PATHto your Isaac Sim installation root. - Ensure the USD paths in the spec are valid in your Isaac asset library.
- For headless rendering, set
headless: truein the spec options.
By default, artifacts are returned in the API response. To write to disk:
# Write to workspace
curl -X POST http://localhost:8000/api/v1/workspace/write \
-H "Content-Type: application/json" \
-d '{"files": [...], "subdir": "my_pkg"}'
# Download as zip
curl -O -J 'http://localhost:8000/api/v1/workspace/zip?subdir=my_pkg'See ROADMAP.md. Highlights:
- β v0.1 β Core generators (ROS2 / MoveIt2 / Nav2 / URDF / Isaac)
- β v0.2 β Sim-in-the-loop validation, RAG over user workspace, colcon build auto-repair, Xacro support, project memory
- π v0.3 β VLA policy adapters (OpenVLA, LeRobot)
- π v0.4 β Multi-agent debugging on real hardware traces
We β€οΈ contributors. Read CONTRIBUTING.md, then look at good first issue.
Quick start:
- Fork & clone the repo
- Run
make setupto install all dependencies - Create a branch:
feat/<topic>orfix/<topic> - Make changes, ensure
make lint && make testpass - Open a PR following the template
See CONTRIBUTING.md for full guidelines, coding standards, and commit conventions.
- Discord: https://discord.gg/robocopilot β Ask questions, share what you built
- GitHub Discussions: robocopilot/robocopilot-x/discussions β Feature requests, roadmap input
- Issues: GitHub Issues β Bug reports, feature tracking
RoboCopilot-X builds on the shoulders of incredible open-source projects:
- LangGraph β Agent orchestration framework
- FastAPI β High-performance async API framework
- Next.js β React framework for the workspace UI
- Jinja2 β Template engine for deterministic codegen
- Pydantic β Data validation and settings management
- ROS2 β Robot Operating System
- MoveIt2 β Motion planning for ROS2
- Nav2 β Navigation2 stack
- NVIDIA Isaac Sim β Robotics simulation platform
- OpenVLA / LeRobot β Embodied AI policy frameworks
Apache 2.0 β see LICENSE.
