Before you begin, make sure you have installed roz, pulled the manipulator sim container, and configured an LLM provider.
Start the Simulation
Launch the UR5 manipulator simulation:Sim ready when the robot is initialized and accepting commands.
Launch Interactive Mode
Start an interactive session with the agent:Give It a Command
Type a command:What Happens Behind the Scenes
Agent receives robot capabilities
When the session starts, the agent loads the robot’s channel manifest — a description of available sensor inputs and motor outputs. For the UR5, this is 6 joint velocity channels plus joint state feedback. The agent also discovers the MCP tools available from the sim container.
Agent writes WAT code
The LLM generates WebAssembly Text (WAT) code that implements a sine wave on the shoulder joint. The code reads a tick counter and computes
sin(tick * frequency) * amplitude to produce an oscillating velocity command.Code compiles and verifies
The WAT compiles to WASM bytecode via wasmtime. Before deployment, the runtime executes the controller for 100 ticks in a dry-run sandbox to verify it does not trap, does not exceed memory limits, and produces outputs within the robot’s configured bounds.
Deployed to 100Hz Copper loop
The verified WASM module is loaded into the Copper runtime, which calls the controller’s
step function at 100Hz. Each tick, the controller reads sensor state and writes velocity commands to the channel interface.Safety filter clamps outputs
Every command passes through the safety filter before reaching the robot. The filter enforces velocity limits, acceleration limits, and position bounds configured for the UR5. If the agent’s code produces an unsafe value, the filter clamps it to the nearest safe value.
What Just Happened
You described a behavior in plain English. The agent:- Understood that “wave back and forth” means a continuous oscillating motion
- Chose the WASM control path because this requires real-time, smooth control (not a discrete action)
- Wrote valid WAT code that computes a sine wave
- Verified the code was safe before deployment
- Deployed it to a 100Hz control loop with hardware-limit enforcement
- The arm moved in Gazebo with the commanded motion
Next Steps
Two Control Paths
Understand when the agent uses MCP tools versus WASM controllers, and how it decides between them.
WASM Controllers
Deep dive into the WASM sandbox, channel interface, verification process, and the WAT code the agent generates.
Supported Robots
Explore all supported robot types: manipulator, PX4 drone, ArduPilot drone, and Nav2 mobile robot.
Safety Architecture
Learn about the safety filter, heartbeat monitoring, e-stop system, and hardware limit enforcement.
Deployment
Run roz in local mode, self-host the full stack, or deploy to edge hardware alongside your robot.
Source Code
Browse the source, read the crate documentation, and contribute to the project.