import{s as Ml,o as ul,n as gt}from"../chunks/scheduler.eb244325.js";import{S as hl,i as dl,e as c,s as i,c as u,h as ml,a as p,d as l,b as a,f as pl,g as h,j as M,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 Ul}from"../chunks/CopyLLMTxtMenu.88bde5f2.js";import{C as fe}from"../chunks/CodeBlock.934d290d.js";import{H as N,E as bl}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.341974a5.js";import{H as yl,a as vt}from"../chunks/HfOption.0914e9f3.js";function jl(U){let s,y;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(){u(s.$$.fragment)},l(o){h(s.$$.fragment,o)},m(o,J){d(s,o,J),y=!0},p:gt,i(o){y||(m(s.$$.fragment,o),y=!0)},o(o){w(s.$$.fragment,o),y=!1},d(o){T(s,o)}}}function Il(U){let s,y;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(){u(s.$$.fragment)},l(o){h(s.$$.fragment,o)},m(o,J){d(s,o,J),y=!0},p:gt,i(o){y||(m(s.$$.fragment,o),y=!0)},o(o){w(s.$$.fragment,o),y=!1},d(o){T(s,o)}}}function vl(U){let s,y,o,J;return s=new vt({props:{id:"start_policy_server",option:"Command",$$slots:{default:[jl]},$$scope:{ctx:U}}}),o=new vt({props:{id:"start_policy_server",option:"API example",$$slots:{default:[Il]},$$scope:{ctx:U}}}),{c(){u(s.$$.fragment),y=i(),u(o.$$.fragment)},l(r){h(s.$$.fragment,r),y=a(r),h(o.$$.fragment,r)},m(r,f){d(s,r,f),n(r,y,f),d(o,r,f),J=!0},p(r,f){const b={};f&2&&(b.$$scope={dirty:f,ctx:r}),s.$set(b);const j={};f&2&&(j.$$scope={dirty:f,ctx:r}),o.$set(j)},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(y),T(s,r),T(o,r)}}}function gl(U){let s,y;return s=new fe({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5yb2JvdF9jbGllbnQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNlcnZlcl9hZGRyZXNzJTNEMTI3LjAuMC4xJTNBODA4MCUyMCU1QyUyMCUyMyUyMFNFUlZFUiUzQSUyMHRoZSUyMGhvc3QlMjBhZGRyZXNzJTIwYW5kJTIwcG9ydCUyMG9mJTIwdGhlJTIwcG9saWN5JTIwc2Vyd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VfdGhyZXNob2xkJTNEMC41JTIwJTVDJTIwJTIzJTIwQ0xJRU5UJTNBJTIwdGhlJTIwdGhyZXNob2xkJTIwZm9yJTIwdGhlJTIwY2h1bmslMjBzaXplJTIwYmVmb3JlJTIwc2VuZGluZyUyMGElMjBuZXclMjBvYnNlcnZhdGlvbiUyMHRvJTIwdGhlJTIwc2VydmVyJTBBJTIwJTIwJTIwJTIwLS1hZ2dyZWdhdGVfZm5fbmFtZSUzRHdlaWdodGVkX2F2ZXJhZ2UlMjAlNUMlMjAlMjMlMjBDTElFTlQlM0ElMjB0aGUlMjBmdW5jdGlvbiUyMHRvJTIwYWdncmVnYXRlJTIwYWN0aW9ucyUyMG9uJTIwb3ZlcmxhcHBpbmclMjBwb3J0aW9ucyUwQSUyMCUyMCUyMCUyMC0tZGVidWdfdmlzdWFsaXplX3F1ZXVlX3NpemUlM0RUcnVlJTIwJTIzJTIwQ0xJRU5UJTNBJTIwd2hldGhlciUyMHRvJTIwdmlzdWFsaXplJTIwdGhlJTIwcXVldWUlMjBzaXplJTIwYXQlMjBydW50aW1l",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(){u(s.$$.fragment)},l(o){h(s.$$.fragment,o)},m(o,J){d(s,o,J),y=!0},p:gt,i(o){y||(m(s.$$.fragment,o),y=!0)},o(o){w(s.$$.fragment,o),y=!1},d(o){T(s,o)}}}function Bl(U){let s,y;return s=new fe({props:{code:"aW1wb3J0JTIwdGhyZWFkaW5nJTBBZnJvbSUyMGxlcm9ib3Qucm9ib3RzLnNvX2ZvbGxvd2VyJTIwaW1wb3J0JTIwU08xMDBGb2xsb3dlckNvbmZpZyUwQWZyb20lMjBsZXJvYm90LmNhbWVyYXMub3BlbmN2JTIwaW1wb3J0JTIwT3BlbkNWQ2FtZXJhQ29uZmlnJTBBZnJvbSUyMGxlcm9ib3QuYXN5bmNfaW5mZXJlbmNlLmNvbmZpZ3MlMjBpbXBvcnQlMjBSb2JvdENsaWVudENvbmZpZyUwQWZyb20lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5yb2JvdF9jbGllbnQlMjBpbXBvcnQlMjBSb2JvdENsaWVudCUwQWZyb20lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5oZWxwZXJzJTIwaW1wb3J0JTIwdmlzdWFsaXplX2FjdGlvbl9xdWV1ZV9za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IwJTIwJTIwJTIwJTIzJTIwU3RhcnQlMjBhY3Rpb24lMjByZWNlaXZlciUyMHRocmVhZCUwQSUyMCUyMCUyMCUyMGFjdGlvbl9yZWNlaXZlcl90aHJlYWQlMjAlM0QlMjB0aHJlYWRpbmcuVGhyZWFkKHRhcmdldCUzRGNsaWVudC5yZWNlaXZlX2FjdGlvbnMlMkMlMjBkYWVtb24lM0RUcnVlKSUwQSUyMCUyMCUyMCUyMGFjdGlvbl9yZWNlaXZlcl90aHJlYWQuc3RhcnQoKSUwQSUwQSUyMCUyMCUyMCUyMHRyeSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMFJ1biUyMHRoZSUyMGNvbnRyb2wlMjBsb29wJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwY2xpZW50LmNvbnRyb2xfbG9vcCh0YXNrKSUwQSUyMCUyMCUyMCUyMGV4Y2VwdCUyMEtleWJvYXJkSW50ZXJydXB0JTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwY2xpZW50LnN0b3AoKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGFjdGlvbl9yZWNlaXZlcl90aHJlYWQuam9pbigpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwKE9wdGlvbmFsbHkpJTIwcGxvdCUyMHRoZSUyMGFjdGlvbiUyMHF1ZXVlJTIwc2l6ZSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHZpc3VhbGl6ZV9hY3Rpb25fcXVldWVfc2l6ZShjbGllbnQuYWN0aW9uX3F1ZXVlX3NpemUp",highlighted:`<span class="hljs-keyword">import</span> threading
<span class="hljs-keyword">from</span> lerobot.robots.so_follower <span class="hljs-keyword">import</span> SO100FollowerConfig
<span class="hljs-keyword">from</span> lerobot.cameras.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>,
    client_device=<span class="hljs-string">&quot;cpu&quot;</span>,
    policy_type=<span class="hljs-string">&quot;smolvla&quot;</span>,
    pretrained_name_or_path=<span class="hljs-string">&quot;&lt;user&gt;/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(){u(s.$$.fragment)},l(o){h(s.$$.fragment,o)},m(o,J){d(s,o,J),y=!0},p:gt,i(o){y||(m(s.$$.fragment,o),y=!0)},o(o){w(s.$$.fragment,o),y=!1},d(o){T(s,o)}}}function Cl(U){let s,y,o,J;return s=new vt({props:{id:"start_robot_client",option:"Command",$$slots:{default:[gl]},$$scope:{ctx:U}}}),o=new vt({props:{id:"start_robot_client",option:"API example",$$slots:{default:[Bl]},$$scope:{ctx:U}}}),{c(){u(s.$$.fragment),y=i(),u(o.$$.fragment)},l(r){h(s.$$.fragment,r),y=a(r),h(o.$$.fragment,r)},m(r,f){d(s,r,f),n(r,y,f),d(o,r,f),J=!0},p(r,f){const b={};f&2&&(b.$$scope={dirty:f,ctx:r}),s.$set(b);const j={};f&2&&(j.$$scope={dirty:f,ctx:r}),o.$set(j)},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(y),T(s,r),T(o,r)}}}function Gl(U){let s;return{c(){s=Tl("Different values of `actions_per_chunk` and `chunk_size_threshold` do result\n  in different behaviours.")},l(y){s=Jl(y,"Different values of `actions_per_chunk` and `chunk_size_threshold` do result\n  in different behaviours.")},m(y,o){n(y,s,o)},d(y){y&&l(s)}}}function _l(U){let s,y,o,J,r,f,b,j,k,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!`,be,X,Ct="<strong>What you’ll learn:</strong>",je,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,Q,_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,x,Ge,z,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,R,Ze,S,Nt=`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,Ne,A,kt="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:",ke,E,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>",Qe,D,Qt="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>',xe,O,ze,K,Le,ee,xt=`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.`,Re,I,zt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/async-inference/sync.png" width="80%"/>',Se,v,Lt=`<i>Synchronous inference</i> makes the robot idle while the policy is
  computing the next chunk of actions.`,He,te,Rt=`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.`,Ae,g,St='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/async-inference/async.png" width="80%"/>',Ee,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,At=`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,Et="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,ye,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.',yt,Me,Mt,ue,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>`,ut,$,tl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/async-inference/queues.png" width="80%"/>',ht,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,he,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>",Ut,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/huggingface/lerobot/issues" rel="nofollow">GitHub repository</a>.`,bt,Je,jt,Ue,It;return r=new Ul({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),b=new N({props:{title:"Asynchronous Inference",local:"asynchronous-inference",headingTag:"h1"}}),x=new N({props:{title:"Getting started with async inference",local:"getting-started-with-async-inference",headingTag:"h2"}}),R=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}}),E=new fe({props:{code:"cHl0aG9uJTIwLW0lMjBsZXJvYm90LmFzeW5jX2luZmVyZW5jZS5yb2JvdF9jbGllbnQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNlcnZlcl9hZGRyZXNzJTNEMTI3LjAuMC4xJTNBODA4MCUyMCU1QyUyMCUyMyUyMFNFUlZFUiUzQSUyMHR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zJTIwUE9MSUNZJTNBJTIwdGhlJTIwbnVtYmVyJTIwb2YlMjBhY3Rpb25zJTIwdG8lMjBvdXRwdXQlMjBhdCUyMG9uY2UlMEElMjAlMjAlMjAlMjAtLWNodW5rX3NpemVfdGhyZXNob2xkJTNEMC41JTIwJTVDJTIwJTIzJTIwQ0xJRU5UJTNBJTIwdGhlJTIwdGhyZXNob2xkJTIwZm9yJTIwdGhlJTIwY2h1bmslMjBzaXplJTIwYmVmb3JlJTIwc2VuZGluZyUyMGElMjBuZXclMjBvYnNlcnZhdGlvbiUyMHRvJTIwdGhlJTIwc2VydmVyJTBBJTIwJTIwJTIwJTIwLS1hZ2dyZWdhdGVfZm5fbmFtZSUzRHdlaWdodGVkX2F2ZXJhZ2UlMjAlNUMlMjAlMjMlMjBDTElFTlQlM0ElMjB0aGUlMjBmdW5jdGlvbiUyMHRvJTIwYWdncmVnYXRlJTIwYWN0aW9ucyUyMG9uJTIwb3ZlcmxhcHBpbmclMjBwb3J0aW9ucyUwQSUyMCUyMCUyMCUyMC0tZGVidWdfdmlzdWFsaXplX3F1ZXVlX3NpemUlM0RUcnVlJTIwJTIzJTIwQ0xJRU5UJTNBJTIwd2hldGhlciUyMHRvJTIwdmlzdWFsaXplJTIwdGhlJTIwcXVldWUlMjBzaXplJTIwYXQlMjBydW50aW1l",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 (cuda, mps, xpu, cpu)
    --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 N({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 N({props:{title:"Async vs. synchronous inference",local:"async-vs-synchronous-inference",headingTag:"h2"}}),le=new N({props:{title:"Start the Policy Server",local:"start-the-policy-server",headingTag:"h2"}}),C=new yl({props:{id:"start_policy_server",options:["Command","API example"],$$slots:{default:[vl]},$$scope:{ctx:U}}}),se=new N({props:{title:"Launch the Robot Client",local:"launch-the-robot-client",headingTag:"h2"}}),G=new yl({props:{id:"start_robot_client",options:["Command","API example"],$$slots:{default:[Cl]},$$scope:{ctx:U}}}),_=new fl({props:{$$slots:{default:[Gl]},$$scope:{ctx:U}}}),Me=new N({props:{title:"Tuning async inference for your setup",local:"tuning-async-inference-for-your-setup",headingTag:"h3"}}),he=new N({props:{title:"Conclusion",local:"conclusion",headingTag:"h2"}}),Je=new bl({props:{source:"https://github.com/huggingface/lerobot/blob/main/docs/source/async.mdx"}}),{c(){s=c("meta"),y=i(),o=c("p"),J=i(),u(r.$$.fragment),f=i(),u(b.$$.fragment),j=i(),k=c("p"),k.innerHTML=Bt,be=i(),X=c("p"),X.innerHTML=Ct,je=i(),Y=c("ol"),Y.innerHTML=Gt,Ie=i(),Q=c("p"),Q.innerHTML=_t,ve=i(),V=c("p"),V.innerHTML=$t,ge=i(),Be=c("hr"),Ce=i(),u(x.$$.fragment),Ge=i(),z=c("p"),z.innerHTML=Zt,_e=i(),L=c("p"),L.innerHTML=Wt,$e=i(),u(R.$$.fragment),Ze=i(),S=c("p"),S.textContent=Nt,We=i(),u(H.$$.fragment),Ne=i(),A=c("p"),A.innerHTML=kt,ke=i(),u(E.$$.fragment),Xe=i(),F=c("p"),F.textContent=Xt,Ye=i(),P=c("ul"),P.innerHTML=Yt,Qe=i(),D=c("p"),D.textContent=Qt,Ve=i(),q=c("ul"),q.innerHTML=Vt,xe=i(),u(O.$$.fragment),ze=i(),u(K.$$.fragment),Le=i(),ee=c("p"),ee.innerHTML=xt,Re=i(),I=c("p"),I.innerHTML=zt,Se=i(),v=c("p"),v.innerHTML=Lt,He=i(),te=c("p"),te.innerHTML=Rt,Ae=i(),g=c("p"),g.innerHTML=St,Ee=i(),B=c("p"),B.innerHTML=Ht,Fe=i(),Pe=c("hr"),De=i(),u(le.$$.fragment),qe=i(),ne=c("p"),ne.innerHTML=At,Oe=i(),u(C.$$.fragment),Ke=i(),oe=c("p"),oe.innerHTML=Et,et=i(),tt=c("hr"),lt=i(),u(se.$$.fragment),nt=i(),ie=c("p"),ie.innerHTML=Ft,ot=i(),u(G.$$.fragment),st=i(),ae=c("p"),ae.textContent=Pt,it=i(),re=c("table"),re.innerHTML=Dt,at=i(),u(_.$$.fragment),rt=i(),ce=c("p"),ce.innerHTML=qt,ct=i(),pe=c("p"),pe.innerHTML=Ot,pt=i(),ye=c("p"),ye.innerHTML=Kt,yt=i(),u(Me.$$.fragment),Mt=i(),ue=c("ol"),ue.innerHTML=el,ut=i(),$=c("p"),$.innerHTML=tl,ht=i(),Z=c("p"),Z.innerHTML=ll,dt=i(),mt=c("hr"),wt=i(),u(he.$$.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,Ut=i(),Te=c("p"),Te.innerHTML=il,bt=i(),u(Je.$$.fragment),jt=i(),Ue=c("p"),this.h()},l(e){const t=ml("svelte-u9bgzb",document.head);s=p(t,"META",{name:!0,content:!0}),t.forEach(l),y=a(e),o=p(e,"P",{}),pl(o).forEach(l),J=a(e),h(r.$$.fragment,e),f=a(e),h(b.$$.fragment,e),j=a(e),k=p(e,"P",{"data-svelte-h":!0}),M(k)!=="svelte-1grquz4"&&(k.innerHTML=Bt),be=a(e),X=p(e,"P",{"data-svelte-h":!0}),M(X)!=="svelte-qtpxdt"&&(X.innerHTML=Ct),je=a(e),Y=p(e,"OL",{"data-svelte-h":!0}),M(Y)!=="svelte-1rnlps9"&&(Y.innerHTML=Gt),Ie=a(e),Q=p(e,"P",{"data-svelte-h":!0}),M(Q)!=="svelte-1gwyflc"&&(Q.innerHTML=_t),ve=a(e),V=p(e,"P",{"data-svelte-h":!0}),M(V)!=="svelte-z33upu"&&(V.innerHTML=$t),ge=a(e),Be=p(e,"HR",{}),Ce=a(e),h(x.$$.fragment,e),Ge=a(e),z=p(e,"P",{"data-svelte-h":!0}),M(z)!=="svelte-dc7wnn"&&(z.innerHTML=Zt),_e=a(e),L=p(e,"P",{"data-svelte-h":!0}),M(L)!=="svelte-lllvpj"&&(L.innerHTML=Wt),$e=a(e),h(R.$$.fragment,e),Ze=a(e),S=p(e,"P",{"data-svelte-h":!0}),M(S)!=="svelte-o9nz2v"&&(S.textContent=Nt),We=a(e),h(H.$$.fragment,e),Ne=a(e),A=p(e,"P",{"data-svelte-h":!0}),M(A)!=="svelte-1s4pcoy"&&(A.innerHTML=kt),ke=a(e),h(E.$$.fragment,e),Xe=a(e),F=p(e,"P",{"data-svelte-h":!0}),M(F)!=="svelte-1h4pflk"&&(F.textContent=Xt),Ye=a(e),P=p(e,"UL",{"data-svelte-h":!0}),M(P)!=="svelte-glkyog"&&(P.innerHTML=Yt),Qe=a(e),D=p(e,"P",{"data-svelte-h":!0}),M(D)!=="svelte-mjg4q5"&&(D.textContent=Qt),Ve=a(e),q=p(e,"UL",{"data-svelte-h":!0}),M(q)!=="svelte-1notb6i"&&(q.innerHTML=Vt),xe=a(e),h(O.$$.fragment,e),ze=a(e),h(K.$$.fragment,e),Le=a(e),ee=p(e,"P",{"data-svelte-h":!0}),M(ee)!=="svelte-q4wltw"&&(ee.innerHTML=xt),Re=a(e),I=p(e,"P",{align:!0,"data-svelte-h":!0}),M(I)!=="svelte-10cfi8e"&&(I.innerHTML=zt),Se=a(e),v=p(e,"P",{align:!0,"data-svelte-h":!0}),M(v)!=="svelte-nqo5ib"&&(v.innerHTML=Lt),He=a(e),te=p(e,"P",{"data-svelte-h":!0}),M(te)!=="svelte-11p5v55"&&(te.innerHTML=Rt),Ae=a(e),g=p(e,"P",{align:!0,"data-svelte-h":!0}),M(g)!=="svelte-a8x2pl"&&(g.innerHTML=St),Ee=a(e),B=p(e,"P",{align:!0,"data-svelte-h":!0}),M(B)!=="svelte-ev3be1"&&(B.innerHTML=Ht),Fe=a(e),Pe=p(e,"HR",{}),De=a(e),h(le.$$.fragment,e),qe=a(e),ne=p(e,"P",{"data-svelte-h":!0}),M(ne)!=="svelte-xnp609"&&(ne.innerHTML=At),Oe=a(e),h(C.$$.fragment,e),Ke=a(e),oe=p(e,"P",{"data-svelte-h":!0}),M(oe)!=="svelte-1bimxlr"&&(oe.innerHTML=Et),et=a(e),tt=p(e,"HR",{}),lt=a(e),h(se.$$.fragment,e),nt=a(e),ie=p(e,"P",{"data-svelte-h":!0}),M(ie)!=="svelte-ov7xtn"&&(ie.innerHTML=Ft),ot=a(e),h(G.$$.fragment,e),st=a(e),ae=p(e,"P",{"data-svelte-h":!0}),M(ae)!=="svelte-1txlh3i"&&(ae.textContent=Pt),it=a(e),re=p(e,"TABLE",{"data-svelte-h":!0}),M(re)!=="svelte-zlc5ky"&&(re.innerHTML=Dt),at=a(e),h(_.$$.fragment,e),rt=a(e),ce=p(e,"P",{"data-svelte-h":!0}),M(ce)!=="svelte-1wcr4ad"&&(ce.innerHTML=qt),ct=a(e),pe=p(e,"P",{"data-svelte-h":!0}),M(pe)!=="svelte-1e8rfth"&&(pe.innerHTML=Ot),pt=a(e),ye=p(e,"P",{"data-svelte-h":!0}),M(ye)!=="svelte-7n3gup"&&(ye.innerHTML=Kt),yt=a(e),h(Me.$$.fragment,e),Mt=a(e),ue=p(e,"OL",{"data-svelte-h":!0}),M(ue)!=="svelte-1fwwdbp"&&(ue.innerHTML=el),ut=a(e),$=p(e,"P",{align:!0,"data-svelte-h":!0}),M($)!=="svelte-1rfo7vb"&&($.innerHTML=tl),ht=a(e),Z=p(e,"P",{align:!0,"data-svelte-h":!0}),M(Z)!=="svelte-9t9eym"&&(Z.innerHTML=ll),dt=a(e),mt=p(e,"HR",{}),wt=a(e),h(he.$$.fragment,e),Tt=a(e),de=p(e,"P",{"data-svelte-h":!0}),M(de)!=="svelte-2fpn4u"&&(de.textContent=nl),Jt=a(e),me=p(e,"P",{"data-svelte-h":!0}),M(me)!=="svelte-10mg9xa"&&(me.innerHTML=ol),ft=a(e),we=p(e,"UL",{"data-svelte-h":!0}),M(we)!=="svelte-loclkx"&&(we.innerHTML=sl),Ut=a(e),Te=p(e,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-kqkix9"&&(Te.innerHTML=il),bt=a(e),h(Je.$$.fragment,e),jt=a(e),Ue=p(e,"P",{}),pl(Ue).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,y,t),n(e,o,t),n(e,J,t),d(r,e,t),n(e,f,t),d(b,e,t),n(e,j,t),n(e,k,t),n(e,be,t),n(e,X,t),n(e,je,t),n(e,Y,t),n(e,Ie,t),n(e,Q,t),n(e,ve,t),n(e,V,t),n(e,ge,t),n(e,Be,t),n(e,Ce,t),d(x,e,t),n(e,Ge,t),n(e,z,t),n(e,_e,t),n(e,L,t),n(e,$e,t),d(R,e,t),n(e,Ze,t),n(e,S,t),n(e,We,t),d(H,e,t),n(e,Ne,t),n(e,A,t),n(e,ke,t),d(E,e,t),n(e,Xe,t),n(e,F,t),n(e,Ye,t),n(e,P,t),n(e,Qe,t),n(e,D,t),n(e,Ve,t),n(e,q,t),n(e,xe,t),d(O,e,t),n(e,ze,t),d(K,e,t),n(e,Le,t),n(e,ee,t),n(e,Re,t),n(e,I,t),n(e,Se,t),n(e,v,t),n(e,He,t),n(e,te,t),n(e,Ae,t),n(e,g,t),n(e,Ee,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,ye,t),n(e,yt,t),d(Me,e,t),n(e,Mt,t),n(e,ue,t),n(e,ut,t),n(e,$,t),n(e,ht,t),n(e,Z,t),n(e,dt,t),n(e,mt,t),n(e,wt,t),d(he,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,Ut,t),n(e,Te,t),n(e,bt,t),d(Je,e,t),n(e,jt,t),n(e,Ue,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(b.$$.fragment,e),m(x.$$.fragment,e),m(R.$$.fragment,e),m(H.$$.fragment,e),m(E.$$.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(Me.$$.fragment,e),m(he.$$.fragment,e),m(Je.$$.fragment,e),It=!0)},o(e){w(r.$$.fragment,e),w(b.$$.fragment,e),w(x.$$.fragment,e),w(R.$$.fragment,e),w(H.$$.fragment,e),w(E.$$.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(Me.$$.fragment,e),w(he.$$.fragment,e),w(Je.$$.fragment,e),It=!1},d(e){e&&(l(y),l(o),l(J),l(f),l(j),l(k),l(be),l(X),l(je),l(Y),l(Ie),l(Q),l(ve),l(V),l(ge),l(Be),l(Ce),l(Ge),l(z),l(_e),l(L),l($e),l(Ze),l(S),l(We),l(Ne),l(A),l(ke),l(Xe),l(F),l(Ye),l(P),l(Qe),l(D),l(Ve),l(q),l(xe),l(ze),l(Le),l(ee),l(Re),l(I),l(Se),l(v),l(He),l(te),l(Ae),l(g),l(Ee),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(ye),l(yt),l(Mt),l(ue),l(ut),l($),l(ht),l(Z),l(dt),l(mt),l(wt),l(Tt),l(de),l(Jt),l(me),l(ft),l(we),l(Ut),l(Te),l(bt),l(jt),l(Ue)),l(s),T(r,e),T(b,e),T(x,e),T(R,e),T(H,e),T(E,e),T(O,e),T(K,e),T(le,e),T(C,e),T(se,e),T(G,e),T(_,e),T(Me,e),T(he,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(U){return ul(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xl extends hl{constructor(s){super(),dl(this,s,Zl,_l,Ml,{})}}export{xl as component};
