Buckets:

hf-doc-build/doc-dev / lerobot /pr_4380 /en /inference.html
download
raw
77.5 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Policy Deployment (lerobot-rollout)&quot;,&quot;local&quot;:&quot;policy-deployment-lerobot-rollout&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Quick Start&quot;,&quot;local&quot;:&quot;quick-start&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Strategies&quot;,&quot;local&quot;:&quot;strategies&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Base ( --strategy.type=base )&quot;,&quot;local&quot;:&quot;base----strategytypebase-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Sentry ( --strategy.type=sentry )&quot;,&quot;local&quot;:&quot;sentry----strategytypesentry-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Highlight ( --strategy.type=highlight )&quot;,&quot;local&quot;:&quot;highlight----strategytypehighlight-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;DAgger ( --strategy.type=dagger )&quot;,&quot;local&quot;:&quot;dagger----strategytypedagger-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Episodic ( --strategy.type=episodic )&quot;,&quot;local&quot;:&quot;episodic----strategytypeepisodic-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Inference Backends&quot;,&quot;local&quot;:&quot;inference-backends&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Sync (default)&quot;,&quot;local&quot;:&quot;sync-default&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Real-Time Chunking ( --inference.type=rtc )&quot;,&quot;local&quot;:&quot;real-time-chunking----inferencetypertc-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Interactive Sessions&quot;,&quot;local&quot;:&quot;interactive-sessions&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Programmatic control&quot;,&quot;local&quot;:&quot;programmatic-control&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Common Flags&quot;,&quot;local&quot;:&quot;common-flags&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Cadence Reporting&quot;,&quot;local&quot;:&quot;cadence-reporting&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Programmatic Usage&quot;,&quot;local&quot;:&quot;programmatic-usage&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/>
<link href="/docs/lerobot/pr_4380/en/_app/immutable/entry/start.C4gmKXaF.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/tD4PF8kd.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/Bb-LL0eD.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/entry/app.D1VnIF1Z.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/CY-Wb_o3.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/Qz7K0-IZ.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/Cy2JwhB0.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/nodes/0.DA1ErOD4.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/DLds7x_i.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/nodes/12.CMSa2dGT.js" rel="modulepreload">
<link href="/docs/lerobot/pr_4380/en/_app/immutable/chunks/D65r_N1D.js" rel="modulepreload">
<!--br6948--><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Policy Deployment (lerobot-rollout)&quot;,&quot;local&quot;:&quot;policy-deployment-lerobot-rollout&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Quick Start&quot;,&quot;local&quot;:&quot;quick-start&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Strategies&quot;,&quot;local&quot;:&quot;strategies&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Base ( --strategy.type=base )&quot;,&quot;local&quot;:&quot;base----strategytypebase-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Sentry ( --strategy.type=sentry )&quot;,&quot;local&quot;:&quot;sentry----strategytypesentry-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Highlight ( --strategy.type=highlight )&quot;,&quot;local&quot;:&quot;highlight----strategytypehighlight-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;DAgger ( --strategy.type=dagger )&quot;,&quot;local&quot;:&quot;dagger----strategytypedagger-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Episodic ( --strategy.type=episodic )&quot;,&quot;local&quot;:&quot;episodic----strategytypeepisodic-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Inference Backends&quot;,&quot;local&quot;:&quot;inference-backends&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Sync (default)&quot;,&quot;local&quot;:&quot;sync-default&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Real-Time Chunking ( --inference.type=rtc )&quot;,&quot;local&quot;:&quot;real-time-chunking----inferencetypertc-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Interactive Sessions&quot;,&quot;local&quot;:&quot;interactive-sessions&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Programmatic control&quot;,&quot;local&quot;:&quot;programmatic-control&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Common Flags&quot;,&quot;local&quot;:&quot;common-flags&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Cadence Reporting&quot;,&quot;local&quot;:&quot;cadence-reporting&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Programmatic Usage&quot;,&quot;local&quot;:&quot;programmatic-usage&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/><!---->
<link href="/docs/lerobot/pr_4380/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><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> <!--[-1--><!--]--></div><!----> <!--[0--><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 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><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> <!--[1--><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 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>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 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="language-bash "><!---->lerobot-rollout \
--strategy.type=base \
--policy.path=lerobot/act_koch_real \
--robot.type=koch_follower \
--robot.port=/dev/ttyACM0 \
--task=<span class="hljs-string">&quot;pick up cube&quot;</span> \
--duration=30<!----></pre></div><!----> <p>This runs the policy for 30 seconds with no recording.</p> <hr/> <!--[1--><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 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>Select a strategy with <code>--strategy.type=&lt;name></code>. Each strategy defines a different control loop with its own recording and interaction semantics.</p> <!--[2--><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 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>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 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="language-bash "><!---->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">&quot;{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}&quot;</span> \
--task=<span class="hljs-string">&quot;Put lego brick into the box&quot;</span> \
--duration=60<!----></pre></div><!----> <table><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> <!--[2--><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 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>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>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 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="language-bash "><!---->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">&quot;{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}&quot;</span> \
--dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_eval_data \
--dataset.single_task=<span class="hljs-string">&quot;Put lego brick into the box&quot;</span> \
--duration=3600<!----></pre></div><!----> <table><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> <!--[2--><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 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>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 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="language-bash "><!---->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">&quot;Pick up the red cube&quot;</span><!----></pre></div><!----> <p><strong>Keyboard controls:</strong></p> <table><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><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> <!--[2--><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 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>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>See the <a href="./hil_data_collection">Human-In-the-Loop Data Collection</a> guide for a detailed walkthrough.</p> <p><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 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="language-bash "><!---->lerobot-rollout \
--strategy.type=dagger \
--strategy.num_episodes=20 \
--policy.path=outputs/pretrain/checkpoints/last/pretrained_model \
--robot.type=bi_openarm_follower \
--teleop.type=bi_openarm_mini \
--dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_hil_data \
--dataset.single_task=<span class="hljs-string">&quot;Fold the T-shirt&quot;</span><!----></pre></div><!----> <p><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 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="language-bash "><!---->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">&quot;Grasp the block&quot;</span><!----></pre></div><!----> <p><strong>Keyboard controls</strong> (default input device):</p> <table><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>Foot pedal input is also supported via <code>--strategy.input_device=pedal</code>. Configure pedal codes with <code>--strategy.pedal.*</code> flags.</p> <table><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>--strategy.smooth_handover</code></td><td>Smoothly hand control over at pause / correction start (default: true). Disable for clutch-style teleops that re-reference at the current robot pose on engage</td></tr><tr><td><code>--teleop.type</code></td><td><strong>Required.</strong> Teleoperator type</td></tr></tbody></table> <!--[2--><h3 class="relative group"><a id="episodic----strategytypeepisodic-" 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="#episodic----strategytypeepisodic-"><span><svg 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>Episodic ( --strategy.type=episodic )</span></h3><!--]--><!----> <p>Episode-oriented recording that mirrors the behavior of <code>lerobot-record</code>. The policy drives the robot for each episode; an optional teleoperator can drive the robot during the reset phase 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 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="language-bash "><!---->lerobot-rollout \
--strategy.type=episodic \
--policy.path=<span class="hljs-variable">${HF_USER}</span>/my_policy \
--robot.type=so100_follower \
--robot.port=/dev/ttyACM0 \
--teleop.type=so100_leader \
--teleop.port=/dev/ttyACM1 \
--dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/my_eval_data \
--dataset.num_episodes=20 \
--dataset.episode_time_s=30 \
--dataset.reset_time_s=10 \
--dataset.single_task=<span class="hljs-string">&quot;Pick up the red cube&quot;</span><!----></pre></div><!----> <p>Teleop is optional — if omitted the robot holds its position during the reset phase.</p> <p><strong>Keyboard controls:</strong></p> <table><thead><tr><th>Key</th><th>Action</th></tr></thead><tbody><tr><td><code></code> (right)</td><td>End the current episode early</td></tr><tr><td><code></code> (left)</td><td>Discard episode and re-record it</td></tr><tr><td><code>ESC</code></td><td>Stop the recording session</td></tr></tbody></table> <table><thead><tr><th>Flag</th><th>Description</th></tr></thead><tbody><tr><td><code>--dataset.num_episodes</code></td><td>Number of episodes to record</td></tr><tr><td><code>--dataset.episode_time_s</code></td><td>Duration of each recording episode in seconds</td></tr><tr><td><code>--dataset.reset_time_s</code></td><td>Duration of the reset phase between episodes in seconds</td></tr><tr><td><code>--teleop.type</code></td><td>Optional. Teleoperator to drive the robot during resets</td></tr><tr><td><code>--strategy.reset_to_initial_position</code></td><td>Whether to reset the robot to its initial position between episodes</td></tr><tr><td><code>--strategy.smooth_leader_to_follower_handover</code></td><td>Whether to turn on or off the leader -> follower smooth handover behavior.</td></tr><tr><td><code>--strategy.smooth_handover</code></td><td>Smoothly hand control to the teleop at reset start (default: true). Disable for clutch-style teleops that re-reference at the current robot pose on engage</td></tr></tbody></table> <hr/> <!--[1--><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 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>Select a backend with <code>--inference.type=&lt;name></code>. All strategies work with both backends.</p> <!--[2--><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 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>One policy call per control tick. The main loop blocks until the action is computed.</p> <p>Works with all policies. No extra flags needed.</p> <!--[2--><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 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>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>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 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="language-bash "><!---->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">&quot;{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}&quot;</span> \
--task=<span class="hljs-string">&quot;Pick up the cube&quot;</span> \
--duration=60 \
--device=cuda<!----></pre></div><!----> <table><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>See the <a href="./rtc">Real-Time Chunking</a> guide for details on tuning RTC parameters.</p> <hr/> <!--[1--><h2 class="relative group"><a id="interactive-sessions" 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="#interactive-sessions"><span><svg 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>Interactive Sessions</span></h2><!--]--><!----> <p>Add <code>--interactive=true</code> to drive the rollout from the terminal instead of starting immediately. Hardware connects and the policy loads as usual, but <strong>the robot stays still until you type <code>/start</code></strong> — useful when you want to position the scene first, re-instruct the policy between attempts, or run several takes without paying the load time again.</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 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="language-bash "><!---->lerobot-rollout \
--strategy.type=base \
--policy.path=<span class="hljs-variable">${HF_USER}</span>/my_smolvla_policy \
--robot.type=so100_follower \
--robot.port=/dev/ttyACM0 \
--robot.cameras=<span class="hljs-string">&quot;{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}&quot;</span> \
--task=<span class="hljs-string">&quot;pick up the cube&quot;</span> \
--interactive=<span class="hljs-literal">true</span><!----></pre></div><!----> <table><thead><tr><th>Command</th><th>Action</th></tr></thead><tbody><tr><td><code>/start</code></td><td>Start (or restart) the policy control loop</td></tr><tr><td><code>/subtask &lt;text></code></td><td>Change the instruction the policy follows, without stopping. No argument prints the current task. Only affects policies that condition on language (SmolVLA, π0/π0.5, and similar)</td></tr><tr><td><code>/vqa &lt;text></code></td><td>Ask the policy a question about what it currently sees. Only while a run is in progress, and only for policies with a text head</td></tr><tr><td><code>/autosteer &lt;goal></code></td><td>Hand the policy a high-level goal and let it choose its own subtasks. <code>/autosteer off</code> hands control back; no argument reports the current goal</td></tr><tr><td><code>/reset</code></td><td>Stop movement, return the robot to its startup position, and restore the <code>--task</code> instruction</td></tr><tr><td><code>/stop</code></td><td>End the session and run the normal shutdown routines</td></tr><tr><td><code>/help</code></td><td>List the commands</td></tr></tbody></table> <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 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="language-text "><!---->&gt; /start
Rollout running — task &#x27;pick up the cube&#x27;. /subtask &lt;text&gt; to change it, ...
&gt; /subtask put the cube in the box
Task: &#x27;pick up the cube&#x27;&#x27;put the cube in the box&#x27; (applies from the next policy inference)
&gt; /vqa is the cube inside the box?
Asked: &#x27;is the cube inside the box?&#x27; — answering from the next observation...
Q: is the cube inside the box?
A: No — the cube is on the table to the left of the box.
&gt; /reset
Task restored to &#x27;pick up the cube&#x27;
Resetting — returning the robot to its initial position...
Robot reset — holding at initial position. /start to run.
&gt; /stop<!----></pre></div><!----> <p>Lines starting with <code>></code> are what you type; the session renders no prompt of its own.</p> <p><code>Ctrl-C</code> still shuts down as usual, and closing stdin (<code>Ctrl-D</code>, or the end of a piped script) ends the session — so a piped script must keep stdin open for the intended duration:</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 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="language-bash "><!---->(<span class="hljs-built_in">printf</span> <span class="hljs-string">&#x27;/start\n&#x27;</span>; <span class="hljs-built_in">sleep</span> 60; <span class="hljs-built_in">printf</span> <span class="hljs-string">&#x27;/stop\n&#x27;</span>) | lerobot-rollout ... --interactive=<span class="hljs-literal">true</span><!----></pre></div><!----> <p><strong><code>/subtask</code></strong> applies from the next inference. With <code>--inference.type=sync</code> the precomputed chunk actions are dropped, so the switch lands on the next control tick; with <code>rtc</code> the new chunk is blended over the previous chunk’s leftover prefix, so it lands within one inference and the motion stays continuous (with <code>--inference.rtc.enabled=false</code> the queued chunk drains first, delaying the switch by up to one chunk).</p> <p>With <code>--use_torch_compile=true</code>, an instruction that tokenizes to a different length can trigger a recompilation, pausing inference for as long as the original warm-up took — leave compilation off if you expect to re-instruct often.</p> <p><code>/vqa</code> and <code>/autosteer</code> need a policy with a text head (an implementation of <code>PreTrainedPolicy.generate_text()</code>); no built-in LeRobot policy ships one yet, so both commands are refused unless yours does.</p> <p><strong><code>/vqa</code></strong> answers from the next observation and prints when ready, so you can keep typing meanwhile; only one question is in flight at a time (autosteer’s own queries share that slot). Text generation is far slower than a control tick, so the robot drains its queued actions and then holds position until the answer lands, and that time counts against <code>--duration</code>. Questions are only accepted while a run is in progress — an idle engine has no current view — and one still unanswered when a segment ends is dropped and reported.</p> <p><strong><code>/autosteer</code></strong> hands the policy a goal and asks it for the next subtask every <code>--autosteer_interval_s</code> seconds (default 10), applying each one through the same path as <code>/subtask</code> and announcing it in the chat. Every query is a full text generation, so the interval is a cost knob: lower values re-plan sooner but spend more of the loop generating text instead of acting. Plan progress lives in the policy, not the rollout, so the plan dies with the segment; the sequencer also stops on <code>/reset</code>, <code>/subtask</code>, <code>/autosteer off</code>, and the first planning failure.</p> <p><strong>Logs below ERROR are muted while the session runs</strong> so routine output doesn’t interleave with what you’re typing; errors and fatal inference failures still show, and normal logging resumes when the session ends. The <a href="#cadence-reporting">cadence summaries</a> are printed in the chat instead, and running without <code>--interactive</code> gets you the live log back.</p> <p>Sessions work over SSH and on headless machines — no display server needed.</p> <p><strong>Recording while interactive.</strong> <code>--strategy.type=sentry</code> also accepts <code>--interactive=true</code> and records continuously while you steer: each <code>/start</code><code>/reset</code> segment saves complete episodes plus one final partial episode, and the dataset stays open until shutdown. Frames carry the task provenance of the action actually sent, so actions already queued or interpolated under the old task keep the old label.</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 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="language-bash "><!---->lerobot-rollout \
--strategy.type=sentry \
--policy.path=<span class="hljs-variable">${HF_USER}</span>/my_smolvla_policy \
--robot.type=so100_follower \
--robot.port=/dev/ttyACM0 \
--dataset.repo_id=<span class="hljs-variable">${HF_USER}</span>/rollout_cube_sessions \
--task=<span class="hljs-string">&quot;pick up the cube&quot;</span> \
--interactive=<span class="hljs-literal">true</span><!----></pre></div><!----> <p>The other recording strategies (episodic, DAgger, highlight) are not supported: they bind their own keyboard controls and finalize the dataset when <code>run()</code> exits, so they cannot be restarted segment by segment.</p> <!--[2--><h3 class="relative group"><a id="programmatic-control" 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-control"><span><svg 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 control</span></h3><!--]--><!----> <p><code>RolloutController</code> exposes the same operations as a library API — thread-safe <code>start()</code> / <code>reset()</code> / <code>stop()</code> / <code>set_task()</code> plus a <code>RolloutEvent</code> callback, with no stdin, printing or log muting attached:</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 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="language-python "><!----><span class="hljs-keyword">from</span> threading <span class="hljs-keyword">import</span> Event, Thread
<span class="hljs-keyword">from</span> lerobot.rollout <span class="hljs-keyword">import</span> (
LinkedEvent,
RolloutController,
RolloutEvent,
build_rollout_context,
create_strategy,
)
parent = Event() <span class="hljs-comment"># your application&#x27;s shutdown signal</span>
ctx = build_rollout_context(cfg, LinkedEvent(parent)) <span class="hljs-comment"># loads policy, connects robot</span>
strategy = create_strategy(cfg.strategy)
strategy.setup(ctx)
controller = RolloutController(strategy, ctx, on_event=<span class="hljs-built_in">print</span>) <span class="hljs-comment"># or your own observer</span>
serve_thread = Thread(target=controller.serve) <span class="hljs-comment"># serve() blocks; run it where you like</span>
serve_thread.start()
controller.start() <span class="hljs-comment"># robot starts executing the policy</span>
controller.set_task(<span class="hljs-string">&quot;grab the red cube&quot;</span>) <span class="hljs-comment"># re-instruct mid-run</span>
controller.reset() <span class="hljs-comment"># stop movement, return home, stay warm</span>
controller.stop() <span class="hljs-comment"># end serve()</span>
serve_thread.join()
strategy.teardown(ctx) <span class="hljs-comment"># teardown stays with the caller</span><!----></pre></div><!----> <p><code>RolloutController</code> requires the context’s shutdown event to be a <code>LinkedEvent</code>, built as above: the controller ends run segments through its local flag, while your <code>parent</code> event still forces a full shutdown. Set <code>play_sounds=False</code> unless you want the vocal announcements.</p> <hr/> <!--[1--><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 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><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>Policy inference and dataset recording frequency</td><td>30</td></tr><tr><td><code>--duration</code></td><td>Run time in seconds (0 = infinite; per segment if interactive)</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>Robot commands per policy action (control at <code>fps × N</code> Hz)</td><td>1</td></tr><tr><td><code>--interactive</code></td><td>Chat session on stdin; robot idles until <code>/start</code> (base, sentry)</td><td>false</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/> <!--[1--><h2 class="relative group"><a id="cadence-reporting" 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="#cadence-reporting"><span><svg 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>Cadence Reporting</span></h2><!--]--><!----> <p>Every strategy reports what its control loop actually achieved, as do <code>lerobot-record</code>, <code>lerobot-teleoperate</code> and <code>lerobot-replay</code> — they all pace through the same timer. Each saved episode gets a one-line digest, and when the loop ends — including on <code>Ctrl-C</code> — a block covering the whole run:</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 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=" "><!----><span class="hljs-attribute">Cadence</span> (episode <span class="hljs-number">1</span>): <span class="hljs-number">29</span>.<span class="hljs-number">84</span> Hz policy vs <span class="hljs-number">30</span> Hz target · <span class="hljs-number">1200</span> ticks, <span class="hljs-number">20</span>.<span class="hljs-number">1</span> s measured · <span class="hljs-number">6</span>/<span class="hljs-number">598</span> cycles over the <span class="hljs-number">33</span>.<span class="hljs-number">3</span> ms budget (work mean <span class="hljs-number">18</span>.<span class="hljs-number">7</span> ms, worst <span class="hljs-number">48</span>.<span class="hljs-number">1</span> ms)
<span class="hljs-attribute">Cadence</span> (episode <span class="hljs-number">2</span>): <span class="hljs-number">29</span>.<span class="hljs-number">84</span> Hz policy vs <span class="hljs-number">30</span> Hz target · <span class="hljs-number">1200</span> ticks, <span class="hljs-number">20</span>.<span class="hljs-number">1</span> s measured · <span class="hljs-number">6</span>/<span class="hljs-number">599</span> cycles over the <span class="hljs-number">33</span>.<span class="hljs-number">3</span> ms budget (work mean <span class="hljs-number">18</span>.<span class="hljs-number">7</span> ms, worst <span class="hljs-number">48</span>.<span class="hljs-number">1</span> ms)
<span class="hljs-attribute">Cadence</span> summary — whole run, <span class="hljs-number">2</span> episodes · target <span class="hljs-number">30</span> Hz × <span class="hljs-number">2</span> (<span class="hljs-number">16</span>.<span class="hljs-number">7</span> ms tick slot, <span class="hljs-number">33</span>.<span class="hljs-number">3</span> ms cycle budget): <span class="hljs-number">2400</span> ticks, <span class="hljs-number">1197</span> cycles judged
<span class="hljs-attribute">effective</span> cadence: <span class="hljs-number">29</span>.<span class="hljs-number">84</span> Hz policy / <span class="hljs-number">59</span>.<span class="hljs-number">67</span> Hz commands over <span class="hljs-number">40</span>.<span class="hljs-number">2</span> s measured
<span class="hljs-attribute">cycles</span> over the <span class="hljs-number">33</span>.<span class="hljs-number">3</span> ms work budget: <span class="hljs-number">12</span>/<span class="hljs-number">1197</span> (<span class="hljs-number">1</span>.<span class="hljs-number">0</span>%) — work mean <span class="hljs-number">18</span>.<span class="hljs-number">7</span> ms, worst <span class="hljs-number">48</span>.<span class="hljs-number">1</span> ms
<span class="hljs-attribute">ticks</span> over their <span class="hljs-number">16</span>.<span class="hljs-number">7</span> ms slot: <span class="hljs-number">40</span>/<span class="hljs-number">2400</span> (costs interpolation smoothness only)
<span class="hljs-attribute">loop</span>-body steps (share of measured work):
<span class="hljs-attribute">observe</span> mean <span class="hljs-number">3</span>.<span class="hljs-number">13</span> ms · worst <span class="hljs-number">9</span>.<span class="hljs-number">00</span> ms · <span class="hljs-number">31</span>.<span class="hljs-number">7</span>% of work · <span class="hljs-number">2400</span> calls
<span class="hljs-attribute">process_obs</span> mean <span class="hljs-number">0</span>.<span class="hljs-number">50</span> ms · worst <span class="hljs-number">1</span>.<span class="hljs-number">00</span> ms · <span class="hljs-number">5</span>.<span class="hljs-number">1</span>% of work · <span class="hljs-number">2400</span> calls
<span class="hljs-attribute">infer</span> mean <span class="hljs-number">5</span>.<span class="hljs-number">18</span> ms · worst <span class="hljs-number">40</span>.<span class="hljs-number">00</span> ms · <span class="hljs-number">52</span>.<span class="hljs-number">4</span>% of work · <span class="hljs-number">2400</span> calls
<span class="hljs-attribute">send</span> mean <span class="hljs-number">0</span>.<span class="hljs-number">40</span> ms · worst <span class="hljs-number">0</span>.<span class="hljs-number">40</span> ms · <span class="hljs-number">4</span>.<span class="hljs-number">1</span>% of work · <span class="hljs-number">2400</span> calls
<span class="hljs-attribute">record</span> mean <span class="hljs-number">0</span>.<span class="hljs-number">67</span> ms · worst <span class="hljs-number">620</span>.<span class="hljs-number">00</span> ms · <span class="hljs-number">6</span>.<span class="hljs-number">8</span>% of work · <span class="hljs-number">2402</span> calls
<span class="hljs-attribute">pacing</span> headroom: <span class="hljs-number">7</span>.<span class="hljs-number">4</span> ms slept per tick <span class="hljs-literal">on</span> average (max <span class="hljs-number">13</span>.<span class="hljs-number">0</span> ms) — near zero means the loop is saturated<!----></pre></div><!----> <p>Read it top-down: <strong>effective cadence</strong> is what you got against <code>--fps</code>, <strong>cycles over budget</strong> is how often the loop could not hold it, the <strong>step breakdown</strong> says where the time went, and <strong>pacing headroom</strong> near zero means there is nothing left to absorb a slow tick. A high <code>infer</code> share points at the policy or the device; a high <code>observe</code> share points at the cameras. A step’s <code>worst</code> far above its <code>mean</code> is a one-off — above, <code>record</code> is 0.67 ms per frame and the 620 ms outlier is the blocking <code>save_episode</code> that closed an episode.</p> <p>A <em>cycle</em> here is one policy action’s worth of ticks (<code>--interpolation_multiplier</code> of them). Only whole cycles over the <code>1/fps</code> budget can cost you frames; a single tick overrunning its slot only makes the interpolated motion less smooth, which is why the two are counted separately. Without interpolation a cycle is a single tick, so the report drops the distinction and counts ticks throughout.</p> <p>In <a href="#interactive-sessions">interactive sessions</a> each <code>/start</code> segment owns its own timer, so the report lands in the chat once per segment (<code>/reset</code>, <code>/stop</code>, or <code>--duration</code>) rather than once per process.</p> <hr/> <!--[1--><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 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>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 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="language-python "><!----><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">&quot;my task&quot;</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)<!----></pre></div><!----> <p>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><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]-->
<script>
{
__sveltekit_1ed7qc6 = {
base: "/docs/lerobot/pr_4380/en",
assets: "/docs/lerobot/pr_4380/en"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/docs/lerobot/pr_4380/en/_app/immutable/entry/start.C4gmKXaF.js"),
import("/docs/lerobot/pr_4380/en/_app/immutable/entry/app.D1VnIF1Z.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 12],
data: [null,null],
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
77.5 kB
·
Xet hash:
118b6c4bb0b904a802050fd2ce39b1cb9892d24420e858e8bc1f703db5b212e9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.