Run a model on a robot that isn’t listed: fine-tune a base on your robot’s demos, then drive the robot from Python.
Any robot can run a Dreamscale model from Python. Your code reads the cameras
and joints and commands the robot; the model runs in the cloud. On an
SO-101, bimanual YAM, Franka
or OpenARM, the CLI needs no code.“Robot” is a loose word here. Models fine-tuned on Dreamscale have cleared
cardboard with a 1,930 kg excavator
and driven a Tesla around a cone course. If it has
cameras and takes commands, it counts.
What you need
Python 3.11 or newer, in a project (uv init makes one).
A Dreamscale account. Sign in once with uv run dreamscale login, or set
DREAMSCALE_API_KEY to a key from
Settings → API keys.
Demos recorded on your robot as a LeRobot dataset (v2.x or v3.0): its cameras,
observation.state and action.
1. Install the SDK
uv add dreamscale
uv run python -c "import dreamscale; print(dreamscale.__version__)" prints
0.1.0a391 or newer.
2. Fine-tune a model on your robot
A shared model runs one robot type. For yours, fine-tune a base on your demos
and deploy the result:
Your dataset defines the robot: its cameras, and what its state and action
hold. Models lists the bases and Training has the
walkthrough. Already have a fine-tuned checkpoint? See
Deployments.
3. Drive your robot
The robot will move. Enforce joint, speed and workspace limits locally, and
keep a physical e-stop within reach. Cloud inference does not replace your
robot’s safety controller.
Call next_action once per control tick:
import dreamscalepolicy = dreamscale.connect("your-org/my-robot")def read_observation(): # Your robot's code: read the frames and state. top, left_wrist = ..., ... # H×W×3 uint8 RGB frames left_joints, left_gripper = ..., ... # in your dataset's units return dreamscale.robot.observation( cameras={"base": top, "left_wrist": left_wrist}, state=[*left_joints, left_gripper], )def send_to_robot(action): # Your robot's code: apply the action, in your dataset's order and units. ...while True: send_to_robot(policy.next_action(read_observation(), instruction="pick up the red block"))
The deployment’s dashboard page shows its camera keys and this loop filled in.
Pass a new instruction to switch tasks. No robot yet?
Simulations has a snippet that runs as it is.
What the SDK handles
The SDK checks each observation and names any wrong field. It prepares images,
picks the fastest network path, and blends chunks so motion stays smooth. If the
connection drops, it reconnects and holds the robot still; if no server answers
within 5 minutes, next_action() raises reconnect_failed. After a minute idle, it
frees the server until the next call. Sessions close when your program
exits, or with policy.close(). In async code, use await dreamscale.aconnect(...).
predict() does none of this: it returns one action chunk for
your own executor.Universal Robots and xArm 7 arms also have experimental CLI runners: see
dreamscale run.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Dreamscale","description":"Run robot foundation models on cloud GPUs from the CLI or a few lines of Python.","colors":{"primary":"#16181A","light":"#F7F8F7","dark":"#73777A"},"logo":{"light":"https://mintcdn.com/dreamtimelabs/ql1nAmOIh_SfC8Mi/logo/light.svg?fit=max\u0026auto=format\u0026n=ql1nAmOIh_SfC8Mi\u0026q=85\u0026s=c138f46a7aba75b9300d25a69ea915d7","dark":"https://mintcdn.com/dreamtimelabs/ql1nAmOIh_SfC8Mi/logo/dark.svg?fit=max\u0026auto=format\u0026n=ql1nAmOIh_SfC8Mi\u0026q=85\u0026s=4deee6bdcecfc7d8be1639f9db6ae7fe"},"favicon":"https://mintcdn.com/dreamtimelabs/ql1nAmOIh_SfC8Mi/logo/dreamscale-mark.svg?fit=max\u0026auto=format\u0026n=ql1nAmOIh_SfC8Mi\u0026q=85\u0026s=59f3a3bc314c28a70b0ed801e1563c59","navbar":{"links":[{"href":"mailto:team@dreamscalelabs.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.dreamscalelabs.com/dashboard"}},"fonts":{"family":"Geist"},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"variables":{"sdkVersion":"0.1.0a391","dashboardUrl":"https://app.dreamscalelabs.com","docsUrl":"https://docs.dreamscalelabs.com","supportEmail":"team@dreamscalelabs.com"},"markdown":{"instructions":["Treat the Dreamscale CLI and Python SDK as the supported public integration surfaces.","Prefer `dreamscale run \u003crobot>` for supported robots and `dreamscale.connect(model)` with `predict` or `next_action` in Python.","Do not infer or recommend internal control-plane APIs."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dreamtimelabs","hasAudioNarration":false,"actualSubdomain":"dreamtimelabs","customDomains":["docs.dreamscalelabs.com"],"gitSource":{"type":"github","owner":"dreamscale-labs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"issues":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b0e19cf1a3b5529c8189f33","clientVersion":"0.0.4410","searchFilterCounts":[{"language":"default","tag":"Models","count":12},{"language":"default","tag":"Robots","count":5},{"language":"default","tag":"Fine-tune and evaluate","count":4},{"language":"default","tag":"Other (experimental)","count":4},{"language":"default","tag":"References","count":2},{"language":"default","tag":"Get started","count":1},{"language":"default","tag":"Help","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"robots/custom","slug":"/robots/custom","pageMetadata":{"title":"Custom robots","description":"Run a model on a robot that isn't listed: fine-tune a base on your robot's demos, then drive the robot from Python.","keywords":["custom robot","any robot","your own robot","Python SDK","dreamscale.connect","dreamscale.robot.observation","next_action","predict","action chunk","deployment","LeRobot"],"href":"/robots/custom"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run a model on a robot that isn’t listed: fine-tune a base on your robot’s demos, then drive the robot from Python.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Any robot can run a Dreamscale model from Python. Your code reads the cameras\nand joints and commands the robot; the model runs in the cloud. On an\n`,_jsx(_components.a,{href:`/robots/so101`,children:`SO-101`}),`, `,_jsx(_components.a,{href:`/robots/yam`,children:`bimanual YAM`}),`, `,_jsx(_components.a,{href:`/robots/franka`,children:`Franka`}),`\nor `,_jsx(_components.a,{href:`/robots/openarm`,children:`OpenARM`}),`, the CLI needs no code.`]}),`\n`,_jsxs(_components.p,{children:[`“Robot” is a loose word here. Models fine-tuned on Dreamscale have cleared\ncardboard with `,_jsx(_components.a,{href:`https://www.dreamscalelabs.com/blog/excavate/`,children:`a 1,930 kg excavator`}),`\nand driven `,_jsx(_components.a,{href:`https://drivingbench.com/`,children:`a Tesla around a cone course`}),`. If it has\ncameras and takes commands, it counts.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-you-need`,children:`What you need`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Python 3.11 or newer, in a project (`,_jsx(_components.code,{children:`uv init`}),` makes one).`]}),`\n`,_jsxs(_components.li,{children:[`A Dreamscale account. Sign in once with `,_jsx(_components.code,{children:`uv run dreamscale login`}),`, or set\n`,_jsx(_components.code,{children:`DREAMSCALE_API_KEY`}),` to a key from\n`,_jsx(_components.a,{href:`https://app.dreamscalelabs.com/dashboard/settings#api-keys`,children:`Settings → API keys`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Demos recorded on your robot as a LeRobot dataset (v2.x or v3.0): its cameras,\n`,_jsx(_components.code,{children:`observation.state`}),` and `,_jsx(_components.code,{children:`action`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-install-the-sdk`,children:`1. Install the SDK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dreamscale`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`uv run python -c \"import dreamscale; print(dreamscale.__version__)\"`}),` prints\n`,_jsx(_components.code,{children:`0.1.0a391`}),` or newer.`]}),`\n`,_jsx(Heading,{level:`2`,id:`2-fine-tune-a-model-on-your-robot`,children:`2. Fine-tune a model on your robot`}),`\n`,_jsx(_components.p,{children:`A shared model runs one robot type. For yours, fine-tune a base on your demos\nand deploy the result:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dreamscale`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` datasets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` upload`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./my-robot`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dreamscale`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` train`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --dataset`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-robot`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --base`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pi0.5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dreamscale`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` train`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` deploy`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` tr_...`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Your dataset defines the robot: its cameras, and what its state and action\nhold. `,_jsx(_components.a,{href:`/models`,children:`Models`}),` lists the bases and `,_jsx(_components.a,{href:`/training`,children:`Training`}),` has the\nwalkthrough. Already have a fine-tuned checkpoint? See\n`,_jsx(_components.a,{href:`/deployments`,children:`Deployments`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`3-drive-your-robot`,children:`3. Drive your robot`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The robot will move. Enforce joint, speed and workspace limits locally, and\nkeep a physical e-stop within reach. Cloud inference does not replace your\nrobot’s safety controller.`})}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`next_action`}),` once per control tick:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dreamscale`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`policy `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dreamscale.connect(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-org/my-robot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` read_observation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Your robot's code: read the frames and state.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` top, left_wrist `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # H×W×3 uint8 RGB frames`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` left_joints, left_gripper `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # in your dataset's units`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dreamscale.robot.observation(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` cameras`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"base\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: top, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"left_wrist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: left_wrist},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` state`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`left_joints, left_gripper],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` send_to_robot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Your robot's code: apply the action, in your dataset's order and units.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` send_to_robot(policy.next_action(read_observation(), `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pick up the red block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The deployment’s dashboard page shows its camera keys and this loop filled in.\nPass a new instruction to switch tasks. No robot yet?\n`,_jsx(_components.a,{href:`/simulations#from-python`,children:`Simulations`}),` has a snippet that runs as it is.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-the-sdk-handles`,children:`What the SDK handles`}),`\n`,_jsxs(_components.p,{children:[`The SDK checks each observation and names any wrong field. It prepares images,\npicks the fastest network path, and blends chunks so motion stays smooth. If the\nconnection drops, it reconnects and holds the robot still; if no server answers\nwithin 5 minutes, `,_jsx(_components.code,{children:`next_action()`}),` raises `,_jsx(_components.code,{children:`reconnect_failed`}),`. After a minute idle, it\nfrees the server until the next call. Sessions close when your program\nexits, or with `,_jsx(_components.code,{children:`policy.close()`}),`. In async code, use `,_jsx(_components.code,{children:`await dreamscale.aconnect(...)`}),`.\n`,_jsx(_components.code,{children:`predict()`}),` does none of this: it returns one action chunk for\n`,_jsx(_components.a,{href:`/reference/sdk#running-chunks-on-your-own-clock`,children:`your own executor`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Universal Robots and xArm 7 arms also have experimental CLI runners: see\n`,_jsx(_components.a,{href:`/reference/cli#dreamscale-run`,children:_jsx(_components.code,{children:`dreamscale run`})}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Custom robots","description":"Run a model on a robot that isn't listed: fine-tune a base on your robot's demos, then drive the robot from Python.","keywords":["custom robot","any robot","your own robot","Python SDK","dreamscale.connect","dreamscale.robot.observation","next_action","predict","action chunk","deployment","LeRobot"],"href":"/robots/custom"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What you need","slug":"what-you-need","depth":2,"children":[]},{"title":"1. Install the SDK","slug":"1-install-the-sdk","depth":2,"children":[]},{"title":"2. Fine-tune a model on your robot","slug":"2-fine-tune-a-model-on-your-robot","depth":2,"children":[]},{"title":"3. Drive your robot","slug":"3-drive-your-robot","depth":2,"children":[]},{"title":"What the SDK handles","slug":"what-the-sdk-handles","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"dreamtimelabs","siteName":"Dreamscale","title":"Custom robots - Dreamscale","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-30T14:20:09.946Z","originalFileLocation":"robots/custom.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run a model on a robot that isn\u0026#x27;t listed: fine-tune a base on your robot\u0026#x27;s demos, then drive the robot from Python.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dreamscale\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Custom robots - Dreamscale\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run a model on a robot that isn\u0026#x27;t listed: fine-tune a base on your robot\u0026#x27;s demos, then drive the robot from Python.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dreamscale\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.dreamscalelabs.com/robots/custom\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dreamtimelabs.mintlify.site/_mintlify/api/og/v2?division=Robots\u0026amp;title=Custom+robots\u0026amp;description=Run+a+model+on+a+robot+that+isn%27t+listed%3A+fine-tune+a+base+on+your+robot%27s+demos%2C+then+drive+the+robot+from+Python.\u0026amp;theme=d0f98431d8596e49a5148e5e\u0026amp;signature=d6b095de7807a1ea93de29b2e04af556a9d9f31446be791dfed63ee72b1782e8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Custom robots - Dreamscale\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run a model on a robot that isn\u0026#x27;t listed: fine-tune a base on your robot\u0026#x27;s demos, then drive the robot from Python.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dreamtimelabs.mintlify.site/_mintlify/api/og/v2?division=Robots\u0026amp;title=Custom+robots\u0026amp;description=Run+a+model+on+a+robot+that+isn%27t+listed%3A+fine-tune+a+base+on+your+robot%27s+demos%2C+then+drive+the+robot+from+Python.\u0026amp;theme=d0f98431d8596e49a5148e5e\u0026amp;signature=d6b095de7807a1ea93de29b2e04af556a9d9f31446be791dfed63ee72b1782e8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dreamtimelabs/io_OP27x3Jx9ZGnk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dreamscale\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16181A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.dreamscalelabs.com/robots/custom\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/robots/custom.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.dreamscalelabs.com/#organization\",\"name\":\"Dreamscale\",\"url\":\"https://docs.dreamscalelabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dreamtimelabs/ql1nAmOIh_SfC8Mi/logo/light.svg?fit=max\u0026auto=format\u0026n=ql1nAmOIh_SfC8Mi\u0026q=85\u0026s=c138f46a7aba75b9300d25a69ea915d7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.dreamscalelabs.com#website\",\"name\":\"Dreamscale\",\"url\":\"https://docs.dreamscalelabs.com\",\"publisher\":{\"@id\":\"https://docs.dreamscalelabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.dreamscalelabs.com/robots/custom#webpage\",\"url\":\"https://docs.dreamscalelabs.com/robots/custom\",\"name\":\"Custom robots\",\"description\":\"Run a model on a robot that isn't listed: fine-tune a base on your robot's demos, then drive the robot from Python.\",\"dateModified\":\"2026-11-30T14:20:09.946Z\",\"isPartOf\":{\"@id\":\"https://docs.dreamscalelabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.dreamscalelabs.com/robots/custom#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.dreamscalelabs.com/robots/custom#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Robots\",\"item\":\"https://docs.dreamscalelabs.com/robots/yam\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom robots\",\"item\":\"https://docs.dreamscalelabs.com/robots/custom\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.dreamscalelabs.com/robots/custom#article\",\"headline\":\"Custom robots\",\"name\":\"Custom robots\",\"description\":\"Run a model on a robot that isn't listed: fine-tune a base on your robot's demos, then drive the robot from Python.\",\"url\":\"https://docs.dreamscalelabs.com/robots/custom\",\"mainEntityOfPage\":{\"@id\":\"https://docs.dreamscalelabs.com/robots/custom#webpage\"},\"dateModified\":\"2026-11-30T14:20:09.946Z\",\"keywords\":\"custom robot, any robot, your own robot, Python SDK, dreamscale.connect, dreamscale.robot.observation, next_action, predict, action chunk, deployment, LeRobot\",\"publisher\":{\"@id\":\"https://docs.dreamscalelabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.dreamscalelabs.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dreamscale\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Dreamscale\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/robots/custom.md","siteName":"Dreamscale","nav":{"global":null,"pages":[{"group":"Get started","pages":[{"title":"Quick start","href":"/index"}]},{"group":"Robots","pages":[{"title":"Bimanual YAM with the CLI","sidebarTitle":"Bimanual YAM","href":"/robots/yam"},{"title":"SO-101 with the CLI","sidebarTitle":"SO-101","href":"/robots/so101"},{"title":"Franka / DROID with the CLI (experimental)","sidebarTitle":"Franka / DROID (experimental)","href":"/robots/franka"},{"title":"Anvil OpenARM (experimental)","sidebarTitle":"Anvil OpenARM (experimental)","description":"Experimental: run your own fine-tuned deployment on an Anvil OpenARM 2.0, from its Devbox, with no GPU computer beside it.","href":"/robots/openarm"},{"title":"Custom robots","href":"/robots/custom"}]},{"group":"Models","pages":[{"title":"Models","sidebarTitle":"Overview","mode":"wide","description":"Every model family on Dreamscale: who makes it, which robots it runs on, and whether you can fine-tune and deploy your own.","href":"/models"},{"title":"π0.5","href":"/models/pi05"},{"title":"Praxis-1","href":"/models/praxis-1"},{"title":"FLUX 3 Action","href":"/models/flux-3-action"},{"title":"Verne V0.5","href":"/models/verne-v05"},{"title":"Isaac 0.5","href":"/models/isaac-05"},{"title":"MolmoAct2","href":"/models/molmoact2"},{"title":"GR00T N1.7","href":"/models/gr00t-n17"},{"group":"Other (experimental)","pages":[{"title":"ABC-VLA","href":"/models/abc-vla"},{"title":"Long-WAM","href":"/models/long-wam"},{"title":"Xiaomi-Robotics-1","href":"/models/xiaomi-robotics-1"},{"title":"Flex-π","href":"/models/flexpi"}]}]},{"group":"Fine-tune and evaluate","pages":[{"title":"Datasets","href":"/datasets"},{"title":"Training","href":"/training"},{"title":"Deployments","href":"/deployments"},{"title":"Simulations","href":"/simulations"}]},{"group":"References","pages":[{"title":"CLI reference","sidebarTitle":"CLI reference","href":"/reference/cli"},{"title":"Python SDK reference","sidebarTitle":"SDK reference","href":"/reference/sdk"}]},{"group":"Help","pages":[{"title":"Troubleshooting","href":"/troubleshooting"}]}]},"basePath":"","title":"Custom robots - Dreamscale","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":[],"chunks":[]}