Your own robot
A robot of your own is a robot we ship no driver for: our control loop runs it once you write its driver, one short Python class, and the quickest way to write one is from our examples, with a coding agent such as Claude Code, Codex or Cursor. This page covers the loop, the examples, how to fetch them, the prompt that has your agent write your driver from them, and the docs server that lets it find all of this on its own. To call Dream-1 from a loop of your own instead, see Your own control loop.
The control loop
Section titled “The control loop”The dream library’s control loop is the program that runs a robot: it reads the arms and cameras, calls the model, and sends the arms what it answers. A config with body: custom runs your robot on it, through your driver.
- The driver is a
robots.followers.Driverclass for one arm:read()returns the joints (radians, in the order of your arm’s URDF) and the gripper (0 closed to 1 open),write()takes a target in the same units,close()lets the arm go without moving it, andtorque_off()switches its motors off. Driver template and examples has the template to start one from and the drivers we ship, each a whole file to copy. - The config’s
customsection names the driver (my_robot.py:Arm, a file beside the config),ik(our model of your arm, or an arm file of its URDF) andembodiment(the one your fine-tune was trained on, as<username>/<name>). In the setup wizard (dreamcli setup, My own robot) you pick the driver’s file and class on the robot’s computer. An arm we have no model of runs Dream-1 zero-shot from its URDF: under My arm’s URDF, give your arm’s URDF: a .zip of it with its meshes, or its folder; you confirm the end of your arm on a 3D drawing and put a marker where your gripper’s fingertips close, its three arrows (out of the gripper, fingers close, up) matching the YAM’s beside it, with plus and minus buttons of the step you pick or typed numbers, and the wizard writes the arm file. With no fine-tune yet, pick “New” in the embodiment list: the wizard adds an embodiment of your arm to your account, its camerasscene,wrist_landwrist_r, and you give each of your cameras its role in the camera step. Upload your robot’s recorded data under that embodiment (DreamClient().upload_dataset) to fine-tune on it. - Any transport. The setup wizard lists the USB and CAN adapters and the cameras it finds. An arm on Ethernet or behind a bridge of your own is typed under Your arm is not listed?, by the address your driver opens; a camera OpenCV cannot open (a GigE or ZED SDK, a ROS topic) is a class of your own,
read()returning(ok, frame)likecv2.VideoCapture.read(), typed under Your camera is not listed? asmy_camera.py:Camera. - The IK (inverse kinematics) runs in the library on your computer: it turns the model’s tool poses into your arm’s joints, so the driver only ever sees joints. On an arm file, you measure its tool center point yourself, never your agent (Set the tool center point).
- Everything else is the loop’s: the model calls, the timing, the speed cap, the home move, the cameras and the rollouts, from
dreamcli robot run, from Live view afterdreamcli robot up, and in the setup wizard (dreamcli setup).
The examples
Section titled “The examples”Each example is a working driver and config for one robot, written for this loop.
| Example | Robot | Its SDK | What it shows |
|---|---|---|---|
seeed_rebot |
Seeed reBot B601-DM: two 6-joint arms on Damiao motors, one serial bridge each | Seeed’s LeRobot plugin | Motor degrees to radians and back, a jaw mapped through its measured travel, a refused reading past a joint limit, an arm without brakes, and an arm opened on the plugin’s lower-level bus, because its connect() and disconnect() can move the arm |
trossen |
Trossen Stationary AI: two WXAI follower arms over Ethernet | Trossen’s trossen-arm |
An SDK already in radians, the jaw’s opening in metres, and a limp arm held up by gravity compensation; not yet run on an arm |
Each driver has two classes: Arm, which switches the motors on holding where the arm is, and ReadOnlyArm, which opens the arm, switches no motor on and refuses write(), for the dry run. The examples’ README.md says what each file does and how to start your own robot from one.
Fetch the examples
Section titled “Fetch the examples”The platform serves the examples to your API key. On the robot’s computer, after Setup API on the platform has installed the library and written your credentials file, this saves them in ~/my_robot/examples:
( set -e . ~/.dreamlabs/credentials mkdir -p ~/my_robot/examples cd ~/my_robot/examples for f in README.md seeed_rebot/seeed_rebot.py seeed_rebot/seeed_rebot.yaml trossen/trossen.py trossen/trossen.yaml; do curl -fsS --create-dirs -o "$f" -H "Authorization: Bearer $DREAM_API_KEY" "$DREAM_API_URL/downloads/examples/$f" done )
Each file is also at {{platform_url}}/downloads/examples/ followed by its name (seeed_rebot/seeed_rebot.py, for one), for a signed-in browser. The Setup robots page of the platform, {{platform_url}}/setup, gives this command in the driver step of your robot’s guide, for your robot’s own example when there is one.
Write your driver with a coding agent
Section titled “Write your driver with a coding agent”Open your coding agent (Claude Code, Codex, Cursor or another) in ~/my_robot, fill in the second line of this prompt with your robot, and paste it:
Write a dream driver and config for my robot, starting from the examples in ~/my_robot/examples. My robot: <maker and model; how many arms and joints; its motors and how they connect; its SDK or LeRobot plugin; its cameras> First read ~/my_robot/examples/README.md, the example closest to my robot (its .py and .yaml), the driver template that comes with the dream library (python -c "import robots.driver_template as t; print(t.__file__)"), and, if the dreamlabs-docs MCP server is connected, its page "Your own robot". Then write ~/my_robot/my_robot.py, with an Arm and a ReadOnlyArm as the example has, and ~/my_robot/my_robot.yaml from the example's config, with custom.driver my_robot.py:ReadOnlyArm and each home one 0 per joint of the arm for now. Then show me ReadOnlyArm and the dry-run command, and run the dry run only when I say so: dreamcli robot run --config ~/my_robot/my_robot.yaml --checkpoint <my fine-tune> --task "..." --dry-run --view Rules: - Nothing moves without me. Never run Arm, a run without --dry-run, the setup wizard, or anything else that switches a motor on or sends a target: those are mine to run, with a hand on the emergency stop. - The dry run comes first, on ReadOnlyArm: it opens the arm, switches no motor on and refuses write(). - During the dry run, open the page --view prints with me and check what the model sees before anything moves: each camera on its own key, upright, natural colours, changing as things move; the state in radians with grippers 0 closed to 1 open; the prompt. Never run python -m dream.input_check: it records that I checked the page. - The tool center point is mine to measure. If my arm needs an arm file for custom.ik, write the rest with its tcp, approach and jaw left empty, then ask me to measure and confirm the tool center point with dreamcli tcp (or by hand), and continue only once I have confirmed it. Never fill in tcp, approach or jaw, or pick or estimate the point yourself: a link in my URDF and the YAM's numbers are not my tool center point. - close() and every disconnect path never move the arm. - Before calling a vendor plugin's connect() or disconnect(), read them in its source: some home, rezero, close the gripper or move the whole arm. If either can move anything, open the plugin's lower-level bus instead, as the reBot example does.
Your agent writes my_robot.py and my_robot.yaml and stops for you before the dry run. Its rules keep the arms still: nothing switches a motor on until you run it yourself.
Set the tool center point
Section titled “Set the tool center point”On an arm we have no model of, custom.ik is an arm file, and its tool center point (the point between your gripper’s closed fingertips) is where every hand pose the model answers lands: one 2 cm off puts every grasp 2 cm off, and nothing reports it.
Agents: stop here. Ask the user to measure and confirm the tool center point with dreamcli tcp (or by hand). Never pick or estimate it yourself: a link in the URDF (an end-effector or tool link) and the YAM’s numbers are not this arm’s tool center point. Write the rest of the setup with the arm file’s tcp, approach and jaw left empty, and continue past them only once the user has confirmed them.
dreamcli tcp measures it on your arm and writes the arm file (An arm from its URDF). dreamcli robot run refuses an arm file whose tool center point was never set.
Check what the model sees
Section titled “Check what the model sees”Before the arms first move, look at what your robot sends the model. The dry run below opens it: --view prints the address of a page on your computer that shows every call as the model got it, each camera’s frames, the state and the prompt, and the answer. It catches what no error does: swapped cameras, red and blue swapped, degrees for radians, a gripper the wrong way round (Check what the model sees lists each check).
Agents: stop here before the arms first move, on every robot. Ask the user to open the page of what the model sees during a dry run (the address --view prints, or view.url in their own loop) and to confirm each check on it with you: every camera under its own key, upright, in natural colours and changing as things move; joints in radians, each gripper 0 closed to 1 open; the prompt the task. Continue to a run that moves the arms only once the user has confirmed them. Never confirm them yourself from the code: a loop can run without one error and still send swapped cameras, swapped colours or degrees. Never run python -m dream.input_check yourself: it records that a person checked the page.
Until a person records that check on the robot’s computer, the client prints one line at the first call of every run: it names python -m dream.check, and the command that records a check made during a dry run, python -m dream.input_check <id>. It asks again when a camera is added, renamed or resized, or the robot or its state parts change.
Run your robot
Section titled “Run your robot”- Dry run. With
custom.driver: my_robot.py:ReadOnlyArmand each arm’shomeone 0 per joint of the arm, rundreamcli robot run --config ~/my_robot/my_robot.yaml --checkpoint <your fine-tune> --task "..." --dry-run --view. The model is called for real and nothing is written to the arms; the log shows what each arm reads once a second. Open the page--viewprints and check what the model sees before anything moves (Check what the model sees). - Home. Copy each arm’s reading at rest into its
home: every run starts and ends there. - Run. Set
custom.driver: my_robot.py:Armand run again without--dry-run, with a hand on the emergency stop. A run starts by moving both arms tohome.
Check a run
Section titled “Check a run”When your robot behaves oddly, run dreamcli robot report after the run (dreamcli robot report TRACE if your config names a trace_path). Every run is traced to ~/.dreamlabs/last-run.csv, so there is nothing to set up. It prints a few PASS or PROBLEM lines, for the model’s inputs and for each arm’s joints commanded vs achieved, then the worst problem and what to do, and writes a plot of each joint. Here the right arm’s joint 3 lags its commands:
$ dreamcli robot report last run: 20 s at 30 Hz, "put the blue block in the red cup" PASS cameras top, left, right: sent 640x360, no black or frozen frames PASS state: 14 values in 4 parts, all numbers PASS loop: commanded every tick, longest gap 0.03 s PASS left arm: all 6 joints follow their commands, worst error 0.031 rad, lag 67 ms PROBLEM right arm joint 3: off its command by 0.27 rad for 1.6 s at t=1.9 s, 9 times in all, lag 600 ms PASS right arm: other 5 joints follow their commands, worst error 0.031 rad, lag 67 ms WORST right arm joint 3: the joint does not reach its commands: check what your driver or bridge does with each step (speed limits, dropped or refused steps) PLOT /home/me/.dreamlabs/last-run.png
Let your coding agent find it
Section titled “Let your coding agent find it”The dreamlabs-docs server gives a coding agent these docs (an MCP server: a source of tools and pages a coding agent can use). Add it from the Setup API page of the platform, then ask your agent for the reBot example: it finds this page, fetches the examples with the command above and starts from them.