import{s as ul,o as hl,n as gt}from"../chunks/scheduler.eb244325.js";import{S as yl,i as dl,e as c,s as i,c as h,h as ml,a as p,d as l,b as a,f as pl,g as y,j as u,k as W,l as wl,m as n,n as d,t as m,o as w,p as T,q as Tl,r as Jl}from"../chunks/index.3fe63ad3.js";import{T as fl}from"../chunks/Tip.8a9a4ce7.js";import{C as bl}from"../chunks/CopyLLMTxtMenu.08242e11.js";import{C as fe}from"../chunks/CodeBlock.91baa5b4.js";import{H as k,E as jl}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.234c3f85.js";import{H as Ml,a as vt}from"../chunks/HfOption.0914e9f3.js";function Ul(b){let s,M;return s=new fe({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5wb2xpY3lfc2VydmVyJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIwLS1ob3N0JTNEMTI3LjAuMC4xJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIwLS1wb3J0JTNEODA4MA==",highlighted:`python -m lerobot.async_inference.policy_server \\
     --host=127.0.0.1 \\
     --port=8080`,wrap:!1}}),{c(){h(s.$$.fragment)},l(o){y(s.$$.fragment,o)},m(o,J){d(s,o,J),M=!0},p:gt,i(o){M||(m(s.$$.fragment,o),M=!0)},o(o){w(s.$$.fragment,o),M=!1},d(o){T(s,o)}}}function Il(b){let s,M;return s=new fe({props:{code:"ZnJvbSUyMGxlcm9ib3QuYXN5bmNfaW5mZXJlbmNlLmNvbmZpZ3MlMjBpbXBvcnQlMjBQb2xpY3lTZXJ2ZXJDb25maWclMEFmcm9tJTIwbGVyb2JvdC5hc3luY19pbmZlcmVuY2UucG9saWN5X3NlcnZlciUyMGltcG9ydCUyMHNlcnZlJTBBJTBBY29uZmlnJTIwJTNEJTIwUG9saWN5U2VydmVyQ29uZmlnKCUwQSUyMCUyMCUyMCUyMGhvc3QlM0QlMjJsb2NhbGhvc3QlMjIlMkMlMEElMjAlMjAlMjAlMjBwb3J0JTNEODA4MCUyQyUwQSklMEFzZXJ2ZShjb25maWcp",highlighted:`<span class="hljs-keyword">from</span> lerobot.async_inference.configs <span class="hljs-keyword">import</span> PolicyServerConfig
<span class="hljs-keyword">from</span> lerobot.async_inference.policy_server <span class="hljs-keyword">import</span> serve

config = PolicyServerConfig(
    host=<span class="hljs-string">&quot;localhost&quot;</span>,
    port=<span class="hljs-number">8080</span>,
)
serve(config)`,wrap:!1}}),{c(){h(s.$$.fragment)},l(o){y(s.$$.fragment,o)},m(o,J){d(s,o,J),M=!0},p:gt,i(o){M||(m(s.$$.fragment,o),M=!0)},o(o){w(s.$$.fragment,o),M=!1},d(o){T(s,o)}}}function vl(b){let s,M,o,J;return s=new vt({props:{id:"start_policy_server",option:"Command",$$slots:{default:[Ul]},$$scope:{ctx:b}}}),o=new vt({props:{id:"start_policy_server",option:"API example",$$slots:{default:[Il]},$$scope:{ctx:b}}}),{c(){h(s.$$.fragment),M=i(),h(o.$$.fragment)},l(r){y(s.$$.fragment,r),M=a(r),y(o.$$.fragment,r)},m(r,f){d(s,r,f),n(r,M,f),d(o,r,f),J=!0},p(r,f){const j={};f&2&&(j.$$scope={dirty:f,ctx:r}),s.$set(j);const U={};f&2&&(U.$$scope={dirty:f,ctx:r}),o.$set(U)},i(r){J||(m(s.$$.fragment,r),m(o.$$.fragment,r),J=!0)},o(r){w(s.$$.fragment,r),w(o.$$.fragment,r),J=!1},d(r){r&&l(M),T(s,r),T(o,r)}}}function gl(b){let s,M;return s=new fe({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5yb2JvdF9jbGllbnQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNlcnZlcl9hZGRyZXNzJTNEMTI3LjAuMC4xJTNBODA4MCUyMCU1QyUyMCUyMyUyMFNFUlZFUiUzQSUyMHRoZSUyMGhvc3QlMjBhZGRyZXNzJTIwYW5kJTIwcG9ydCUyMG9mJTIwdGhlJTIwcG9saWN5JTIwc2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pemVfdGhyZXNob2xkJTNEMC41JTIwJTVDJTIwJTIzJTIwQ0xJRU5UJTNBJTIwdGhlJTIwdGhyZXNob2xkJTIwZm9yJTIwdGhlJTIwY2h1bmslMjBzaXplJTIwYmVmb3JlJTIwc2VuZGluZyUyMGElMjBuZXclMjBvYnNlcnZhdGlvbiUyMHRvJTIwdGhlJTIwc2VydmVyJTBBJTIwJTIwJTIwJTIwLS1hZ2dyZWdhdGVfZm5fbmFtZSUzRHdlaWdodGVkX2F2ZXJhZ2UlMjAlNUMlMjAlMjMlMjBDTElFTlQlM0ElMjB0aGUlMjBmdW5jdGlvbiUyMHRvJTIwYWdncmVnYXRlJTIwYWN0aW9ucyUyMG9uJTIwb3ZlcmxhcHBpbmclMjBwb3J0aW9ucyUwQSUyMCUyMCUyMCUyMC0tZGVidWdfdmlzdWFsaXplX3F1ZXVlX3NpemUlM0RUcnVlJTIwJTIzJTIwQ0xJRU5UJTNBJTIwd2hldGhlciUyMHRvJTIwdmlzdWFsaXplJTIwdGhlJTIwcXVldWUlMjBzaXplJTIwYXQlMjBydW50aW1l",highlighted:`python -m lerobot.async_inference.robot_client \\
    --server_address=127.0.0.1:8080 \\ <span class="hljs-comment"># SERVER: the host address and port of the policy server</span>
    --robot.type=so100_follower \\ <span class="hljs-comment"># ROBOT: your robot type</span>
    --robot.port=/dev/tty.usbmodem585A0076841 \\ <span class="hljs-comment"># ROBOT: your robot port</span>
    --robot.id=follower_so100 \\ <span class="hljs-comment"># ROBOT: your robot id, to load calibration file</span>
    --robot.cameras=<span class="hljs-string">&quot;{ laptop: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30}, phone: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30}}&quot;</span> \\ <span class="hljs-comment"># POLICY: the cameras used to acquire frames, with keys matching the keys expected by the policy</span>
    --task=<span class="hljs-string">&quot;dummy&quot;</span> \\ <span class="hljs-comment"># POLICY: The task to run the policy on (\`Fold my t-shirt\`). Not necessarily defined for all policies, such as \`act\`</span>
    --policy_type=your_policy_type \\ <span class="hljs-comment"># POLICY: the type of policy to run (smolvla, act, etc)</span>
    --pretrained_name_or_path=user/model \\ <span class="hljs-comment"># POLICY: the model name/path on server to the checkpoint to run (e.g., lerobot/smolvla_base)</span>
    --policy_device=mps \\ <span class="hljs-comment"># POLICY: the device to run the policy on, on the server</span>
    --actions_per_chunk=50 \\ <span class="hljs-comment"># POLICY: the number of actions to output at once</span>
    --chunk_size_threshold=0.5 \\ <span class="hljs-comment"># CLIENT: the threshold for the chunk size before sending a new observation to the server</span>
    --aggregate_fn_name=weighted_average \\ <span class="hljs-comment"># CLIENT: the function to aggregate actions on overlapping portions</span>
    --debug_visualize_queue_size=True <span class="hljs-comment"># CLIENT: whether to visualize the queue size at runtime</span>`,wrap:!1}}),{c(){h(s.$$.fragment)},l(o){y(s.$$.fragment,o)},m(o,J){d(s,o,J),M=!0},p:gt,i(o){M||(m(s.$$.fragment,o),M=!0)},o(o){w(s.$$.fragment,o),M=!1},d(o){T(s,o)}}}function Bl(b){let s,M;return s=new fe({props:{code:"aW1wb3J0JTIwdGhyZWFkaW5nJTBBZnJvbSUyMGxlcm9ib3Qucm9ib3RzLnNvMTAwX2ZvbGxvd2VyJTIwaW1wb3J0JTIwU08xMDBGb2xsb3dlckNvbmZpZyUwQWZyb20lMjBsZXJvYm90LmNhbWVyYXMub3BlbmN2LmNvbmZpZ3VyYXRpb25fb3BlbmN2JTIwaW1wb3J0JTIwT3BlbkNWQ2FtZXJhQ29uZmlnJTBBZnJvbSUyMGxlcm9ib3QuYXN5bmNfaW5mZXJlbmNlLmNvbmZpZ3MlMjBpbXBvcnQlMjBSb2JvdENsaWVudENvbmZpZyUwQWZyb20lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5yb2JvdF9jbGllbnQlMjBpbXBvcnQlMjBSb2JvdENsaWVudCUwQWZyb20lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5oZWxwZXJzJTIwaW1wb3J0JTI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jBTdGFydCUyMGFjdGlvbiUyMHJlY2VpdmVyJTIwdGhyZWFkJTBBJTIwJTIwJTIwJTIwYWN0aW9uX3JlY2VpdmVyX3RocmVhZCUyMCUzRCUyMHRocmVhZGluZy5UaHJlYWQodGFyZ2V0JTNEY2xpZW50LnJlY2VpdmVfYWN0aW9ucyUyQyUyMGRhZW1vbiUzRFRydWUpJTBBJTIwJTIwJTIwJTIwYWN0aW9uX3JlY2VpdmVyX3RocmVhZC5zdGFydCgpJTBBJTBBJTIwJTIwJTIwJTIwdHJ5JTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwUnVuJTIwdGhlJTIwY29udHJvbCUyMGxvb3AlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjbGllbnQuY29udHJvbF9sb29wKHRhc2spJTBBJTIwJTIwJTIwJTIwZXhjZXB0JTIwS2V5Ym9hcmRJbnRlcnJ1cHQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjbGllbnQuc3RvcCgpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYWN0aW9uX3JlY2VpdmVyX3RocmVhZC5qb2luKCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAoT3B0aW9uYWxseSklMjBwbG90JTIwdGhlJTIwYWN0aW9uJTIwcXVldWUlMjBzaXplJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdmlzdWFsaXplX2FjdGlvbl9xdWV1ZV9zaXplKGNsaWVudC5hY3Rpb25fcXVldWVfc2l6ZSk=",highlighted:`<span class="hljs-keyword">import</span> threading
<span class="hljs-keyword">from</span> lerobot.robots.so100_follower <span class="hljs-keyword">import</span> SO100FollowerConfig
<span class="hljs-keyword">from</span> lerobot.cameras.opencv.configuration_opencv <span class="hljs-keyword">import</span> OpenCVCameraConfig
<span class="hljs-keyword">from</span> lerobot.async_inference.configs <span class="hljs-keyword">import</span> RobotClientConfig
<span class="hljs-keyword">from</span> lerobot.async_inference.robot_client <span class="hljs-keyword">import</span> RobotClient
<span class="hljs-keyword">from</span> lerobot.async_inference.helpers <span class="hljs-keyword">import</span> visualize_action_queue_size

<span class="hljs-comment"># 1. Create the robot instance</span>
<span class="hljs-string">&quot;&quot;&quot;Check out the cameras available in your setup by running \`python lerobot/find_cameras.py\`&quot;&quot;&quot;</span>
<span class="hljs-comment"># these cameras must match the ones expected by the policy</span>
<span class="hljs-comment"># check the config.json on the Hub for the policy you are using</span>
camera_cfg = {
    <span class="hljs-string">&quot;top&quot;</span>: OpenCVCameraConfig(index_or_path=<span class="hljs-number">0</span>, width=<span class="hljs-number">640</span>, height=<span class="hljs-number">480</span>, fps=<span class="hljs-number">30</span>),
    <span class="hljs-string">&quot;side&quot;</span>: OpenCVCameraConfig(index_or_path=<span class="hljs-number">1</span>, width=<span class="hljs-number">640</span>, height=<span class="hljs-number">480</span>, fps=<span class="hljs-number">30</span>)
}

robot_cfg = SO100FollowerConfig(
  port=<span class="hljs-string">&quot;/dev/tty.usbmodem585A0076841&quot;</span>,
  <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;follower_so100&quot;</span>,
  cameras=camera_cfg
)

<span class="hljs-comment"># 3. Create client configuration</span>
client_cfg = RobotClientConfig(
    robot=robot_cfg,
    server_address=<span class="hljs-string">&quot;localhost:8080&quot;</span>,
    policy_device=<span class="hljs-string">&quot;mps&quot;</span>,
    policy_type=<span class="hljs-string">&quot;smolvla&quot;</span>,
    pretrained_name_or_path=<span class="hljs-string">&quot;fracapuano/smolvla_async&quot;</span>,
    chunk_size_threshold=<span class="hljs-number">0.5</span>,
    actions_per_chunk=<span class="hljs-number">50</span>,  <span class="hljs-comment"># make sure this is less than the max actions of the policy</span>
)

<span class="hljs-comment"># 4. Create and start client</span>
client = RobotClient(client_cfg)

<span class="hljs-comment"># 5. Specify the task</span>
task = <span class="hljs-string">&quot;Don&#x27;t do anything, stay still&quot;</span>

<span class="hljs-keyword">if</span> client.start():
    <span class="hljs-comment"># Start action receiver thread</span>
    action_receiver_thread = threading.Thread(target=client.receive_actions, daemon=<span class="hljs-literal">True</span>)
    action_receiver_thread.start()

    <span class="hljs-keyword">try</span>:
        <span class="hljs-comment"># Run the control loop</span>
        client.control_loop(task)
    <span class="hljs-keyword">except</span> KeyboardInterrupt:
        client.stop()
        action_receiver_thread.join()
        <span class="hljs-comment"># (Optionally) plot the action queue size</span>
        visualize_action_queue_size(client.action_queue_size)`,wrap:!1}}),{c(){h(s.$$.fragment)},l(o){y(s.$$.fragment,o)},m(o,J){d(s,o,J),M=!0},p:gt,i(o){M||(m(s.$$.fragment,o),M=!0)},o(o){w(s.$$.fragment,o),M=!1},d(o){T(s,o)}}}function Cl(b){let s,M,o,J;return s=new vt({props:{id:"start_robot_client",option:"Command",$$slots:{default:[gl]},$$scope:{ctx:b}}}),o=new vt({props:{id:"start_robot_client",option:"API example",$$slots:{default:[Bl]},$$scope:{ctx:b}}}),{c(){h(s.$$.fragment),M=i(),h(o.$$.fragment)},l(r){y(s.$$.fragment,r),M=a(r),y(o.$$.fragment,r)},m(r,f){d(s,r,f),n(r,M,f),d(o,r,f),J=!0},p(r,f){const j={};f&2&&(j.$$scope={dirty:f,ctx:r}),s.$set(j);const U={};f&2&&(U.$$scope={dirty:f,ctx:r}),o.$set(U)},i(r){J||(m(s.$$.fragment,r),m(o.$$.fragment,r),J=!0)},o(r){w(s.$$.fragment,r),w(o.$$.fragment,r),J=!1},d(r){r&&l(M),T(s,r),T(o,r)}}}function Gl(b){let s;return{c(){s=Tl("Different values of `actions_per_chunk` and `chunk_size_threshold` do result\n  in different behaviours.")},l(M){s=Jl(M,"Different values of `actions_per_chunk` and `chunk_size_threshold` do result\n  in different behaviours.")},m(M,o){n(M,s,o)},d(M){M&&l(s)}}}function _l(b){let s,M,o,J,r,f,j,U,N,Bt=`With our <a href="https://huggingface.co/papers/2506.01844" rel="nofollow">SmolVLA</a> we introduced a new way to run inference on real-world robots, <strong>decoupling action prediction from action execution</strong>.
In this tutorial, we’ll show how to use asynchronous inference (<em>async inference</em>) using a finetuned version of SmolVLA, and all the policies supported by LeRobot.
<strong>Try async inference with all the policies</strong> supported by LeRobot!`,je,X,Ct="<strong>What you’ll learn:</strong>",Ue,Y,Gt="<li>Why asynchronous inference matters and how it compares to, more traditional, sequential inference.</li> <li>How to spin-up a <code>PolicyServer</code> and connect a <code>RobotClient</code> from the same machine, and even over the network.</li> <li>How to tune key parameters (<code>actions_per_chunk</code>, <code>chunk_size_threshold</code>) for your robot and policy.</li>",Ie,A,_t='If you get stuck, hop into our <a href="https://discord.gg/s3KuuzsPFb" rel="nofollow">Discord community</a>!',ve,V,$t=`In a nutshell: with <em>async inference</em>, your robot keeps acting while the policy server is already busy computing the next chunk of actions---eliminating “wait-for-inference” lags and unlocking smoother, more reactive behaviours.
This is fundamentally different from synchronous inference (sync), where the robot stays idle while the policy computes the next chunk of actions.`,ge,Be,Ce,z,Ge,x,Zt='You can read more information on asynchronous inference in our <a href="https://huggingface.co/blog/async-robot-inference" rel="nofollow">blogpost</a>. This guide is designed to help you quickly set up and run asynchronous inference in your environment.',_e,L,Wt="First, install <code>lerobot</code> with the <code>async</code> tag, to install the extra dependencies required to run async inference.",$e,Q,Ze,R,kt=`Then, spin up a policy server (in one terminal, or in a separate machine) specifying the host address and port for the client to connect to.
You can spin up a policy server running:`,We,H,ke,E,Nt="This will start a policy server listening on <code>127.0.0.1:8080</code> (<code>localhost</code>, port 8080). At this stage, the policy server is empty, as all information related to which policy to run and with which parameters are specified during the first handshake with the client. Spin up a client with:",Ne,S,Xe,F,Xt="In summary, you need to specify instructions for:",Ye,P,Yt="<li><code>SERVER</code>: the address and port of the policy server</li> <li><code>ROBOT</code>: the type of robot to connect to, the port to connect to, and the local <code>id</code> of the robot</li> <li><code>POLICY</code>: the type of policy to run, and the model name/path on server to the checkpoint to run. You also need to specify which device should the sever be using, and how many actions to output at once (capped at the policy max actions value).</li> <li><code>CLIENT</code>: the threshold for the chunk size before sending a new observation to the server, and the function to aggregate actions on overlapping portions. Optionally, you can also visualize the queue size at runtime, to help you tune the <code>CLIENT</code> parameters.</li>",Ae,D,At="Importantly,",Ve,q,Vt='<li><code>actions_per_chunk</code> and <code>chunk_size_threshold</code> are key parameters to tune for your setup.</li> <li><code>aggregate_fn_name</code> is the function to aggregate actions on overlapping portions. You can either add a new one to a registry of functions, or add your own in <code>robot_client.py</code> (see <a href="NOTE:addlinktoLOC">here</a>)</li> <li><code>debug_visualize_queue_size</code> is a useful tool to tune the <code>CLIENT</code> parameters.</li>',ze,O,xe,K,Le,ee,zt=`Synchronous inference relies on interleaving action chunk prediction and action execution. This inherently results in <em>idle frames</em>, frames where the robot awaits idle the policy’s output: a new action chunk.
In turn, inference is plagued by evident real-time lags, where the robot simply stops acting due to the lack of available actions.
With robotics models increasing in size, this problem risks becoming only more severe.`,Qe,I,xt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/async-inference/sync.png" width="80%"/>',Re,v,Lt=`<i>Synchronous inference</i> makes the robot idle while the policy is
  computing the next chunk of actions.`,He,te,Qt=`To overcome this, we design async inference, a paradigm where action planning and execution are decoupled, resulting in (1) higher adaptability and, most importantly, (2) no idle frames.
Crucially, with async inference, the next action chunk is computed <em>before</em> the current one is exhausted, resulting in no idleness.
Higher adaptability is ensured by aggregating the different action chunks on overlapping portions, obtaining an up-to-date plan and a tighter control loop.`,Ee,g,Rt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/async-inference/async.png" width="80%"/>',Se,B,Ht=`<i>Asynchronous inference</i> results in no idleness because the next chunk is
  computed before the current chunk is exhausted.`,Fe,Pe,De,le,qe,ne,Et=`Policy servers are wrappers around a <code>PreTrainedPolicy</code> interfacing them with observations coming from a robot client.
Policy servers are initialized as empty containers which are populated with the requested policy specified in the initial handshake between the robot client and the policy server.
As such, spinning up a policy server is as easy as specifying the host address and port. If you’re running the policy server on the same machine as the robot client, you can use <code>localhost</code> as the host address.`,Oe,C,Ke,oe,St="This listens on <code>localhost:8080</code> for an incoming connection from the associated<code>RobotClient</code>, which will communicate which policy to run during the first client-server handshake.",et,tt,lt,se,nt,ie,Ft=`<code>RobotClient</code> is a wrapper around a <code>Robot</code> instance, which <code>RobotClient</code> connects to the (possibly remote) <code>PolicyServer</code>.
The <code>RobotClient</code> streams observations to the <code>PolicyServer</code>, and receives action chunks obtained running inference on the server (which we assume to have better computational resources than the robot controller).`,ot,G,st,ae,Pt="The following two parameters are key in every setup:",it,re,Dt=`<thead><tr><th>Hyperparameter</th> <th>Default</th> <th>What it does</th></tr></thead> <tbody><tr><td><code>actions_per_chunk</code></td> <td>50</td> <td>How many actions the policy outputs at once. Typical values: 10-50.</td></tr> <tr><td><code>chunk_size_threshold</code></td> <td>0.7</td> <td>When the queue is ≤ 50% full, the client sends a fresh observation.
        Value in [0, 1].</td></tr></tbody>`,at,_,rt,ce,qt=`On the one hand, increasing the value of <code>actions_per_chunk</code> will result in reducing the likelihood of ending up with no actions to execute, as more actions will be available when the new chunk is computed.
However, larger values of <code>actions_per_chunk</code> might also result in less precise actions, due to the compounding errors consequent to predicting actions over longer timespans.`,ct,pe,Ot=`On the other hand, increasing the value of <code>chunk_size_threshold</code> will result in sending out to the <code>PolicyServer</code> observations for inference more often, resulting in a larger number of updates action chunks, overlapping on significant portions. This results in high adaptability, in the limit predicting one action chunk for each observation, which is in turn only marginally consumed while a new one is produced.
This option does also put more pressure on the inference pipeline, as a consequence of the many requests. Conversely, values of <code>chunk_size_threshold</code> close to 0.0 collapse to the synchronous edge case, whereby new observations are only sent out whenever the current chunk is exhausted.`,pt,Me,Kt='We found the default values of <code>actions_per_chunk</code> and <code>chunk_size_threshold</code> to work well in the experiments we developed for the <a href="https://huggingface.co/papers/2506.01844" rel="nofollow">SmolVLA paper</a>, but recommend experimenting with different values to find the best fit for your setup.',Mt,ue,ut,he,el=`<li><strong>Choose your computational resources carefully.</strong> <a href="https://huggingface.co/lerobot/pi0" rel="nofollow">PI0</a> occupies 14GB of memory at inference time, while <a href="https://huggingface.co/lerobot/smolvla_base" rel="nofollow">SmolVLA</a> requires only ~2GB. You should identify the best computational resource for your use case keeping in mind smaller policies require less computational resources. The combination of policy and device used (CPU-intensive, using MPS, or the number of CUDA cores on a given NVIDIA GPU) directly impacts the average inference latency you should expect.</li> <li><strong>Adjust your <code>fps</code> based on inference latency.</strong> While the server generates a new action chunk, the client is not idle and is stepping through its current action queue. If the two processes happen at fundamentally different speeds, the client might end up with an empty queue. As such, you should reduce your fps if you consistently run out of actions in queue.</li> <li><strong>Adjust <code>chunk_size_threshold</code></strong>.
<ul><li>Values closer to <code>0.0</code> result in almost sequential behavior. Values closer to <code>1.0</code> → send observation every step (more bandwidth, relies on good world-model).</li> <li>We found values around 0.5-0.6 to work well. If you want to tweak this, spin up a <code>RobotClient</code> setting the <code>--debug-visualize-queue-size</code> to <code>True</code>. This will plot the action queue size evolution at runtime, and you can use it to find the value of <code>chunk_size_threshold</code> that works best for your setup.</li></ul></li>`,ht,$,tl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/async-inference/queues.png" width="80%"/>',yt,Z,ll="<i>The action queue size is plotted at runtime when the\n    `--debug-visualize-queue-size` flag is passed, for various levels of\n    `chunk_size_threshold` (`g` in the SmolVLA paper).</i>",dt,mt,wt,ye,Tt,de,nl="Asynchronous inference represents a significant advancement in real-time robotics control, addressing the fundamental challenge of inference latency that has long plagued robotics applications. Through this tutorial, you’ve learned how to implement a complete async inference pipeline that eliminates idle frames and enables smoother, more reactive robot behaviors.",Jt,me,ol="<strong>Key Takeaways:</strong>",ft,we,sl="<li><strong>Paradigm Shift</strong>: Async inference decouples action prediction from execution, allowing robots to continue acting while new action chunks are computed in parallel</li> <li><strong>Performance Benefits</strong>: Eliminates “wait-for-inference” lags that are inherent in synchronous approaches, becoming increasingly important as policy models grow larger</li> <li><strong>Flexible Architecture</strong>: The server-client design enables distributed computing, where inference can run on powerful remote hardware while maintaining real-time robot control</li> <li><strong>Tunable Parameters</strong>: Success depends on properly configuring <code>actions_per_chunk</code> and <code>chunk_size_threshold</code> for your specific hardware, policy, and task requirements</li> <li><strong>Universal Compatibility</strong>: Works with all LeRobot-supported policies, from lightweight ACT models to vision-language models like SmolVLA</li>",bt,Te,il=`Start experimenting with the default parameters, monitor your action queue sizes, and iteratively refine your setup to achieve optimal performance for your specific use case.
If you want to discuss this further, hop into our <a href="https://discord.gg/s3KuuzsPFb" rel="nofollow">Discord community</a>, or open an issue on our <a href="https://github.com/lerobot/lerobot/issues" rel="nofollow">GitHub repository</a>.`,jt,Je,Ut,be,It;return r=new bl({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),j=new k({props:{title:"Asynchronous Inference",local:"asynchronous-inference",headingTag:"h1"}}),z=new k({props:{title:"Getting started with async inference",local:"getting-started-with-async-inference",headingTag:"h2"}}),Q=new fe({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QmFzeW5jJTVEJTIy",highlighted:"pip install -e &quot;.[async]&quot;",wrap:!1}}),H=new fe({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5wb2xpY3lfc2VydmVyJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIwLS1ob3N0JTNEMTI3LjAuMC4xJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIwLS1wb3J0JTNEODA4MA==",highlighted:`python -m lerobot.async_inference.policy_server \\
     --host=127.0.0.1 \\
     --port=8080`,wrap:!1}}),S=new fe({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5yb2JvdF9jbGllbnQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNlcnZlcl9hZGRyZXNzJTNEMTI3LjAuMC4xJTNBODA4MCUyMCU1QyUyMCUyMyUyMFNFUlZFUiUzQSUyMHRoZSUyMGhvc3QlMjBhZGRyZXNzJTIwYW5kJTIwcG9ydCUyMG9mJTIwdGhl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jAlMjAtLWNodW5rX3NpemVfdGhyZXNob2xkJTNEMC41JTIwJTVDJTIwJTIzJTIwQ0xJRU5UJTNBJTIwdGhlJTIwdGhyZXNob2xkJTIwZm9yJTIwdGhlJTIwY2h1bmslMjBzaXplJTIwYmVmb3JlJTIwc2VuZGluZyUyMGElMjBuZXclMjBvYnNlcnZhdGlvbiUyMHRvJTIwdGhlJTIwc2VydmVyJTBBJTIwJTIwJTIwJTIwLS1hZ2dyZWdhdGVfZm5fbmFtZSUzRHdlaWdodGVkX2F2ZXJhZ2UlMjAlNUMlMjAlMjMlMjBDTElFTlQlM0ElMjB0aGUlMjBmdW5jdGlvbiUyMHRvJTIwYWdncmVnYXRlJTIwYWN0aW9ucyUyMG9uJTIwb3ZlcmxhcHBpbmclMjBwb3J0aW9ucyUwQSUyMCUyMCUyMCUyMC0tZGVidWdfdmlzdWFsaXplX3F1ZXVlX3NpemUlM0RUcnVlJTIwJTIzJTIwQ0xJRU5UJTNBJTIwd2hldGhlciUyMHRvJTIwdmlzdWFsaXplJTIwdGhlJTIwcXVldWUlMjBzaXplJTIwYXQlMjBydW50aW1l",highlighted:`python -m lerobot.async_inference.robot_client \\
    --server_address=127.0.0.1:8080 \\ # SERVER: the host address and port of the policy server
    --robot.type=so100_follower \\ # ROBOT: your robot type
    --robot.port=/dev/tty.usbmodem585A0076841 \\ # ROBOT: your robot port
    --robot.id=follower_so100 \\ # ROBOT: your robot id, to load calibration file
    --robot.cameras=&quot;{ laptop: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30}, phone: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30}}&quot; \\ # POLICY: the cameras used to acquire frames, with keys matching the keys expected by the policy
    --task=&quot;dummy&quot; \\ # POLICY: The task to run the policy on (\`Fold my t-shirt\`). Not necessarily defined for all policies, such as \`act\`
    --policy_type=your_policy_type \\ # POLICY: the type of policy to run (smolvla, act, etc)
    --pretrained_name_or_path=user/model \\ # POLICY: the model name/path on server to the checkpoint to run (e.g., lerobot/smolvla_base)
    --policy_device=mps \\ # POLICY: the device to run the policy on, on the server
    --actions_per_chunk=50 \\ # POLICY: the number of actions to output at once
    --chunk_size_threshold=0.5 \\ # CLIENT: the threshold for the chunk size before sending a new observation to the server
    --aggregate_fn_name=weighted_average \\ # CLIENT: the function to aggregate actions on overlapping portions
    --debug_visualize_queue_size=True # CLIENT: whether to visualize the queue size at runtime`,wrap:!1}}),O=new k({props:{title:"Done! You should see your robot moving around by now 😉",local:"done-you-should-see-your-robot-moving-around-by-now-",headingTag:"h2"}}),K=new k({props:{title:"Async vs. synchronous inference",local:"async-vs-synchronous-inference",headingTag:"h2"}}),le=new k({props:{title:"Start the Policy Server",local:"start-the-policy-server",headingTag:"h2"}}),C=new Ml({props:{id:"start_policy_server",options:["Command","API example"],$$slots:{default:[vl]},$$scope:{ctx:b}}}),se=new k({props:{title:"Launch the Robot Client",local:"launch-the-robot-client",headingTag:"h2"}}),G=new Ml({props:{id:"start_robot_client",options:["Command","API example"],$$slots:{default:[Cl]},$$scope:{ctx:b}}}),_=new fl({props:{$$slots:{default:[Gl]},$$scope:{ctx:b}}}),ue=new k({props:{title:"Tuning async inference for your setup",local:"tuning-async-inference-for-your-setup",headingTag:"h3"}}),ye=new k({props:{title:"Conclusion",local:"conclusion",headingTag:"h2"}}),Je=new jl({props:{source:"https://github.com/huggingface/lerobot/blob/main/docs/source/async.mdx"}}),{c(){s=c("meta"),M=i(),o=c("p"),J=i(),h(r.$$.fragment),f=i(),h(j.$$.fragment),U=i(),N=c("p"),N.innerHTML=Bt,je=i(),X=c("p"),X.innerHTML=Ct,Ue=i(),Y=c("ol"),Y.innerHTML=Gt,Ie=i(),A=c("p"),A.innerHTML=_t,ve=i(),V=c("p"),V.innerHTML=$t,ge=i(),Be=c("hr"),Ce=i(),h(z.$$.fragment),Ge=i(),x=c("p"),x.innerHTML=Zt,_e=i(),L=c("p"),L.innerHTML=Wt,$e=i(),h(Q.$$.fragment),Ze=i(),R=c("p"),R.textContent=kt,We=i(),h(H.$$.fragment),ke=i(),E=c("p"),E.innerHTML=Nt,Ne=i(),h(S.$$.fragment),Xe=i(),F=c("p"),F.textContent=Xt,Ye=i(),P=c("ul"),P.innerHTML=Yt,Ae=i(),D=c("p"),D.textContent=At,Ve=i(),q=c("ul"),q.innerHTML=Vt,ze=i(),h(O.$$.fragment),xe=i(),h(K.$$.fragment),Le=i(),ee=c("p"),ee.innerHTML=zt,Qe=i(),I=c("p"),I.innerHTML=xt,Re=i(),v=c("p"),v.innerHTML=Lt,He=i(),te=c("p"),te.innerHTML=Qt,Ee=i(),g=c("p"),g.innerHTML=Rt,Se=i(),B=c("p"),B.innerHTML=Ht,Fe=i(),Pe=c("hr"),De=i(),h(le.$$.fragment),qe=i(),ne=c("p"),ne.innerHTML=Et,Oe=i(),h(C.$$.fragment),Ke=i(),oe=c("p"),oe.innerHTML=St,et=i(),tt=c("hr"),lt=i(),h(se.$$.fragment),nt=i(),ie=c("p"),ie.innerHTML=Ft,ot=i(),h(G.$$.fragment),st=i(),ae=c("p"),ae.textContent=Pt,it=i(),re=c("table"),re.innerHTML=Dt,at=i(),h(_.$$.fragment),rt=i(),ce=c("p"),ce.innerHTML=qt,ct=i(),pe=c("p"),pe.innerHTML=Ot,pt=i(),Me=c("p"),Me.innerHTML=Kt,Mt=i(),h(ue.$$.fragment),ut=i(),he=c("ol"),he.innerHTML=el,ht=i(),$=c("p"),$.innerHTML=tl,yt=i(),Z=c("p"),Z.innerHTML=ll,dt=i(),mt=c("hr"),wt=i(),h(ye.$$.fragment),Tt=i(),de=c("p"),de.textContent=nl,Jt=i(),me=c("p"),me.innerHTML=ol,ft=i(),we=c("ul"),we.innerHTML=sl,bt=i(),Te=c("p"),Te.innerHTML=il,jt=i(),h(Je.$$.fragment),Ut=i(),be=c("p"),this.h()},l(e){const t=ml("svelte-u9bgzb",document.head);s=p(t,"META",{name:!0,content:!0}),t.forEach(l),M=a(e),o=p(e,"P",{}),pl(o).forEach(l),J=a(e),y(r.$$.fragment,e),f=a(e),y(j.$$.fragment,e),U=a(e),N=p(e,"P",{"data-svelte-h":!0}),u(N)!=="svelte-1grquz4"&&(N.innerHTML=Bt),je=a(e),X=p(e,"P",{"data-svelte-h":!0}),u(X)!=="svelte-qtpxdt"&&(X.innerHTML=Ct),Ue=a(e),Y=p(e,"OL",{"data-svelte-h":!0}),u(Y)!=="svelte-1rnlps9"&&(Y.innerHTML=Gt),Ie=a(e),A=p(e,"P",{"data-svelte-h":!0}),u(A)!=="svelte-1gwyflc"&&(A.innerHTML=_t),ve=a(e),V=p(e,"P",{"data-svelte-h":!0}),u(V)!=="svelte-z33upu"&&(V.innerHTML=$t),ge=a(e),Be=p(e,"HR",{}),Ce=a(e),y(z.$$.fragment,e),Ge=a(e),x=p(e,"P",{"data-svelte-h":!0}),u(x)!=="svelte-dc7wnn"&&(x.innerHTML=Zt),_e=a(e),L=p(e,"P",{"data-svelte-h":!0}),u(L)!=="svelte-lllvpj"&&(L.innerHTML=Wt),$e=a(e),y(Q.$$.fragment,e),Ze=a(e),R=p(e,"P",{"data-svelte-h":!0}),u(R)!=="svelte-o9nz2v"&&(R.textContent=kt),We=a(e),y(H.$$.fragment,e),ke=a(e),E=p(e,"P",{"data-svelte-h":!0}),u(E)!=="svelte-1s4pcoy"&&(E.innerHTML=Nt),Ne=a(e),y(S.$$.fragment,e),Xe=a(e),F=p(e,"P",{"data-svelte-h":!0}),u(F)!=="svelte-1h4pflk"&&(F.textContent=Xt),Ye=a(e),P=p(e,"UL",{"data-svelte-h":!0}),u(P)!=="svelte-glkyog"&&(P.innerHTML=Yt),Ae=a(e),D=p(e,"P",{"data-svelte-h":!0}),u(D)!=="svelte-mjg4q5"&&(D.textContent=At),Ve=a(e),q=p(e,"UL",{"data-svelte-h":!0}),u(q)!=="svelte-1notb6i"&&(q.innerHTML=Vt),ze=a(e),y(O.$$.fragment,e),xe=a(e),y(K.$$.fragment,e),Le=a(e),ee=p(e,"P",{"data-svelte-h":!0}),u(ee)!=="svelte-q4wltw"&&(ee.innerHTML=zt),Qe=a(e),I=p(e,"P",{align:!0,"data-svelte-h":!0}),u(I)!=="svelte-10cfi8e"&&(I.innerHTML=xt),Re=a(e),v=p(e,"P",{align:!0,"data-svelte-h":!0}),u(v)!=="svelte-nqo5ib"&&(v.innerHTML=Lt),He=a(e),te=p(e,"P",{"data-svelte-h":!0}),u(te)!=="svelte-11p5v55"&&(te.innerHTML=Qt),Ee=a(e),g=p(e,"P",{align:!0,"data-svelte-h":!0}),u(g)!=="svelte-a8x2pl"&&(g.innerHTML=Rt),Se=a(e),B=p(e,"P",{align:!0,"data-svelte-h":!0}),u(B)!=="svelte-ev3be1"&&(B.innerHTML=Ht),Fe=a(e),Pe=p(e,"HR",{}),De=a(e),y(le.$$.fragment,e),qe=a(e),ne=p(e,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-xnp609"&&(ne.innerHTML=Et),Oe=a(e),y(C.$$.fragment,e),Ke=a(e),oe=p(e,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-1bimxlr"&&(oe.innerHTML=St),et=a(e),tt=p(e,"HR",{}),lt=a(e),y(se.$$.fragment,e),nt=a(e),ie=p(e,"P",{"data-svelte-h":!0}),u(ie)!=="svelte-ov7xtn"&&(ie.innerHTML=Ft),ot=a(e),y(G.$$.fragment,e),st=a(e),ae=p(e,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-1txlh3i"&&(ae.textContent=Pt),it=a(e),re=p(e,"TABLE",{"data-svelte-h":!0}),u(re)!=="svelte-zlc5ky"&&(re.innerHTML=Dt),at=a(e),y(_.$$.fragment,e),rt=a(e),ce=p(e,"P",{"data-svelte-h":!0}),u(ce)!=="svelte-1wcr4ad"&&(ce.innerHTML=qt),ct=a(e),pe=p(e,"P",{"data-svelte-h":!0}),u(pe)!=="svelte-1e8rfth"&&(pe.innerHTML=Ot),pt=a(e),Me=p(e,"P",{"data-svelte-h":!0}),u(Me)!=="svelte-7n3gup"&&(Me.innerHTML=Kt),Mt=a(e),y(ue.$$.fragment,e),ut=a(e),he=p(e,"OL",{"data-svelte-h":!0}),u(he)!=="svelte-ub06nn"&&(he.innerHTML=el),ht=a(e),$=p(e,"P",{align:!0,"data-svelte-h":!0}),u($)!=="svelte-1rfo7vb"&&($.innerHTML=tl),yt=a(e),Z=p(e,"P",{align:!0,"data-svelte-h":!0}),u(Z)!=="svelte-116pjfk"&&(Z.innerHTML=ll),dt=a(e),mt=p(e,"HR",{}),wt=a(e),y(ye.$$.fragment,e),Tt=a(e),de=p(e,"P",{"data-svelte-h":!0}),u(de)!=="svelte-2fpn4u"&&(de.textContent=nl),Jt=a(e),me=p(e,"P",{"data-svelte-h":!0}),u(me)!=="svelte-10mg9xa"&&(me.innerHTML=ol),ft=a(e),we=p(e,"UL",{"data-svelte-h":!0}),u(we)!=="svelte-loclkx"&&(we.innerHTML=sl),bt=a(e),Te=p(e,"P",{"data-svelte-h":!0}),u(Te)!=="svelte-1caxk5y"&&(Te.innerHTML=il),jt=a(e),y(Je.$$.fragment,e),Ut=a(e),be=p(e,"P",{}),pl(be).forEach(l),this.h()},h(){W(s,"name","hf:doc:metadata"),W(s,"content",$l),W(I,"align","center"),W(v,"align","center"),W(g,"align","center"),W(B,"align","center"),W($,"align","center"),W(Z,"align","center")},m(e,t){wl(document.head,s),n(e,M,t),n(e,o,t),n(e,J,t),d(r,e,t),n(e,f,t),d(j,e,t),n(e,U,t),n(e,N,t),n(e,je,t),n(e,X,t),n(e,Ue,t),n(e,Y,t),n(e,Ie,t),n(e,A,t),n(e,ve,t),n(e,V,t),n(e,ge,t),n(e,Be,t),n(e,Ce,t),d(z,e,t),n(e,Ge,t),n(e,x,t),n(e,_e,t),n(e,L,t),n(e,$e,t),d(Q,e,t),n(e,Ze,t),n(e,R,t),n(e,We,t),d(H,e,t),n(e,ke,t),n(e,E,t),n(e,Ne,t),d(S,e,t),n(e,Xe,t),n(e,F,t),n(e,Ye,t),n(e,P,t),n(e,Ae,t),n(e,D,t),n(e,Ve,t),n(e,q,t),n(e,ze,t),d(O,e,t),n(e,xe,t),d(K,e,t),n(e,Le,t),n(e,ee,t),n(e,Qe,t),n(e,I,t),n(e,Re,t),n(e,v,t),n(e,He,t),n(e,te,t),n(e,Ee,t),n(e,g,t),n(e,Se,t),n(e,B,t),n(e,Fe,t),n(e,Pe,t),n(e,De,t),d(le,e,t),n(e,qe,t),n(e,ne,t),n(e,Oe,t),d(C,e,t),n(e,Ke,t),n(e,oe,t),n(e,et,t),n(e,tt,t),n(e,lt,t),d(se,e,t),n(e,nt,t),n(e,ie,t),n(e,ot,t),d(G,e,t),n(e,st,t),n(e,ae,t),n(e,it,t),n(e,re,t),n(e,at,t),d(_,e,t),n(e,rt,t),n(e,ce,t),n(e,ct,t),n(e,pe,t),n(e,pt,t),n(e,Me,t),n(e,Mt,t),d(ue,e,t),n(e,ut,t),n(e,he,t),n(e,ht,t),n(e,$,t),n(e,yt,t),n(e,Z,t),n(e,dt,t),n(e,mt,t),n(e,wt,t),d(ye,e,t),n(e,Tt,t),n(e,de,t),n(e,Jt,t),n(e,me,t),n(e,ft,t),n(e,we,t),n(e,bt,t),n(e,Te,t),n(e,jt,t),d(Je,e,t),n(e,Ut,t),n(e,be,t),It=!0},p(e,[t]){const al={};t&2&&(al.$$scope={dirty:t,ctx:e}),C.$set(al);const rl={};t&2&&(rl.$$scope={dirty:t,ctx:e}),G.$set(rl);const cl={};t&2&&(cl.$$scope={dirty:t,ctx:e}),_.$set(cl)},i(e){It||(m(r.$$.fragment,e),m(j.$$.fragment,e),m(z.$$.fragment,e),m(Q.$$.fragment,e),m(H.$$.fragment,e),m(S.$$.fragment,e),m(O.$$.fragment,e),m(K.$$.fragment,e),m(le.$$.fragment,e),m(C.$$.fragment,e),m(se.$$.fragment,e),m(G.$$.fragment,e),m(_.$$.fragment,e),m(ue.$$.fragment,e),m(ye.$$.fragment,e),m(Je.$$.fragment,e),It=!0)},o(e){w(r.$$.fragment,e),w(j.$$.fragment,e),w(z.$$.fragment,e),w(Q.$$.fragment,e),w(H.$$.fragment,e),w(S.$$.fragment,e),w(O.$$.fragment,e),w(K.$$.fragment,e),w(le.$$.fragment,e),w(C.$$.fragment,e),w(se.$$.fragment,e),w(G.$$.fragment,e),w(_.$$.fragment,e),w(ue.$$.fragment,e),w(ye.$$.fragment,e),w(Je.$$.fragment,e),It=!1},d(e){e&&(l(M),l(o),l(J),l(f),l(U),l(N),l(je),l(X),l(Ue),l(Y),l(Ie),l(A),l(ve),l(V),l(ge),l(Be),l(Ce),l(Ge),l(x),l(_e),l(L),l($e),l(Ze),l(R),l(We),l(ke),l(E),l(Ne),l(Xe),l(F),l(Ye),l(P),l(Ae),l(D),l(Ve),l(q),l(ze),l(xe),l(Le),l(ee),l(Qe),l(I),l(Re),l(v),l(He),l(te),l(Ee),l(g),l(Se),l(B),l(Fe),l(Pe),l(De),l(qe),l(ne),l(Oe),l(Ke),l(oe),l(et),l(tt),l(lt),l(nt),l(ie),l(ot),l(st),l(ae),l(it),l(re),l(at),l(rt),l(ce),l(ct),l(pe),l(pt),l(Me),l(Mt),l(ut),l(he),l(ht),l($),l(yt),l(Z),l(dt),l(mt),l(wt),l(Tt),l(de),l(Jt),l(me),l(ft),l(we),l(bt),l(Te),l(jt),l(Ut),l(be)),l(s),T(r,e),T(j,e),T(z,e),T(Q,e),T(H,e),T(S,e),T(O,e),T(K,e),T(le,e),T(C,e),T(se,e),T(G,e),T(_,e),T(ue,e),T(ye,e),T(Je,e)}}}const $l='{"title":"Asynchronous Inference","local":"asynchronous-inference","sections":[{"title":"Getting started with async inference","local":"getting-started-with-async-inference","sections":[],"depth":2},{"title":"Done! You should see your robot moving around by now 😉","local":"done-you-should-see-your-robot-moving-around-by-now-","sections":[],"depth":2},{"title":"Async vs. synchronous inference","local":"async-vs-synchronous-inference","sections":[],"depth":2},{"title":"Start the Policy Server","local":"start-the-policy-server","sections":[],"depth":2},{"title":"Launch the Robot Client","local":"launch-the-robot-client","sections":[{"title":"Tuning async inference for your setup","local":"tuning-async-inference-for-your-setup","sections":[],"depth":3}],"depth":2},{"title":"Conclusion","local":"conclusion","sections":[],"depth":2}],"depth":1}';function Zl(b){return hl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zl extends yl{constructor(s){super(),dl(this,s,Zl,_l,ul,{})}}export{zl as component};
