Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Policy Deployment (lerobot-rollout)","local":"policy-deployment-lerobot-rollout","sections":[{"title":"Quick Start","local":"quick-start","sections":[],"depth":2},{"title":"Strategies","local":"strategies","sections":[{"title":"Base ( --strategy.type=base )","local":"base----strategytypebase-","sections":[],"depth":3},{"title":"Sentry ( --strategy.type=sentry )","local":"sentry----strategytypesentry-","sections":[],"depth":3},{"title":"Highlight ( --strategy.type=highlight )","local":"highlight----strategytypehighlight-","sections":[],"depth":3},{"title":"DAgger ( --strategy.type=dagger )","local":"dagger----strategytypedagger-","sections":[],"depth":3}],"depth":2},{"title":"Inference Backends","local":"inference-backends","sections":[{"title":"Sync (default)","local":"sync-default","sections":[],"depth":3},{"title":"Real-Time Chunking ( --inference.type=rtc )","local":"real-time-chunking----inferencetypertc-","sections":[],"depth":3}],"depth":2},{"title":"Common Flags","local":"common-flags","sections":[],"depth":2},{"title":"Programmatic Usage","local":"programmatic-usage","sections":[],"depth":2}],"depth":1}"> | |
| <link href="/docs/lerobot/pr_3413/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/entry/start.111f4248.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/scheduler.eb244325.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/singletons.e45dc69a.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/index.3c23fb4b.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/paths.d83a1efe.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/entry/app.0a57979a.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/preload-helper.799453fa.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/index.3fe63ad3.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/nodes/0.1435758b.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/each.e59479a4.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/nodes/27.fa328da2.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/CopyLLMTxtMenu.db2d24d3.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.b4f701b3.js"> | |
| <link rel="modulepreload" href="/docs/lerobot/pr_3413/en/_app/immutable/chunks/CodeBlock.6b02d246.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"Policy Deployment (lerobot-rollout)","local":"policy-deployment-lerobot-rollout","sections":[{"title":"Quick Start","local":"quick-start","sections":[],"depth":2},{"title":"Strategies","local":"strategies","sections":[{"title":"Base ( --strategy.type=base )","local":"base----strategytypebase-","sections":[],"depth":3},{"title":"Sentry ( --strategy.type=sentry )","local":"sentry----strategytypesentry-","sections":[],"depth":3},{"title":"Highlight ( --strategy.type=highlight )","local":"highlight----strategytypehighlight-","sections":[],"depth":3},{"title":"DAgger ( --strategy.type=dagger )","local":"dagger----strategytypedagger-","sections":[],"depth":3}],"depth":2},{"title":"Inference Backends","local":"inference-backends","sections":[{"title":"Sync (default)","local":"sync-default","sections":[],"depth":3},{"title":"Real-Time Chunking ( --inference.type=rtc )","local":"real-time-chunking----inferencetypertc-","sections":[],"depth":3}],"depth":2},{"title":"Common Flags","local":"common-flags","sections":[],"depth":2},{"title":"Programmatic Usage","local":"programmatic-usage","sections":[],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg></button></div> </div> <h1 class="relative group"><a id="policy-deployment-lerobot-rollout" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#policy-deployment-lerobot-rollout"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Policy Deployment (lerobot-rollout)</span></h1> <p data-svelte-h="svelte-19sooy"><code>lerobot-rollout</code> is the single CLI for deploying trained policies on real robots. It supports multiple execution strategies and inference backends, from quick evaluation to continuous recording and human-in-the-loop data collection.</p> <h2 class="relative group"><a id="quick-start" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#quick-start"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Quick Start</span></h2> <p data-svelte-h="svelte-1gteh9r">No extra dependencies are needed beyond your robot and policy extras.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=base \ | |
| --policy.path=lerobot/act_koch_real \ | |
| --robot.type=koch_follower \ | |
| --robot.port=/dev/ttyACM0 \ | |
| --task=<span class="hljs-string">"pick up cube"</span> \ | |
| --duration=30<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-ngweo2">This runs the policy for 30 seconds with no recording.</p> <hr> <h2 class="relative group"><a id="strategies" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#strategies"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Strategies</span></h2> <p data-svelte-h="svelte-inpbs1">Select a strategy with <code>--strategy.type=<name></code>. Each strategy defines a different control loop with its own recording and interaction semantics.</p> <h3 class="relative group"><a id="base----strategytypebase-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#base----strategytypebase-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Base ( --strategy.type=base )</span></h3> <p data-svelte-h="svelte-f9o9r7">Autonomous policy execution with no data recording. Use this for quick evaluation, demos, or when you only need to observe the robot.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=base \ | |
| --policy.path=<span class="hljs-variable">${HF_USER}</span>/my_policy \ | |
| --robot.type=so100_follower \ | |
| --robot.port=/dev/ttyACM0 \ | |
| --robot.cameras=<span class="hljs-string">"{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}"</span> \ | |
| --task=<span class="hljs-string">"Put lego brick into the box"</span> \ | |
| --duration=60<!-- HTML_TAG_END --></pre></div> <table data-svelte-h="svelte-1p1l27n"><thead><tr><th>Flag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>--duration</code></td> <td>Run time in seconds (0 = infinite)</td></tr> <tr><td><code>--task</code></td> <td>Task description passed to the policy</td></tr> <tr><td><code>--display_data</code></td> <td>Stream observations/actions to Rerun for visualization</td></tr></tbody></table> <h3 class="relative group"><a id="sentry----strategytypesentry-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#sentry----strategytypesentry-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Sentry ( --strategy.type=sentry )</span></h3> <p data-svelte-h="svelte-1xh5qnv">Continuous autonomous recording with periodic upload to the Hugging Face Hub. Episode boundaries are auto-computed from camera resolution and FPS so each saved episode produces a complete video file, keeping uploads efficient.</p> <p data-svelte-h="svelte-1qqn7m8">Policy state (hidden state, RTC queue) persists across episode boundaries: the robot does not reset between episodes.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=sentry \ | |
| --strategy.upload_every_n_episodes=5 \ | |
| --policy.path=<span class="hljs-variable">${HF_USER}</span>/my_policy \ | |
| --robot.type=so100_follower \ | |
| --robot.port=/dev/ttyACM0 \ | |
| --robot.cameras=<span class="hljs-string">"{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}"</span> \ | |
| --dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_eval_data \ | |
| --dataset.single_task=<span class="hljs-string">"Put lego brick into the box"</span> \ | |
| --duration=3600<!-- HTML_TAG_END --></pre></div> <table data-svelte-h="svelte-l7krj8"><thead><tr><th>Flag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>--strategy.upload_every_n_episodes</code></td> <td>Push to Hub every N episodes (default: 5)</td></tr> <tr><td><code>--strategy.target_video_file_size_mb</code></td> <td>Target video file size for episode rotation (default: auto)</td></tr> <tr><td><code>--dataset.repo_id</code></td> <td><strong>Required.</strong> Hub repository for the recorded dataset</td></tr> <tr><td><code>--dataset.push_to_hub</code></td> <td>Whether to push to Hub on teardown (default: true)</td></tr></tbody></table> <h3 class="relative group"><a id="highlight----strategytypehighlight-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#highlight----strategytypehighlight-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Highlight ( --strategy.type=highlight )</span></h3> <p data-svelte-h="svelte-dw5h6">Autonomous rollout with on-demand recording via a memory-bounded ring buffer. The robot runs continuously while the buffer captures the last N seconds of telemetry. Press the save key to flush the buffer and start live recording; press it again to save the episode.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=highlight \ | |
| --strategy.ring_buffer_seconds=30 \ | |
| --strategy.save_key=s \ | |
| --strategy.push_key=h \ | |
| --policy.path=<span class="hljs-variable">${HF_USER}</span>/my_policy \ | |
| --robot.type=koch_follower \ | |
| --robot.port=/dev/ttyACM0 \ | |
| --dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_highlight_data \ | |
| --dataset.single_task=<span class="hljs-string">"Pick up the red cube"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1tkqe"><strong>Keyboard controls:</strong></p> <table data-svelte-h="svelte-1p8ja03"><thead><tr><th>Key</th> <th>Action</th></tr></thead> <tbody><tr><td><code>s</code> (configurable)</td> <td>Start recording (flushes buffer) / stop and save episode</td></tr> <tr><td><code>h</code> (configurable)</td> <td>Push dataset to Hub</td></tr> <tr><td><code>ESC</code></td> <td>Stop the session</td></tr></tbody></table> <table data-svelte-h="svelte-1serlri"><thead><tr><th>Flag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>--strategy.ring_buffer_seconds</code></td> <td>Duration of buffered telemetry (default: 30)</td></tr> <tr><td><code>--strategy.ring_buffer_max_memory_mb</code></td> <td>Memory cap for the ring buffer (default: 2048)</td></tr> <tr><td><code>--strategy.save_key</code></td> <td>Key to toggle recording (default: <code>s</code>)</td></tr> <tr><td><code>--strategy.push_key</code></td> <td>Key to push to Hub (default: <code>h</code>)</td></tr></tbody></table> <h3 class="relative group"><a id="dagger----strategytypedagger-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#dagger----strategytypedagger-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>DAgger ( --strategy.type=dagger )</span></h3> <p data-svelte-h="svelte-3i9qqh">Human-in-the-loop data collection. Alternates between autonomous policy execution and human intervention via a teleoperator. Intervention frames are tagged with <code>intervention=True</code>. Requires a teleoperator (<code>--teleop.type</code>).</p> <p data-svelte-h="svelte-84dkex">See the <a href="./hil_data_collection">Human-In-the-Loop Data Collection</a> guide for a detailed walkthrough.</p> <p data-svelte-h="svelte-1srrgxc"><strong>Corrections-only mode</strong> (default): Only human correction windows are recorded. Each correction becomes one episode.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=dagger \ | |
| --strategy.num_episodes=20 \ | |
| --policy.path=outputs/pretrain/checkpoints/last/pretrained_model \ | |
| --robot.type=bi_openarm_follower \ | |
| --teleop.type=openarm_mini \ | |
| --dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_hil_data \ | |
| --dataset.single_task=<span class="hljs-string">"Fold the T-shirt"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-7lwoja"><strong>Continuous recording mode</strong> (<code>--strategy.record_autonomous=true</code>): Both autonomous and correction frames are recorded with time-based episode rotation (same as Sentry).</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=dagger \ | |
| --strategy.record_autonomous=<span class="hljs-literal">true</span> \ | |
| --strategy.num_episodes=50 \ | |
| --policy.path=<span class="hljs-variable">${HF_USER}</span>/my_policy \ | |
| --robot.type=so100_follower \ | |
| --robot.port=/dev/ttyACM0 \ | |
| --teleop.type=so101_leader \ | |
| --teleop.port=/dev/ttyACM1 \ | |
| --dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_dagger_data \ | |
| --dataset.single_task=<span class="hljs-string">"Grasp the block"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1wczesi"><strong>Keyboard controls</strong> (default input device):</p> <table data-svelte-h="svelte-15dp9kl"><thead><tr><th>Key</th> <th>Action</th></tr></thead> <tbody><tr><td><code>Space</code></td> <td>Pause / resume policy execution</td></tr> <tr><td><code>Tab</code></td> <td>Start / stop human correction</td></tr> <tr><td><code>Enter</code></td> <td>Push dataset to Hub (corrections-only mode)</td></tr> <tr><td><code>ESC</code></td> <td>Stop the session</td></tr></tbody></table> <p data-svelte-h="svelte-15d9ppk">Foot pedal input is also supported via <code>--strategy.input_device=pedal</code>. Configure pedal codes with <code>--strategy.pedal.*</code> flags.</p> <table data-svelte-h="svelte-nn8pkv"><thead><tr><th>Flag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>--strategy.num_episodes</code></td> <td>Number of correction episodes to record (default: 10)</td></tr> <tr><td><code>--strategy.record_autonomous</code></td> <td>Record autonomous frames too (default: false)</td></tr> <tr><td><code>--strategy.upload_every_n_episodes</code></td> <td>Push to Hub every N episodes (default: 5)</td></tr> <tr><td><code>--strategy.input_device</code></td> <td>Input device: <code>keyboard</code> or <code>pedal</code> (default: keyboard)</td></tr> <tr><td><code>--teleop.type</code></td> <td><strong>Required.</strong> Teleoperator type</td></tr></tbody></table> <hr> <h2 class="relative group"><a id="inference-backends" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#inference-backends"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Inference Backends</span></h2> <p data-svelte-h="svelte-10f84hz">Select a backend with <code>--inference.type=<name></code>. All strategies work with both backends.</p> <h3 class="relative group"><a id="sync-default" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#sync-default"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Sync (default)</span></h3> <p data-svelte-h="svelte-9jnnqz">One policy call per control tick. The main loop blocks until the action is computed.</p> <p data-svelte-h="svelte-zkdrvw">Works with all policies. No extra flags needed.</p> <h3 class="relative group"><a id="real-time-chunking----inferencetypertc-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#real-time-chunking----inferencetypertc-"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Real-Time Chunking ( --inference.type=rtc )</span></h3> <p data-svelte-h="svelte-1pa8jzf">A background thread produces action chunks asynchronously. The main control loop polls for the next ready action while the policy computes the next chunk in parallel.</p> <p data-svelte-h="svelte-vs40jc">Use RTC with large, slow VLA models (Pi0, Pi0.5, SmolVLA) for smooth, continuous motion despite high inference latency.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->lerobot-rollout \ | |
| --strategy.type=base \ | |
| --inference.type=rtc \ | |
| --inference.rtc.execution_horizon=10 \ | |
| --inference.rtc.max_guidance_weight=10.0 \ | |
| --policy.path=<span class="hljs-variable">${HF_USER}</span>/pi0_policy \ | |
| --robot.type=so100_follower \ | |
| --robot.port=/dev/ttyACM0 \ | |
| --robot.cameras=<span class="hljs-string">"{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}"</span> \ | |
| --task=<span class="hljs-string">"Pick up the cube"</span> \ | |
| --duration=60 \ | |
| --device=cuda<!-- HTML_TAG_END --></pre></div> <table data-svelte-h="svelte-5rck86"><thead><tr><th>Flag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>--inference.rtc.execution_horizon</code></td> <td>Steps to blend with previous chunk (default: varies by policy)</td></tr> <tr><td><code>--inference.rtc.max_guidance_weight</code></td> <td>Consistency enforcement strength (default: varies by policy)</td></tr> <tr><td><code>--inference.rtc.prefix_attention_schedule</code></td> <td>Blend schedule: <code>LINEAR</code>, <code>EXP</code>, <code>ONES</code>, <code>ZEROS</code></td></tr> <tr><td><code>--inference.queue_threshold</code></td> <td>Max queue size before backpressure (default: 30)</td></tr></tbody></table> <p data-svelte-h="svelte-h6l4cy">See the <a href="./rtc">Real-Time Chunking</a> guide for details on tuning RTC parameters.</p> <hr> <h2 class="relative group"><a id="common-flags" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#common-flags"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Common Flags</span></h2> <table data-svelte-h="svelte-xfz8rz"><thead><tr><th>Flag</th> <th>Description</th> <th>Default</th></tr></thead> <tbody><tr><td><code>--policy.path</code></td> <td><strong>Required.</strong> HF Hub model ID or local checkpoint path</td> <td>—</td></tr> <tr><td><code>--robot.type</code></td> <td><strong>Required.</strong> Robot type (e.g. <code>so100_follower</code>, <code>koch_follower</code>)</td> <td>—</td></tr> <tr><td><code>--robot.port</code></td> <td>Serial port for the robot</td> <td>—</td></tr> <tr><td><code>--robot.cameras</code></td> <td>Camera configuration (JSON dict)</td> <td>—</td></tr> <tr><td><code>--fps</code></td> <td>Control loop frequency</td> <td>30</td></tr> <tr><td><code>--duration</code></td> <td>Run time in seconds (0 = infinite)</td> <td>0</td></tr> <tr><td><code>--device</code></td> <td>Torch device (<code>cpu</code>, <code>cuda</code>, <code>mps</code>)</td> <td>auto</td></tr> <tr><td><code>--task</code></td> <td>Task description (used when no dataset is provided)</td> <td>—</td></tr> <tr><td><code>--display_data</code></td> <td>Stream telemetry to Rerun visualization</td> <td>false</td></tr> <tr><td><code>--display_ip</code> / <code>--display_port</code></td> <td>Remote Rerun server address</td> <td>—</td></tr> <tr><td><code>--interpolation_multiplier</code></td> <td>Action interpolation factor</td> <td>1</td></tr> <tr><td><code>--use_torch_compile</code></td> <td>Enable <code>torch.compile</code> for inference</td> <td>false</td></tr> <tr><td><code>--resume</code></td> <td>Resume a previous recording session</td> <td>false</td></tr> <tr><td><code>--play_sounds</code></td> <td>Vocal synthesis for events</td> <td>true</td></tr></tbody></table> <hr> <h2 class="relative group"><a id="programmatic-usage" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#programmatic-usage"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Programmatic Usage</span></h2> <p data-svelte-h="svelte-1ecmesf">For custom deployments (e.g. with kinematics processors), use the rollout module API directly:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> lerobot.rollout <span class="hljs-keyword">import</span> BaseStrategyConfig, RolloutConfig, build_rollout_context | |
| <span class="hljs-keyword">from</span> lerobot.rollout.inference <span class="hljs-keyword">import</span> SyncInferenceConfig | |
| <span class="hljs-keyword">from</span> lerobot.rollout.strategies <span class="hljs-keyword">import</span> BaseStrategy | |
| <span class="hljs-keyword">from</span> lerobot.utils.process <span class="hljs-keyword">import</span> ProcessSignalHandler | |
| cfg = RolloutConfig( | |
| robot=my_robot_config, | |
| policy=my_policy_config, | |
| strategy=BaseStrategyConfig(), | |
| inference=SyncInferenceConfig(), | |
| fps=<span class="hljs-number">30</span>, | |
| duration=<span class="hljs-number">60</span>, | |
| task=<span class="hljs-string">"my task"</span>, | |
| ) | |
| signal_handler = ProcessSignalHandler(use_threads=<span class="hljs-literal">True</span>) | |
| ctx = build_rollout_context( | |
| cfg, | |
| signal_handler.shutdown_event, | |
| robot_action_processor=my_custom_action_processor, <span class="hljs-comment"># optional</span> | |
| robot_observation_processor=my_custom_obs_processor, <span class="hljs-comment"># optional</span> | |
| ) | |
| strategy = BaseStrategy(cfg.strategy) | |
| <span class="hljs-keyword">try</span>: | |
| strategy.setup(ctx) | |
| strategy.run(ctx) | |
| <span class="hljs-keyword">finally</span>: | |
| strategy.teardown(ctx)<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-a93r2w">See <code>examples/so100_to_so100_EE/rollout.py</code> and <code>examples/phone_to_so100/rollout.py</code> for full examples with kinematics processors.</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/lerobot/blob/main/docs/source/inference.mdx" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg> <span data-svelte-h="svelte-zjs2n5"><span class="underline">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_1nfgcr4 = { | |
| assets: "/docs/lerobot/pr_3413/en", | |
| base: "/docs/lerobot/pr_3413/en", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/lerobot/pr_3413/en/_app/immutable/entry/start.111f4248.js"), | |
| import("/docs/lerobot/pr_3413/en/_app/immutable/entry/app.0a57979a.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 27], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 45.6 kB
- Xet hash:
- 418875239f4723a529dade29e0eb8b1a19c4962a769e0062232949e9d8d0ba85
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.