import{s as Ks,o as Os,n as $}from"../chunks/scheduler.eb244325.js";import{S as ea,i as ta,e as M,s as i,c as d,h as la,a as c,d as l,b as r,f as Ps,g as y,j as w,k as qs,l as sa,m as s,n as m,t as u,o as b,p as J}from"../chunks/index.3fe63ad3.js";import{C as aa}from"../chunks/CopyLLMTxtMenu.08242e11.js";import{C as g}from"../chunks/CodeBlock.91baa5b4.js";import{H as j,E as oa}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.234c3f85.js";import{H as pt,a as Z}from"../chunks/HfOption.0914e9f3.js";function na(f){let o,p;return o=new g({props:{code:"bGVyb2JvdC10ZWxlb3BlcmF0ZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcm9ib3QudHlwZSUzRHNvMTAxX2ZvbGxvd2VyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1yb2JvdC5wb3J0JTNEJTJGZGV2JTJGdHR5LnVzYm1vZGVtNTg3NjA0MzE1NDElMjAlNUMlMEElMjAlMjAlMjAlMjAtLXJvYm90LmlkJTNEbXlfYXdlc29tZV9mb2xsb3dlcl9hcm0lMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRlbGVvcC50eXBlJTNEc28xMDFfbGVhZGVyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AucG9ydCUzRCUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NzYwNDMxNTUxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AuaWQlM0RteV9hd2Vzb21lX2xlYWRlcl9hcm0=",highlighted:`lerobot-teleoperate \\
    --robot.type=so101_follower \\
    --robot.port=/dev/tty.usbmodem58760431541 \\
    --robot.id=my_awesome_follower_arm \\
    --teleop.type=so101_leader \\
    --teleop.port=/dev/tty.usbmodem58760431551 \\
    --teleop.id=my_awesome_leader_arm`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function ia(f){let o,p;return o=new g({props:{code:"ZnJvbSUyMGxlcm9ib3QudGVsZW9wZXJhdG9ycy5zbzEwMV9sZWFkZXIlMjBpbXBvcnQlMjBTTzEwMUxlYWRlckNvbmZpZyUyQyUyMFNPMTAxTGVhZGVyJTBBZnJvbSUyMGxlcm9ib3Qucm9ib3RzLnNvMTAxX2ZvbGxvd2VyJTIwaW1wb3J0JTIwU08xMDFGb2xsb3dlckNvbmZpZyUyQyUyMFNPMTAxRm9sbG93ZXIlMEElMEFyb2JvdF9jb25maWclMjAlM0QlMjBTTzEwMUZvbGxvd2VyQ29uZmlnKCUwQSUyMCUyMCUyMCUyMHBvcnQlM0QlMjIlMkZkZXYlMkZ0dHkudXNibW9kZW01ODc2MDQzMTU0MSUyMiUyQyUwQSUyMCUyMCUyMCUyMGlkJTNEJTIybXlfcmVkX3JvYm90X2FybSUyMiUyQyUwQSklMEElMEF0ZWxlb3BfY29uZmlnJTIwJTNEJTIwU08xMDFMZWFkZXJDb25maWcoJTBBJTIwJTIwJTIwJTIwcG9ydCUzRCUyMiUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NzYwNDMxNTUxJTIyJTJDJTBBJTIwJTIwJTIwJTIwaWQlM0QlMjJteV9ibHVlX2xlYWRlcl9hcm0lMjIlMkMlMEEpJTBBJTBBcm9ib3QlMjAlM0QlMjBTTzEwMUZvbGxvd2VyKHJvYm90X2NvbmZpZyklMEF0ZWxlb3BfZGV2aWNlJTIwJTNEJTIwU08xMDFMZWFkZXIodGVsZW9wX2NvbmZpZyklMEFyb2JvdC5jb25uZWN0KCklMEF0ZWxlb3BfZGV2aWNlLmNvbm5lY3QoKSUwQSUwQXdoaWxlJTIwVHJ1ZSUzQSUwQSUyMCUyMCUyMCUyMGFjdGlvbiUyMCUzRCUyMHRlbGVvcF9kZXZpY2UuZ2V0X2FjdGlvbigpJTBBJTIwJTIwJTIwJTIwcm9ib3Quc2VuZF9hY3Rpb24oYWN0aW9uKQ==",highlighted:`<span class="hljs-keyword">from</span> lerobot.teleoperators.so101_leader <span class="hljs-keyword">import</span> SO101LeaderConfig, SO101Leader
<span class="hljs-keyword">from</span> lerobot.robots.so101_follower <span class="hljs-keyword">import</span> SO101FollowerConfig, SO101Follower

robot_config = SO101FollowerConfig(
    port=<span class="hljs-string">&quot;/dev/tty.usbmodem58760431541&quot;</span>,
    <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_red_robot_arm&quot;</span>,
)

teleop_config = SO101LeaderConfig(
    port=<span class="hljs-string">&quot;/dev/tty.usbmodem58760431551&quot;</span>,
    <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_blue_leader_arm&quot;</span>,
)

robot = SO101Follower(robot_config)
teleop_device = SO101Leader(teleop_config)
robot.connect()
teleop_device.connect()

<span class="hljs-keyword">while</span> <span class="hljs-literal">True</span>:
    action = teleop_device.get_action()
    robot.send_action(action)`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function ra(f){let o,p,a,T;return o=new Z({props:{id:"teleoperate_so101",option:"Command",$$slots:{default:[na]},$$scope:{ctx:f}}}),a=new Z({props:{id:"teleoperate_so101",option:"API example",$$slots:{default:[ia]},$$scope:{ctx:f}}}),{c(){d(o.$$.fragment),p=i(),d(a.$$.fragment)},l(n){y(o.$$.fragment,n),p=r(n),y(a.$$.fragment,n)},m(n,U){m(o,n,U),s(n,p,U),m(a,n,U),T=!0},p(n,U){const h={};U&2&&(h.$$scope={dirty:U,ctx:n}),o.$set(h);const C={};U&2&&(C.$$scope={dirty:U,ctx:n}),a.$set(C)},i(n){T||(u(o.$$.fragment,n),u(a.$$.fragment,n),T=!0)},o(n){b(o.$$.fragment,n),b(a.$$.fragment,n),T=!1},d(n){n&&l(p),J(o,n),J(a,n)}}}function pa(f){let o,p;return o=new g({props:{code:"bGVyb2JvdC10ZWxlb3BlcmF0ZSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcm9ib3QudHlwZSUzRGtvY2hfZm9sbG93ZXIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXJvYm90LnBvcnQlM0QlMkZkZXYlMkZ0dHkudXNibW9kZW01ODc2MDQzMTU0MSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcm9ib3QuaWQlM0RteV9hd2Vzb21lX2ZvbGxvd2VyX2FybSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcm9ib3QuY2FtZXJhcyUzRCUyMiU3QiUyMGZyb250JTNBJTIwJTdCdHlwZSUzQSUyMG9wZW5jdiUyQyUyMGluZGV4X29yX3BhdGglM0ElMjAwJTJDJTIwd2lkdGglM0ElMjAxOTIwJTJDJTIwaGVpZ2h0JTNBJTIwMTA4MCUyQyUyMGZwcyUzQSUyMDMwJTdEJTdEJTIyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AudHlwZSUzRGtvY2hfbGVhZGVyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AucG9ydCUzRCUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NzYwNDMxNTUxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AuaWQlM0RteV9hd2Vzb21lX2xlYWRlcl9hcm0lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRpc3BsYXlfZGF0YSUzRHRydWU=",highlighted:`lerobot-teleoperate \\
    --robot.type=koch_follower \\
    --robot.port=/dev/tty.usbmodem58760431541 \\
    --robot.id=my_awesome_follower_arm \\
    --robot.cameras=<span class="hljs-string">&quot;{ front: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30}}&quot;</span> \\
    --teleop.type=koch_leader \\
    --teleop.port=/dev/tty.usbmodem58760431551 \\
    --teleop.id=my_awesome_leader_arm \\
    --display_data=<span class="hljs-literal">true</span>`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function Ma(f){let o,p;return o=new g({props:{code:"ZnJvbSUyMGxlcm9ib3QuY2FtZXJhcy5vcGVuY3YuY29uZmlndXJhdGlvbl9vcGVuY3YlMjBpbXBvcnQlMjBPcGVuQ1ZDYW1lcmFDb25maWclMEFmcm9tJTIwbGVyb2JvdC50ZWxlb3BlcmF0b3JzLmtvY2hfbGVhZGVyJTIwaW1wb3J0JTIwS29jaExlYWRlckNvbmZpZyUyQyUyMEtvY2hMZWFkZXIlMEFmcm9tJTIwbGVyb2JvdC5yb2JvdHMua29jaF9mb2xsb3dlciUyMGltcG9ydCUyMEtvY2hGb2xsb3dlckNvbmZpZyUyQyUyMEtvY2hGb2xsb3dlciUwQSUwQWNhbWVyYV9jb25maWclMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJmcm9udCUyMiUzQSUyME9wZW5DVkNhbWVyYUNvbmZpZyhpbmRleF9vcl9wYXRoJTNEMCUyQyUyMHdpZHRoJTNEMTkyMCUyQyUyMGhlaWdodCUzRDEwODAlMkMlMjBmcHMlM0QzMCklMEElN0QlMEElMEFyb2JvdF9jb25maWclMjAlM0QlMjBLb2NoRm9sbG93ZXJDb25maWcoJTBBJTIwJTIwJTIwJTIwcG9ydCUzRCUyMiUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NUEwMDc2ODQxJTIyJTJDJTBBJTIwJTIwJTIwJTIwaWQlM0QlMjJteV9yZWRfcm9ib3RfYXJtJTIyJTJDJTBBJTIwJTIwJTIwJTIwY2FtZXJhcyUzRGNhbWVyYV9jb25maWclMEEpJTBBJTBBdGVsZW9wX2NvbmZpZyUyMCUzRCUyMEtvY2hMZWFkZXJDb25maWcoJTBBJTIwJTIwJTIwJTIwcG9ydCUzRCUyMiUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NzYwNDMxNTUxJTIyJTJDJTBBJTIwJTIwJTIwJTIwaWQlM0QlMjJteV9ibHVlX2xlYWRlcl9hcm0lMjIlMkMlMEEpJTBBJTBBcm9ib3QlMjAlM0QlMjBLb2NoRm9sbG93ZXIocm9ib3RfY29uZmlnKSUwQXRlbGVvcF9kZXZpY2UlMjAlM0QlMjBLb2NoTGVhZGVyKHRlbGVvcF9jb25maWcpJTBBcm9ib3QuY29ubmVjdCgpJTBBdGVsZW9wX2RldmljZS5jb25uZWN0KCklMEElMEF3aGlsZSUyMFRydWUlM0ElMEElMjAlMjAlMjAlMjBvYnNlcnZhdGlvbiUyMCUzRCUyMHJvYm90LmdldF9vYnNlcnZhdGlvbigpJTBBJTIwJTIwJTIwJTIwYWN0aW9uJTIwJTNEJTIwdGVsZW9wX2RldmljZS5nZXRfYWN0aW9uKCklMEElMjAlMjAlMjAlMjByb2JvdC5zZW5kX2FjdGlvbihhY3Rpb24p",highlighted:`<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.teleoperators.koch_leader <span class="hljs-keyword">import</span> KochLeaderConfig, KochLeader
<span class="hljs-keyword">from</span> lerobot.robots.koch_follower <span class="hljs-keyword">import</span> KochFollowerConfig, KochFollower

camera_config = {
    <span class="hljs-string">&quot;front&quot;</span>: OpenCVCameraConfig(index_or_path=<span class="hljs-number">0</span>, width=<span class="hljs-number">1920</span>, height=<span class="hljs-number">1080</span>, fps=<span class="hljs-number">30</span>)
}

robot_config = KochFollowerConfig(
    port=<span class="hljs-string">&quot;/dev/tty.usbmodem585A0076841&quot;</span>,
    <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_red_robot_arm&quot;</span>,
    cameras=camera_config
)

teleop_config = KochLeaderConfig(
    port=<span class="hljs-string">&quot;/dev/tty.usbmodem58760431551&quot;</span>,
    <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_blue_leader_arm&quot;</span>,
)

robot = KochFollower(robot_config)
teleop_device = KochLeader(teleop_config)
robot.connect()
teleop_device.connect()

<span class="hljs-keyword">while</span> <span class="hljs-literal">True</span>:
    observation = robot.get_observation()
    action = teleop_device.get_action()
    robot.send_action(action)`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function ca(f){let o,p,a,T;return o=new Z({props:{id:"teleoperate_koch_camera",option:"Command",$$slots:{default:[pa]},$$scope:{ctx:f}}}),a=new Z({props:{id:"teleoperate_koch_camera",option:"API example",$$slots:{default:[Ma]},$$scope:{ctx:f}}}),{c(){d(o.$$.fragment),p=i(),d(a.$$.fragment)},l(n){y(o.$$.fragment,n),p=r(n),y(a.$$.fragment,n)},m(n,U){m(o,n,U),s(n,p,U),m(a,n,U),T=!0},p(n,U){const h={};U&2&&(h.$$scope={dirty:U,ctx:n}),o.$set(h);const C={};U&2&&(C.$$scope={dirty:U,ctx:n}),a.$set(C)},i(n){T||(u(o.$$.fragment,n),u(a.$$.fragment,n),T=!0)},o(n){b(o.$$.fragment,n),b(a.$$.fragment,n),T=!1},d(n){n&&l(p),J(o,n),J(a,n)}}}function da(f){let o,p;return o=new g({props:{code:"bGVyb2JvdC1yZWNvcmQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXJvYm90LnR5cGUlM0RzbzEwMV9mb2xsb3dlciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcm9ib3QucG9ydCUzRCUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NUEwMDc2ODQxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1yb2JvdC5pZCUzRG15X2F3ZXNvbWVfZm9sbG93ZXJfYXJtJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1yb2JvdC5jYW1lcmFzJTNEJTIyJTdCJTIwZnJvbnQlM0ElMjAlN0J0eXBlJTNBJTIwb3BlbmN2JTJDJTIwaW5kZXhfb3JfcGF0aCUzQSUyMDAlMkMlMjB3aWR0aCUzQSUyMDE5MjAlMkMlMjBoZWlnaHQlM0ElMjAxMDgwJTJDJTIwZnBzJTNBJTIwMzAlN0QlN0QlMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXRlbGVvcC50eXBlJTNEc28xMDFfbGVhZGVyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AucG9ydCUzRCUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NzYwNDMxNTUxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS10ZWxlb3AuaWQlM0RteV9hd2Vzb21lX2xlYWRlcl9hcm0lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRpc3BsYXlfZGF0YSUzRHRydWUlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXQucmVwb19pZCUzRCUyNCU3QkhGX1VTRVIlN0QlMkZyZWNvcmQtdGVzdCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldC5udW1fZXBpc29kZXMlM0Q1JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0LnNpbmdsZV90YXNrJTNEJTIyR3JhYiUyMHRoZSUyMGJsYWNrJTIwY3ViZSUyMg==",highlighted:`lerobot-record \\
    --robot.type=so101_follower \\
    --robot.port=/dev/tty.usbmodem585A0076841 \\
    --robot.id=my_awesome_follower_arm \\
    --robot.cameras=<span class="hljs-string">&quot;{ front: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30}}&quot;</span> \\
    --teleop.type=so101_leader \\
    --teleop.port=/dev/tty.usbmodem58760431551 \\
    --teleop.id=my_awesome_leader_arm \\
    --display_data=<span class="hljs-literal">true</span> \\
    --dataset.repo_id=<span class="hljs-variable">\${HF_USER}</span>/record-test \\
    --dataset.num_episodes=5 \\
    --dataset.single_task=<span class="hljs-string">&quot;Grab the black cube&quot;</span>`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function ya(f){let o,p;return o=new g({props:{code:" ",highlighted:`<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.datasets.lerobot_dataset <span class="hljs-keyword">import</span> LeRobotDataset
<span class="hljs-keyword">from</span> lerobot.datasets.utils <span class="hljs-keyword">import</span> hw_to_dataset_features
<span class="hljs-keyword">from</span> lerobot.robots.so100_follower <span class="hljs-keyword">import</span> SO100Follower, SO100FollowerConfig
<span class="hljs-keyword">from</span> lerobot.teleoperators.so100_leader.config_so100_leader <span class="hljs-keyword">import</span> SO100LeaderConfig
<span class="hljs-keyword">from</span> lerobot.teleoperators.so100_leader.so100_leader <span class="hljs-keyword">import</span> SO100Leader
<span class="hljs-keyword">from</span> lerobot.utils.control_utils <span class="hljs-keyword">import</span> init_keyboard_listener
<span class="hljs-keyword">from</span> lerobot.utils.utils <span class="hljs-keyword">import</span> log_say
<span class="hljs-keyword">from</span> lerobot.utils.visualization_utils <span class="hljs-keyword">import</span> init_rerun
<span class="hljs-keyword">from</span> lerobot.record <span class="hljs-keyword">import</span> record_loop

NUM_EPISODES = <span class="hljs-number">5</span>
FPS = <span class="hljs-number">30</span>
EPISODE_TIME_SEC = <span class="hljs-number">60</span>
RESET_TIME_SEC = <span class="hljs-number">10</span>
TASK_DESCRIPTION = <span class="hljs-string">&quot;My task description&quot;</span>

<span class="hljs-comment"># Create the robot and teleoperator configurations</span>
camera_config = {<span class="hljs-string">&quot;front&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=FPS)}
robot_config = SO100FollowerConfig(
    port=<span class="hljs-string">&quot;/dev/tty.usbmodem58760434471&quot;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_awesome_follower_arm&quot;</span>, cameras=camera_config
)
teleop_config = SO100LeaderConfig(port=<span class="hljs-string">&quot;/dev/tty.usbmodem585A0077581&quot;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_awesome_leader_arm&quot;</span>)

<span class="hljs-comment"># Initialize the robot and teleoperator</span>
robot = SO100Follower(robot_config)
teleop = SO100Leader(teleop_config)

<span class="hljs-comment"># Configure the dataset features</span>
action_features = hw_to_dataset_features(robot.action_features, <span class="hljs-string">&quot;action&quot;</span>)
obs_features = hw_to_dataset_features(robot.observation_features, <span class="hljs-string">&quot;observation&quot;</span>)
dataset_features = {**action_features, **obs_features}

<span class="hljs-comment"># Create the dataset</span>
dataset = LeRobotDataset.create(
    repo_id=<span class="hljs-string">&quot;&lt;hf_username&gt;/&lt;dataset_repo_id&gt;&quot;</span>,
    fps=FPS,
    features=dataset_features,
    robot_type=robot.name,
    use_videos=<span class="hljs-literal">True</span>,
    image_writer_threads=<span class="hljs-number">4</span>,
)

<span class="hljs-comment"># Initialize the keyboard listener and rerun visualization</span>
_, events = init_keyboard_listener()
init_rerun(session_name=<span class="hljs-string">&quot;recording&quot;</span>)

<span class="hljs-comment"># Connect the robot and teleoperator</span>
robot.connect()
teleop.connect()

episode_idx = <span class="hljs-number">0</span>
<span class="hljs-keyword">while</span> episode_idx &lt; NUM_EPISODES <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> events[<span class="hljs-string">&quot;stop_recording&quot;</span>]:
    log_say(<span class="hljs-string">f&quot;Recording episode <span class="hljs-subst">{episode_idx + <span class="hljs-number">1</span>}</span> of <span class="hljs-subst">{NUM_EPISODES}</span>&quot;</span>)

    record_loop(
        robot=robot,
        events=events,
        fps=FPS,
        teleop=teleop,
        dataset=dataset,
        control_time_s=EPISODE_TIME_SEC,
        single_task=TASK_DESCRIPTION,
        display_data=<span class="hljs-literal">True</span>,
    )

    <span class="hljs-comment"># Reset the environment if not stopping or re-recording</span>
    <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> events[<span class="hljs-string">&quot;stop_recording&quot;</span>] <span class="hljs-keyword">and</span> (episode_idx &lt; NUM_EPISODES - <span class="hljs-number">1</span> <span class="hljs-keyword">or</span> events[<span class="hljs-string">&quot;rerecord_episode&quot;</span>]):
        log_say(<span class="hljs-string">&quot;Reset the environment&quot;</span>)
        record_loop(
            robot=robot,
            events=events,
            fps=FPS,
            teleop=teleop,
            control_time_s=RESET_TIME_SEC,
            single_task=TASK_DESCRIPTION,
            display_data=<span class="hljs-literal">True</span>,
        )

    <span class="hljs-keyword">if</span> events[<span class="hljs-string">&quot;rerecord_episode&quot;</span>]:
        log_say(<span class="hljs-string">&quot;Re-recording episode&quot;</span>)
        events[<span class="hljs-string">&quot;rerecord_episode&quot;</span>] = <span class="hljs-literal">False</span>
        events[<span class="hljs-string">&quot;exit_early&quot;</span>] = <span class="hljs-literal">False</span>
        dataset.clear_episode_buffer()
        <span class="hljs-keyword">continue</span>

    dataset.save_episode()
    episode_idx += <span class="hljs-number">1</span>

<span class="hljs-comment"># Clean up</span>
log_say(<span class="hljs-string">&quot;Stop recording&quot;</span>)
robot.disconnect()
teleop.disconnect()
dataset.push_to_hub()`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function ma(f){let o,p,a,T;return o=new Z({props:{id:"record",option:"Command",$$slots:{default:[da]},$$scope:{ctx:f}}}),a=new Z({props:{id:"record",option:"API example",$$slots:{default:[ya]},$$scope:{ctx:f}}}),{c(){d(o.$$.fragment),p=i(),d(a.$$.fragment)},l(n){y(o.$$.fragment,n),p=r(n),y(a.$$.fragment,n)},m(n,U){m(o,n,U),s(n,p,U),m(a,n,U),T=!0},p(n,U){const h={};U&2&&(h.$$scope={dirty:U,ctx:n}),o.$set(h);const C={};U&2&&(C.$$scope={dirty:U,ctx:n}),a.$set(C)},i(n){T||(u(o.$$.fragment,n),u(a.$$.fragment,n),T=!0)},o(n){b(o.$$.fragment,n),b(a.$$.fragment,n),T=!1},d(n){n&&l(p),J(o,n),J(a,n)}}}function ua(f){let o,p;return o=new g({props:{code:"bGVyb2JvdC1yZXBsYXklMjAlNUMlMEElMjAlMjAlMjAlMjAtLXJvYm90LnR5cGUlM0RzbzEwMV9mb2xsb3dlciUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcm9ib3QucG9ydCUzRCUyRmRldiUyRnR0eS51c2Jtb2RlbTU4NzYwNDMxNTQxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1yb2JvdC5pZCUzRG15X2F3ZXNvbWVfZm9sbG93ZXJfYXJtJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1kYXRhc2V0LnJlcG9faWQlM0QlMjQlN0JIRl9VU0VSJTdEJTJGcmVjb3JkLXRlc3QlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWRhdGFzZXQuZXBpc29kZSUzRDAlMjAlMjMlMjBjaG9vc2UlMjB0aGUlMjBlcGlzb2RlJTIweW91JTIwd2FudCUyMHRvJTIwcmVwbGF5",highlighted:`lerobot-replay \\
    --robot.type=so101_follower \\
    --robot.port=/dev/tty.usbmodem58760431541 \\
    --robot.id=my_awesome_follower_arm \\
    --dataset.repo_id=<span class="hljs-variable">\${HF_USER}</span>/record-test \\
    --dataset.episode=0 <span class="hljs-comment"># choose the episode you want to replay</span>`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function ba(f){let o,p;return o=new g({props:{code:"aW1wb3J0JTIwdGltZSUwQSUwQWZyb20lMjBsZXJvYm90LmRhdGFzZXRzLmxlcm9ib3RfZGF0YXNldCUyMGltcG9ydCUyMExlUm9ib3REYXRhc2V0JTBBZnJvbSUyMGxlcm9ib3Qucm9ib3RzLnNvMTAwX2ZvbGxvd2VyLmNvbmZpZ19zbzEwMF9mb2xsb3dlciUyMGltcG9ydCUyMFNPMTAwRm9sbG93ZXJDb25maWclMEFmcm9tJTIwbGVyb2JvdC5yb2JvdHMuc28xMDBfZm9sbG93ZXIuc28xMDBfZm9sbG93ZXIlMjBpbXBvcnQlMjBTTzEwMEZvbGxvd2VyJTBBZnJvbSUyMGxlcm9ib3QudXRpbHMucm9ib3RfdXRpbHMlMjBpbXBvcnQlMjBidXN5X3dhaXQlMEFmcm9tJTIwbGVyb2JvdC51dGlscy51dGlscyUyMGltcG9ydCUyMGxvZ19zYXklMEElMEFlcGlzb2RlX2lkeCUyMCUzRCUyMDAlMEElMEFyb2JvdF9jb25maWclMjAlM0QlMjBTTzEwMEZvbGxvd2VyQ29uZmlnKHBvcnQlM0QlMjIlMkZkZXYlMkZ0dHkudXNibW9kZW01ODc2MDQzNDQ3MSUyMiUyQyUyMGlkJTNEJTIybXlfYXdlc29tZV9mb2xsb3dlcl9hcm0lMjIpJTBBJTBBcm9ib3QlMjAlM0QlMjBTTzEwMEZvbGxvd2VyKHJvYm90X2NvbmZpZyklMEFyb2JvdC5jb25uZWN0KCklMEElMEFkYXRhc2V0JTIwJTNEJTIwTGVSb2JvdERhdGFzZXQoJTIyJTNDaGZfdXNlcm5hbWUlM0UlMkYlM0NkYXRhc2V0X3JlcG9faWQlM0UlMjIlMkMlMjBlcGlzb2RlcyUzRCU1QmVwaXNvZGVfaWR4JTVEKSUwQWFjdGlvbnMlMjAlM0QlMjBkYXRhc2V0LmhmX2RhdGFzZXQuc2VsZWN0X2NvbHVtbnMoJTIyYWN0aW9uJTIyKSUwQSUwQWxvZ19zYXkoZiUyMlJlcGxheWluZyUyMGVwaXNvZGUlMjAlN0JlcGlzb2RlX2lkeCU3RCUyMiklMEFmb3IlMjBpZHglMjBpbiUyMHJhbmdlKGRhdGFzZXQubnVtX2ZyYW1lcyklM0ElMEElMjAlMjAlMjAlMjB0MCUyMCUzRCUyMHRpbWUucGVyZl9jb3VudGVyKCklMEElMEElMjAlMjAlMjAlMjBhY3Rpb24lMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBuYW1lJTNBJTIwZmxvYXQoYWN0aW9ucyU1QmlkeCU1RCU1QiUyMmFjdGlvbiUyMiU1RCU1QmklNUQpJTIwZm9yJTIwaSUyQyUyMG5hbWUlMjBpbiUyMGVudW1lcmF0ZShkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYWN0aW9uJTIyJTVEJTVCJTIybmFtZXMlMjIlNUQpJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwcm9ib3Quc2VuZF9hY3Rpb24oYWN0aW9uKSUwQSUwQSUyMCUyMCUyMCUyMGJ1c3lfd2FpdCgxLjAlMjAlMkYlMjBkYXRhc2V0LmZwcyUyMC0lMjAodGltZS5wZXJmX2NvdW50ZXIoKSUyMC0lMjB0MCkpJTBBJTBBcm9ib3QuZGlzY29ubmVjdCgp",highlighted:`<span class="hljs-keyword">import</span> time

<span class="hljs-keyword">from</span> lerobot.datasets.lerobot_dataset <span class="hljs-keyword">import</span> LeRobotDataset
<span class="hljs-keyword">from</span> lerobot.robots.so100_follower.config_so100_follower <span class="hljs-keyword">import</span> SO100FollowerConfig
<span class="hljs-keyword">from</span> lerobot.robots.so100_follower.so100_follower <span class="hljs-keyword">import</span> SO100Follower
<span class="hljs-keyword">from</span> lerobot.utils.robot_utils <span class="hljs-keyword">import</span> busy_wait
<span class="hljs-keyword">from</span> lerobot.utils.utils <span class="hljs-keyword">import</span> log_say

episode_idx = <span class="hljs-number">0</span>

robot_config = SO100FollowerConfig(port=<span class="hljs-string">&quot;/dev/tty.usbmodem58760434471&quot;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_awesome_follower_arm&quot;</span>)

robot = SO100Follower(robot_config)
robot.connect()

dataset = LeRobotDataset(<span class="hljs-string">&quot;&lt;hf_username&gt;/&lt;dataset_repo_id&gt;&quot;</span>, episodes=[episode_idx])
actions = dataset.hf_dataset.select_columns(<span class="hljs-string">&quot;action&quot;</span>)

log_say(<span class="hljs-string">f&quot;Replaying episode <span class="hljs-subst">{episode_idx}</span>&quot;</span>)
<span class="hljs-keyword">for</span> idx <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(dataset.num_frames):
    t0 = time.perf_counter()

    action = {
        name: <span class="hljs-built_in">float</span>(actions[idx][<span class="hljs-string">&quot;action&quot;</span>][i]) <span class="hljs-keyword">for</span> i, name <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(dataset.features[<span class="hljs-string">&quot;action&quot;</span>][<span class="hljs-string">&quot;names&quot;</span>])
    }
    robot.send_action(action)

    busy_wait(<span class="hljs-number">1.0</span> / dataset.fps - (time.perf_counter() - t0))

robot.disconnect()`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function Ja(f){let o,p,a,T;return o=new Z({props:{id:"replay",option:"Command",$$slots:{default:[ua]},$$scope:{ctx:f}}}),a=new Z({props:{id:"replay",option:"API example",$$slots:{default:[ba]},$$scope:{ctx:f}}}),{c(){d(o.$$.fragment),p=i(),d(a.$$.fragment)},l(n){y(o.$$.fragment,n),p=r(n),y(a.$$.fragment,n)},m(n,U){m(o,n,U),s(n,p,U),m(a,n,U),T=!0},p(n,U){const h={};U&2&&(h.$$scope={dirty:U,ctx:n}),o.$set(h);const C={};U&2&&(C.$$scope={dirty:U,ctx:n}),a.$set(C)},i(n){T||(u(o.$$.fragment,n),u(a.$$.fragment,n),T=!0)},o(n){b(o.$$.fragment,n),b(a.$$.fragment,n),T=!1},d(n){n&&l(p),J(o,n),J(a,n)}}}function wa(f){let o,p;return o=new g({props:{code:"bGVyb2JvdC1yZWNvcmQlMjAlMjAlNUMlMEElMjAlMjAtLXJvYm90LnR5cGUlM0RzbzEwMF9mb2xsb3dlciUyMCU1QyUwQSUyMCUyMC0tcm9ib3QucG9ydCUzRCUyRmRldiUyRnR0eUFDTTElMjAlNUMlMEElMjAlMjAtLXJvYm90LmNhbWVyYXMlM0QlMjIlN0IlMjB1cCUzQSUyMCU3QnR5cGUlM0ElMjBvcGVuY3YlMkMlMjBpbmRleF9vcl9wYXRoJTNBJTIwJTJGZGV2JTJGdmlkZW8xMCUyQyUyMHdpZHRoJTNBJTIwNjQwJTJDJTIwaGVpZ2h0JTNBJTIwNDgwJTJDJTIwZnBzJTNBJTIwMzAlN0QlMkMlMjBzaWRlJTNBJTIwJTdCdHlwZSUzQSUyMGludGVscmVhbHNlbnNlJTJDJTIwc2VyaWFsX251bWJlcl9vcl9uYW1lJTNBJTIwMjMzNTIyMDc0NjA2JTJDJTIwd2lkdGglM0ElMjA2NDAlMkMlMjBoZWlnaHQlM0ElMjA0ODAlMkMlMjBmcHMlM0ElMjAzMCU3RCU3RCUyMiUyMCU1QyUwQSUyMCUyMC0tcm9ib3QuaWQlM0RteV9hd2Vzb21lX2ZvbGxvd2VyX2FybSUyMCU1QyUwQSUyMCUyMC0tZGlzcGxheV9kYXRhJTNEZmFsc2UlMjAlNUMlMEElMjAlMjAtLWRhdGFzZXQucmVwb19pZCUzRCUyNCU3QkhGX1VTRVIlN0QlMkZldmFsX3NvMTAwJTIwJTVDJTBBJTIwJTIwLS1kYXRhc2V0LnNpbmdsZV90YXNrJTNEJTIyUHV0JTIwbGVnbyUyMGJyaWNrJTIwaW50byUyMHRoZSUyMHRyYW5zcGFyZW50JTIwYm94JTIyJTIwJTVDJTBBJTIwJTIwJTIzJTIwJTNDLSUyMFRlbGVvcCUyMG9wdGlvbmFsJTIwaWYlMjB5b3UlMjB3YW50JTIwdG8lMjB0ZWxlb3BlcmF0ZSUyMGluJTIwYmV0d2VlbiUyMGVwaXNvZGVzJTIwJTVDJTBBJTIwJTIwJTIzJTIwLS10ZWxlb3AudHlwZSUzRHNvMTAwX2xlYWRlciUyMCU1QyUwQSUyMCUyMCUyMyUyMC0tdGVsZW9wLnBvcnQlM0QlMkZkZXYlMkZ0dHlBQ00wJTIwJTVDJTBBJTIwJTIwJTIzJTIwLS10ZWxlb3AuaWQlM0RteV9hd2Vzb21lX2xlYWRlcl9hcm0lMjAlNUMlMEElMjAlMjAtLXBvbGljeS5wYXRoJTNEJTI0JTdCSEZfVVNFUiU3RCUyRm15X3BvbGljeQ==",highlighted:`lerobot-record  \\
  --robot.type=so100_follower \\
  --robot.port=/dev/ttyACM1 \\
  --robot.cameras=<span class="hljs-string">&quot;{ up: {type: opencv, index_or_path: /dev/video10, width: 640, height: 480, fps: 30}, side: {type: intelrealsense, serial_number_or_name: 233522074606, width: 640, height: 480, fps: 30}}&quot;</span> \\
  --robot.id=my_awesome_follower_arm \\
  --display_data=<span class="hljs-literal">false</span> \\
  --dataset.repo_id=<span class="hljs-variable">\${HF_USER}</span>/eval_so100 \\
  --dataset.single_task=<span class="hljs-string">&quot;Put lego brick into the transparent box&quot;</span> \\
  <span class="hljs-comment"># &lt;- Teleop optional if you want to teleoperate in between episodes \\</span>
  <span class="hljs-comment"># --teleop.type=so100_leader \\</span>
  <span class="hljs-comment"># --teleop.port=/dev/ttyACM0 \\</span>
  <span class="hljs-comment"># --teleop.id=my_awesome_leader_arm \\</span>
  --policy.path=<span class="hljs-variable">\${HF_USER}</span>/my_policy`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function Ta(f){let o,p;return o=new g({props:{code:" ",highlighted:`<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.datasets.lerobot_dataset <span class="hljs-keyword">import</span> LeRobotDataset
<span class="hljs-keyword">from</span> lerobot.datasets.utils <span class="hljs-keyword">import</span> hw_to_dataset_features
<span class="hljs-keyword">from</span> lerobot.policies.act.modeling_act <span class="hljs-keyword">import</span> ACTPolicy
<span class="hljs-keyword">from</span> lerobot.policies.factory <span class="hljs-keyword">import</span> make_pre_post_processors
<span class="hljs-keyword">from</span> lerobot.robots.so100_follower.config_so100_follower <span class="hljs-keyword">import</span> SO100FollowerConfig
<span class="hljs-keyword">from</span> lerobot.robots.so100_follower.so100_follower <span class="hljs-keyword">import</span> SO100Follower
<span class="hljs-keyword">from</span> lerobot.scripts.lerobot_record <span class="hljs-keyword">import</span> record_loop
<span class="hljs-keyword">from</span> lerobot.utils.control_utils <span class="hljs-keyword">import</span> init_keyboard_listener
<span class="hljs-keyword">from</span> lerobot.utils.utils <span class="hljs-keyword">import</span> log_say
<span class="hljs-keyword">from</span> lerobot.utils.visualization_utils <span class="hljs-keyword">import</span> init_rerun


NUM_EPISODES = <span class="hljs-number">5</span>
FPS = <span class="hljs-number">30</span>
EPISODE_TIME_SEC = <span class="hljs-number">60</span>
TASK_DESCRIPTION = <span class="hljs-string">&quot;My task description&quot;</span>
HF_MODEL_ID = <span class="hljs-string">&quot;&lt;hf_username&gt;/&lt;model_repo_id&gt;&quot;</span>
HF_DATASET_ID = <span class="hljs-string">&quot;&lt;hf_username&gt;/&lt;eval_dataset_repo_id&gt;&quot;</span>

<span class="hljs-comment"># Create the robot configuration</span>
camera_config = {<span class="hljs-string">&quot;front&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=FPS)}
robot_config = SO100FollowerConfig(
    port=<span class="hljs-string">&quot;/dev/tty.usbmodem58760434471&quot;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-string">&quot;my_awesome_follower_arm&quot;</span>, cameras=camera_config
)

<span class="hljs-comment"># Initialize the robot</span>
robot = SO100Follower(robot_config)

<span class="hljs-comment"># Initialize the policy</span>
policy = ACTPolicy.from_pretrained(HF_MODEL_ID)

<span class="hljs-comment"># Configure the dataset features</span>
action_features = hw_to_dataset_features(robot.action_features, <span class="hljs-string">&quot;action&quot;</span>)
obs_features = hw_to_dataset_features(robot.observation_features, <span class="hljs-string">&quot;observation&quot;</span>)
dataset_features = {**action_features, **obs_features}

<span class="hljs-comment"># Create the dataset</span>
dataset = LeRobotDataset.create(
    repo_id=HF_DATASET_ID,
    fps=FPS,
    features=dataset_features,
    robot_type=robot.name,
    use_videos=<span class="hljs-literal">True</span>,
    image_writer_threads=<span class="hljs-number">4</span>,
)

<span class="hljs-comment"># Initialize the keyboard listener and rerun visualization</span>
_, events = init_keyboard_listener()
init_rerun(session_name=<span class="hljs-string">&quot;recording&quot;</span>)

<span class="hljs-comment"># Connect the robot</span>
robot.connect()

preprocessor, postprocessor = make_pre_post_processors(
    policy_cfg=policy,
    pretrained_path=HF_MODEL_ID,
    dataset_stats=dataset.meta.stats,
)

<span class="hljs-keyword">for</span> episode_idx <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(NUM_EPISODES):
    log_say(<span class="hljs-string">f&quot;Running inference, recording eval episode <span class="hljs-subst">{episode_idx + <span class="hljs-number">1</span>}</span> of <span class="hljs-subst">{NUM_EPISODES}</span>&quot;</span>)

    <span class="hljs-comment"># Run the policy inference loop</span>
    record_loop(
        robot=robot,
        events=events,
        fps=FPS,
        policy=policy,
        preprocessor=preprocessor,
        postprocessor=postprocessor,
        dataset=dataset,
        control_time_s=EPISODE_TIME_SEC,
        single_task=TASK_DESCRIPTION,
        display_data=<span class="hljs-literal">True</span>,
    )

    dataset.save_episode()

<span class="hljs-comment"># Clean up</span>
robot.disconnect()
dataset.push_to_hub()`,wrap:!1}}),{c(){d(o.$$.fragment)},l(a){y(o.$$.fragment,a)},m(a,T){m(o,a,T),p=!0},p:$,i(a){p||(u(o.$$.fragment,a),p=!0)},o(a){b(o.$$.fragment,a),p=!1},d(a){J(o,a)}}}function Ua(f){let o,p,a,T;return o=new Z({props:{id:"eval",option:"Command",$$slots:{default:[wa]},$$scope:{ctx:f}}}),a=new Z({props:{id:"eval",option:"API example",$$slots:{default:[Ta]},$$scope:{ctx:f}}}),{c(){d(o.$$.fragment),p=i(),d(a.$$.fragment)},l(n){y(o.$$.fragment,n),p=r(n),y(a.$$.fragment,n)},m(n,U){m(o,n,U),s(n,p,U),m(a,n,U),T=!0},p(n,U){const h={};U&2&&(h.$$scope={dirty:U,ctx:n}),o.$set(h);const C={};U&2&&(C.$$scope={dirty:U,ctx:n}),a.$set(C)},i(n){T||(u(o.$$.fragment,n),u(a.$$.fragment,n),T=!0)},o(n){b(o.$$.fragment,n),b(a.$$.fragment,n),T=!1},d(n){n&&l(p),J(o,n),J(a,n)}}}function fa(f){let o,p,a,T,n,U,h,C,G,Yl="This tutorial will explain how to train a neural network to control a real robot autonomously.",Mt,E,zl="<strong>You’ll learn:</strong>",ct,B,Hl="<li>How to record and visualize your dataset.</li> <li>How to train a policy using your data and prepare it for evaluation.</li> <li>How to evaluate your policy and visualize the results.</li>",dt,X,Ll="By following these steps, you’ll be able to replicate tasks, such as picking up a Lego block and placing it in a bin with a high success rate, as shown in the video below.",yt,k,Dl='<summary><strong>Video: pickup lego block task</strong></summary> <div class="video-container"><video controls="" width="600"><source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/lerobot/lerobot_task.mp4" type="video/mp4"/></video></div>',mt,Q,Pl="This tutorial isn’t tied to a specific robot: we walk you through the commands and API snippets you can adapt for any supported platform.",ut,A,ql="During data collection, you’ll use a “teloperation” device, such as a leader arm or keyboard to teleoperate the robot and record its motion trajectories.",bt,N,Kl="Once you’ve gathered enough trajectories, you’ll train a neural network to imitate these trajectories and deploy the trained model so your robot can perform the task autonomously.",Jt,F,Ol='If you run into any issues at any point, jump into our <a href="https://discord.com/invite/s3KuuzsPFb" rel="nofollow">Discord community</a> for support.',wt,W,Tt,S,es="If you haven’t yet set up and calibrated your robot and teleop device, please do so by following the robot-specific tutorial.",Ut,x,ft,Y,ts="In this example, we’ll demonstrate how to teleoperate the SO101 robot. For each command, we also provide a corresponding API example.",ht,z,ls="Note that the <code>id</code> associated with a robot is used to store the calibration file. It’s important to use the same <code>id</code> when teleoperating, recording, and evaluating when using the same setup.",jt,I,Ct,H,ss="The teleoperate command will automatically:",gt,L,as="<li>Identify any missing calibrations and initiate the calibration procedure.</li> <li>Connect the robot and teleop device and start teleoperation.</li>",Zt,D,$t,P,os='To add cameras to your setup, follow this <a href="./cameras#setup-cameras">Guide</a>.',It,q,vt,K,ns="With <code>rerun</code>, you can teleoperate again while simultaneously visualizing the camera feeds and joint positions. In this example, we’re using the Koch arm.",_t,v,Rt,O,Vt,ee,is="Once you’re familiar with teleoperation, you can record your first dataset.",Gt,te,rs='We use the Hugging Face hub features for uploading your dataset. If you haven’t previously used the Hub, make sure you can login via the cli using a write-access token, this token can be generated from the <a href="https://huggingface.co/settings/tokens" rel="nofollow">Hugging Face settings</a>.',Et,le,ps="Add your token to the CLI by running this command:",Bt,se,Xt,ae,Ms="Then store your Hugging Face repository name in a variable:",kt,oe,Qt,ne,cs="Now you can record a dataset. To record 5 episodes and upload your dataset to the hub, adapt the code below for your robot and execute the command or API example.",At,_,Nt,ie,Ft,re,ds="Locally, your dataset is stored in this folder: <code>~/.cache/huggingface/lerobot/{repo-id}</code>. At the end of data recording, your dataset will be uploaded on your Hugging Face page (e.g. <code>https://huggingface.co/datasets/${HF_USER}/so101_test</code>) that you can obtain by running:",Wt,pe,St,Me,ys="Your dataset will be automatically tagged with <code>LeRobot</code> for the community to find it easily, and you can also add custom tags (in this case <code>tutorial</code> for example).",xt,ce,ms='You can look for other LeRobot datasets on the hub by searching for <code>LeRobot</code> <a href="https://huggingface.co/datasets?other=LeRobot" rel="nofollow">tags</a>.',Yt,de,us="You can also push your local dataset to the Hub manually, running:",zt,ye,Ht,me,Lt,ue,bs="The <code>record</code> function provides a suite of tools for capturing and managing data during robot operation:",Dt,be,Pt,Je,Js=`<li>Data is stored using the <code>LeRobotDataset</code> format and is stored on disk during recording.</li> <li>By default, the dataset is pushed to your Hugging Face page after recording.
<ul><li>To disable uploading, use <code>--dataset.push_to_hub=False</code>.</li></ul></li>`,qt,we,Kt,Te,ws="<li>Checkpoints are automatically created during recording.</li> <li>If an issue occurs, you can resume by re-running the same command with <code>--resume=true</code>. When resuming a recording, <code>--dataset.num_episodes</code> must be set to the <strong>number of additional episodes to be recorded</strong>, and not to the targeted total number of episodes in the dataset !</li> <li>To start recording from scratch, <strong>manually delete</strong> the dataset directory.</li>",Ot,Ue,el,fe,Ts="Set the flow of data recording using command-line arguments:",tl,he,Us=`<li><code>--dataset.episode_time_s=60</code>
Duration of each data recording episode (default: <strong>60 seconds</strong>).</li> <li><code>--dataset.reset_time_s=60</code>
Duration for resetting the environment after each episode (default: <strong>60 seconds</strong>).</li> <li><code>--dataset.num_episodes=50</code>
Total number of episodes to record (default: <strong>50</strong>).</li>`,ll,je,sl,Ce,fs="Control the data recording flow using keyboard shortcuts:",al,ge,hs="<li>Press <strong>Right Arrow (<code>→</code>)</strong>: Early stop the current episode or reset time and move to the next.</li> <li>Press <strong>Left Arrow (<code>←</code>)</strong>: Cancel the current episode and re-record it.</li> <li>Press <strong>Escape (<code>ESC</code>)</strong>: Immediately stop the session, encode videos, and upload the dataset.</li>",ol,Ze,nl,$e,js="Once you’re comfortable with data recording, you can create a larger dataset for training. A good starting task is grasping an object at different locations and placing it in a bin. We suggest recording at least 50 episodes, with 10 episodes per location. Keep the cameras fixed and maintain consistent grasping behavior throughout the recordings. Also make sure the object you are manipulating is visible on the camera’s. A good rule of thumb is you should be able to do the task yourself by only looking at the camera images.",il,Ie,Cs="In the following sections, you’ll train your neural network. After achieving reliable grasping performance, you can start introducing more variations during data collection, such as additional grasp locations, different grasping techniques, and altering camera positions.",rl,ve,gs="Avoid adding too much variation too quickly, as it may hinder your results.",pl,_e,Zs='If you want to dive deeper into this important topic, you can check out the <a href="https://huggingface.co/blog/lerobot-datasets#what-makes-a-good-dataset" rel="nofollow">blog post</a> we wrote on what makes a good dataset.',Ml,Re,cl,Ve,$s='<li>On Linux, if the left and right arrow keys and escape key don’t have any effect during data recording, make sure you’ve set the <code>$DISPLAY</code> environment variable. See <a href="https://pynput.readthedocs.io/en/latest/limitations.html#linux" rel="nofollow">pynput limitations</a>.</li>',dl,Ge,yl,Ee,Is='If you uploaded your dataset to the hub with <code>--control.push_to_hub=true</code>, you can <a href="https://huggingface.co/spaces/lerobot/visualize_dataset" rel="nofollow">visualize your dataset online</a> by copy pasting your repo id given by:',ml,Be,ul,Xe,bl,ke,vs="A useful feature is the <code>replay</code> function, which allows you to replay any episode that you’ve recorded or episodes from any dataset out there. This function helps you test the repeatability of your robot’s actions and assess transferability across robots of the same model.",Jl,Qe,_s="You can replay the first episode on your robot with either the command below or with the API example:",wl,R,Tl,Ae,Rs='Your robot should replicate movements similar to those you recorded. For example, check out <a href="https://x.com/RemiCadene/status/1793654950905680090" rel="nofollow">this video</a> where we use <code>replay</code> on a Aloha robot from <a href="https://www.trossenrobotics.com" rel="nofollow">Trossen Robotics</a>.',Ul,Ne,fl,Fe,Vs='To train a policy to control your robot, use the <a href="https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py" rel="nofollow"><code>lerobot-train</code></a> script. A few arguments are required. Here is an example command:',hl,We,jl,Se,Gs="Let’s explain the command:",Cl,xe,Es='<li>We provided the dataset as argument with <code>--dataset.repo_id=${HF_USER}/so101_test</code>.</li> <li>We provided the policy with <code>policy.type=act</code>. This loads configurations from <a href="https://github.com/huggingface/lerobot/blob/main/src/lerobot/policies/act/configuration_act.py" rel="nofollow"><code>configuration_act.py</code></a>. Importantly, this policy will automatically adapt to the number of motor states, motor actions and cameras of your robot (e.g. <code>laptop</code> and <code>phone</code>) which have been saved in your dataset.</li> <li>We provided <code>policy.device=cuda</code> since we are training on a Nvidia GPU, but you could use <code>policy.device=mps</code> to train on Apple silicon.</li> <li>We provided <code>wandb.enable=true</code> to use <a href="https://docs.wandb.ai/quickstart" rel="nofollow">Weights and Biases</a> for visualizing training plots. This is optional but if you use it, make sure you are logged in by running <code>wandb login</code>.</li>',gl,Ye,Bs="Training should take several hours. You will find checkpoints in <code>outputs/train/act_so101_test/checkpoints</code>.",Zl,ze,Xs="To resume training from a checkpoint, below is an example command to resume from <code>last</code> checkpoint of the <code>act_so101_test</code> policy:",$l,He,Il,Le,ks="If you do not want to push your model to the hub after training use <code>--policy.push_to_hub=false</code>.",vl,De,Qs="Additionally you can provide extra <code>tags</code> or specify a <code>license</code> for your model or make the model repo <code>private</code> by adding this: <code>--policy.private=true --policy.tags=\\[ppo,rl\\] --policy.license=mit</code>",_l,Pe,Rl,qe,As='If your local computer doesn’t have a powerful GPU you could utilize Google Colab to train your model by following the <a href="./notebooks#training-act">ACT training notebook</a>.',Vl,Ke,Gl,Oe,Ns="Once training is done, upload the latest checkpoint with:",El,et,Bl,tt,Fs="You can also upload intermediate checkpoints with:",Xl,lt,kl,st,Ql,at,Ws='You can use the <code>record</code> script from <a href="https://github.com/huggingface/lerobot/blob/main/src/lerobot/record.py" rel="nofollow"><code>lerobot/record.py</code></a> with a policy checkpoint as input, to run inference and evaluate your policy. For instance, run this command or API example to run inference and record 10 evaluation episodes:',Al,V,Nl,ot,Ss="As you can see, it’s almost the same command as previously used to record your training dataset. Two things changed:",Fl,nt,xs="<li>There is an additional <code>--control.policy.path</code> argument which indicates the path to your policy checkpoint with (e.g. <code>outputs/train/eval_act_so101_test/checkpoints/last/pretrained_model</code>). You can also use the model repository if you uploaded a model checkpoint to the hub (e.g. <code>${HF_USER}/act_so101_test</code>).</li> <li>The name of dataset begins by <code>eval</code> to reflect that you are running inference (e.g. <code>${HF_USER}/eval_act_so101_test</code>).</li>",Wl,it,Sl,rt,xl;return n=new aa({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new j({props:{title:"Imitation Learning on Real-World Robots",local:"imitation-learning-on-real-world-robots",headingTag:"h1"}}),W=new j({props:{title:"Set up and Calibrate",local:"set-up-and-calibrate",headingTag:"h2"}}),x=new j({props:{title:"Teleoperate",local:"teleoperate",headingTag:"h2"}}),I=new pt({props:{id:"teleoperate_so101",options:["Command","API example"],$$slots:{default:[ra]},$$scope:{ctx:f}}}),D=new j({props:{title:"Cameras",local:"cameras",headingTag:"h2"}}),q=new j({props:{title:"Teleoperate with cameras",local:"teleoperate-with-cameras",headingTag:"h2"}}),v=new pt({props:{id:"teleoperate_koch_camera",options:["Command","API example"],$$slots:{default:[ca]},$$scope:{ctx:f}}}),O=new j({props:{title:"Record a dataset",local:"record-a-dataset",headingTag:"h2"}}),se=new g({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4lMjAtLXRva2VuJTIwJTI0JTdCSFVHR0lOR0ZBQ0VfVE9LRU4lN0QlMjAtLWFkZC10by1naXQtY3JlZGVudGlhbA==",highlighted:'huggingface-cli login --token <span class="hljs-variable">${HUGGINGFACE_TOKEN}</span> --add-to-git-credential',wrap:!1}}),oe=new g({props:{code:"SEZfVVNFUiUzRCUyNChoZiUyMGF1dGglMjB3aG9hbWklMjAlN0MlMjBoZWFkJTIwLW4lMjAxKSUwQWVjaG8lMjAlMjRIRl9VU0VS",highlighted:`HF_USER=$(hf auth <span class="hljs-built_in">whoami</span> | <span class="hljs-built_in">head</span> -n 1)
<span class="hljs-built_in">echo</span> <span class="hljs-variable">$HF_USER</span>`,wrap:!1}}),_=new pt({props:{id:"record",options:["Command","API example"],$$slots:{default:[ma]},$$scope:{ctx:f}}}),ie=new j({props:{title:"Dataset upload",local:"dataset-upload",headingTag:"h4"}}),pe=new g({props:{code:"ZWNobyUyMGh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRiUyNCU3QkhGX1VTRVIlN0QlMkZzbzEwMV90ZXN0",highlighted:'<span class="hljs-built_in">echo</span> https://huggingface.co/datasets/<span class="hljs-variable">${HF_USER}</span>/so101_test',wrap:!1}}),ye=new g({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwdXBsb2FkJTIwJTI0JTdCSEZfVVNFUiU3RCUyRnJlY29yZC10ZXN0JTIwfiUyRi5jYWNoZSUyRmh1Z2dpbmdmYWNlJTJGbGVyb2JvdCUyRiU3QnJlcG8taWQlN0QlMjAtLXJlcG8tdHlwZSUyMGRhdGFzZXQ=",highlighted:'huggingface-cli upload <span class="hljs-variable">${HF_USER}</span>/record-test ~/.cache/huggingface/lerobot/{repo-id} --repo-type dataset',wrap:!1}}),me=new j({props:{title:"Record function",local:"record-function",headingTag:"h4"}}),be=new j({props:{title:"1. Data Storage",local:"1-data-storage",headingTag:"h5"}}),we=new j({props:{title:"2. Checkpointing and Resuming",local:"2-checkpointing-and-resuming",headingTag:"h5"}}),Ue=new j({props:{title:"3. Recording Parameters",local:"3-recording-parameters",headingTag:"h5"}}),je=new j({props:{title:"4. Keyboard Controls During Recording",local:"4-keyboard-controls-during-recording",headingTag:"h5"}}),Ze=new j({props:{title:"Tips for gathering data",local:"tips-for-gathering-data",headingTag:"h4"}}),Re=new j({props:{title:"Troubleshooting:",local:"troubleshooting",headingTag:"h4"}}),Ge=new j({props:{title:"Visualize a dataset",local:"visualize-a-dataset",headingTag:"h2"}}),Be=new g({props:{code:"ZWNobyUyMCUyNCU3QkhGX1VTRVIlN0QlMkZzbzEwMV90ZXN0",highlighted:'<span class="hljs-built_in">echo</span> <span class="hljs-variable">${HF_USER}</span>/so101_test',wrap:!1}}),Xe=new j({props:{title:"Replay an episode",local:"replay-an-episode",headingTag:"h2"}}),R=new pt({props:{id:"replay",options:["Command","API example"],$$slots:{default:[Ja]},$$scope:{ctx:f}}}),Ne=new j({props:{title:"Train a policy",local:"train-a-policy",headingTag:"h2"}}),We=new g({props:{code:"bGVyb2JvdC10cmFpbiUyMCU1QyUwQSUyMCUyMC0tZGF0YXNldC5yZXBvX2lkJTNEJTI0JTdCSEZfVVNFUiU3RCUyRnNvMTAxX3Rlc3QlMjAlNUMlMEElMjAlMjAtLXBvbGljeS50eXBlJTNEYWN0JTIwJTVDJTBBJTIwJTIwLS1vdXRwdXRfZGlyJTNEb3V0cHV0cyUyRnRyYWluJTJGYWN0X3NvMTAxX3Rlc3QlMjAlNUMlMEElMjAlMjAtLWpvYl9uYW1lJTNEYWN0X3NvMTAxX3Rlc3QlMjAlNUMlMEElMjAlMjAtLXBvbGljeS5kZXZpY2UlM0RjdWRhJTIwJTVDJTBBJTIwJTIwLS13YW5kYi5lbmFibGUlM0R0cnVlJTIwJTVDJTBBJTIwJTIwLS1wb2xpY3kucmVwb19pZCUzRCUyNCU3QkhGX1VTRVIlN0QlMkZteV9wb2xpY3k=",highlighted:`lerobot-train \\
  --dataset.repo_id=<span class="hljs-variable">\${HF_USER}</span>/so101_test \\
  --policy.type=act \\
  --output_dir=outputs/train/act_so101_test \\
  --job_name=act_so101_test \\
  --policy.device=cuda \\
  --wandb.enable=<span class="hljs-literal">true</span> \\
  --policy.repo_id=<span class="hljs-variable">\${HF_USER}</span>/my_policy`,wrap:!1}}),He=new g({props:{code:"bGVyb2JvdC10cmFpbiUyMCU1QyUwQSUyMCUyMC0tY29uZmlnX3BhdGglM0RvdXRwdXRzJTJGdHJhaW4lMkZhY3Rfc28xMDFfdGVzdCUyRmNoZWNrcG9pbnRzJTJGbGFzdCUyRnByZXRyYWluZWRfbW9kZWwlMkZ0cmFpbl9jb25maWcuanNvbiUyMCU1QyUwQSUyMCUyMC0tcmVzdW1lJTNEdHJ1ZQ==",highlighted:`lerobot-train \\
  --config_path=outputs/train/act_so101_test/checkpoints/last/pretrained_model/train_config.json \\
  --resume=<span class="hljs-literal">true</span>`,wrap:!1}}),Pe=new j({props:{title:"Train using Google Colab",local:"train-using-google-colab",headingTag:"h4"}}),Ke=new j({props:{title:"Upload policy checkpoints",local:"upload-policy-checkpoints",headingTag:"h4"}}),et=new g({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwdXBsb2FkJTIwJTI0JTdCSEZfVVNFUiU3RCUyRmFjdF9zbzEwMV90ZXN0JTIwJTVDJTBBJTIwJTIwb3V0cHV0cyUyRnRyYWluJTJGYWN0X3NvMTAxX3Rlc3QlMkZjaGVja3BvaW50cyUyRmxhc3QlMkZwcmV0cmFpbmVkX21vZGVs",highlighted:'huggingface-cli upload <span class="hljs-variable">${HF_USER}</span>/act_so101_test \\\n  outputs/train/act_so101_test/checkpoints/last/pretrained_model',wrap:!1}}),lt=new g({props:{code:"Q0tQVCUzRDAxMDAwMCUwQWh1Z2dpbmdmYWNlLWNsaSUyMHVwbG9hZCUyMCUyNCU3QkhGX1VTRVIlN0QlMkZhY3Rfc28xMDFfdGVzdCUyNCU3QkNLUFQlN0QlMjAlNUMlMEElMjAlMjBvdXRwdXRzJTJGdHJhaW4lMkZhY3Rfc28xMDFfdGVzdCUyRmNoZWNrcG9pbnRzJTJGJTI0JTdCQ0tQVCU3RCUyRnByZXRyYWluZWRfbW9kZWw=",highlighted:'CKPT=010000\nhuggingface-cli upload <span class="hljs-variable">${HF_USER}</span>/act_so101_test<span class="hljs-variable">${CKPT}</span> \\\n  outputs/train/act_so101_test/checkpoints/<span class="hljs-variable">${CKPT}</span>/pretrained_model',wrap:!1}}),st=new j({props:{title:"Run inference and evaluate your policy",local:"run-inference-and-evaluate-your-policy",headingTag:"h2"}}),V=new pt({props:{id:"eval",options:["Command","API example"],$$slots:{default:[Ua]},$$scope:{ctx:f}}}),it=new oa({props:{source:"https://github.com/huggingface/lerobot/blob/main/docs/source/il_robots.mdx"}}),{c(){o=M("meta"),p=i(),a=M("p"),T=i(),d(n.$$.fragment),U=i(),d(h.$$.fragment),C=i(),G=M("p"),G.textContent=Yl,Mt=i(),E=M("p"),E.innerHTML=zl,ct=i(),B=M("ol"),B.innerHTML=Hl,dt=i(),X=M("p"),X.textContent=Ll,yt=i(),k=M("details"),k.innerHTML=Dl,mt=i(),Q=M("p"),Q.textContent=Pl,ut=i(),A=M("p"),A.textContent=ql,bt=i(),N=M("p"),N.textContent=Kl,Jt=i(),F=M("p"),F.innerHTML=Ol,wt=i(),d(W.$$.fragment),Tt=i(),S=M("p"),S.textContent=es,Ut=i(),d(x.$$.fragment),ft=i(),Y=M("p"),Y.textContent=ts,ht=i(),z=M("p"),z.innerHTML=ls,jt=i(),d(I.$$.fragment),Ct=i(),H=M("p"),H.textContent=ss,gt=i(),L=M("ol"),L.innerHTML=as,Zt=i(),d(D.$$.fragment),$t=i(),P=M("p"),P.innerHTML=os,It=i(),d(q.$$.fragment),vt=i(),K=M("p"),K.innerHTML=ns,_t=i(),d(v.$$.fragment),Rt=i(),d(O.$$.fragment),Vt=i(),ee=M("p"),ee.textContent=is,Gt=i(),te=M("p"),te.innerHTML=rs,Et=i(),le=M("p"),le.textContent=ps,Bt=i(),d(se.$$.fragment),Xt=i(),ae=M("p"),ae.textContent=Ms,kt=i(),d(oe.$$.fragment),Qt=i(),ne=M("p"),ne.textContent=cs,At=i(),d(_.$$.fragment),Nt=i(),d(ie.$$.fragment),Ft=i(),re=M("p"),re.innerHTML=ds,Wt=i(),d(pe.$$.fragment),St=i(),Me=M("p"),Me.innerHTML=ys,xt=i(),ce=M("p"),ce.innerHTML=ms,Yt=i(),de=M("p"),de.textContent=us,zt=i(),d(ye.$$.fragment),Ht=i(),d(me.$$.fragment),Lt=i(),ue=M("p"),ue.innerHTML=bs,Dt=i(),d(be.$$.fragment),Pt=i(),Je=M("ul"),Je.innerHTML=Js,qt=i(),d(we.$$.fragment),Kt=i(),Te=M("ul"),Te.innerHTML=ws,Ot=i(),d(Ue.$$.fragment),el=i(),fe=M("p"),fe.textContent=Ts,tl=i(),he=M("ul"),he.innerHTML=Us,ll=i(),d(je.$$.fragment),sl=i(),Ce=M("p"),Ce.textContent=fs,al=i(),ge=M("ul"),ge.innerHTML=hs,ol=i(),d(Ze.$$.fragment),nl=i(),$e=M("p"),$e.textContent=js,il=i(),Ie=M("p"),Ie.textContent=Cs,rl=i(),ve=M("p"),ve.textContent=gs,pl=i(),_e=M("p"),_e.innerHTML=Zs,Ml=i(),d(Re.$$.fragment),cl=i(),Ve=M("ul"),Ve.innerHTML=$s,dl=i(),d(Ge.$$.fragment),yl=i(),Ee=M("p"),Ee.innerHTML=Is,ml=i(),d(Be.$$.fragment),ul=i(),d(Xe.$$.fragment),bl=i(),ke=M("p"),ke.innerHTML=vs,Jl=i(),Qe=M("p"),Qe.textContent=_s,wl=i(),d(R.$$.fragment),Tl=i(),Ae=M("p"),Ae.innerHTML=Rs,Ul=i(),d(Ne.$$.fragment),fl=i(),Fe=M("p"),Fe.innerHTML=Vs,hl=i(),d(We.$$.fragment),jl=i(),Se=M("p"),Se.textContent=Gs,Cl=i(),xe=M("ol"),xe.innerHTML=Es,gl=i(),Ye=M("p"),Ye.innerHTML=Bs,Zl=i(),ze=M("p"),ze.innerHTML=Xs,$l=i(),d(He.$$.fragment),Il=i(),Le=M("p"),Le.innerHTML=ks,vl=i(),De=M("p"),De.innerHTML=Qs,_l=i(),d(Pe.$$.fragment),Rl=i(),qe=M("p"),qe.innerHTML=As,Vl=i(),d(Ke.$$.fragment),Gl=i(),Oe=M("p"),Oe.textContent=Ns,El=i(),d(et.$$.fragment),Bl=i(),tt=M("p"),tt.textContent=Fs,Xl=i(),d(lt.$$.fragment),kl=i(),d(st.$$.fragment),Ql=i(),at=M("p"),at.innerHTML=Ws,Al=i(),d(V.$$.fragment),Nl=i(),ot=M("p"),ot.textContent=Ss,Fl=i(),nt=M("ol"),nt.innerHTML=xs,Wl=i(),d(it.$$.fragment),Sl=i(),rt=M("p"),this.h()},l(e){const t=la("svelte-u9bgzb",document.head);o=c(t,"META",{name:!0,content:!0}),t.forEach(l),p=r(e),a=c(e,"P",{}),Ps(a).forEach(l),T=r(e),y(n.$$.fragment,e),U=r(e),y(h.$$.fragment,e),C=r(e),G=c(e,"P",{"data-svelte-h":!0}),w(G)!=="svelte-21t2sw"&&(G.textContent=Yl),Mt=r(e),E=c(e,"P",{"data-svelte-h":!0}),w(E)!=="svelte-xo8ua7"&&(E.innerHTML=zl),ct=r(e),B=c(e,"OL",{"data-svelte-h":!0}),w(B)!=="svelte-1guuyxp"&&(B.innerHTML=Hl),dt=r(e),X=c(e,"P",{"data-svelte-h":!0}),w(X)!=="svelte-wday6x"&&(X.textContent=Ll),yt=r(e),k=c(e,"DETAILS",{"data-svelte-h":!0}),w(k)!=="svelte-1xbyi02"&&(k.innerHTML=Dl),mt=r(e),Q=c(e,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-1rmorch"&&(Q.textContent=Pl),ut=r(e),A=c(e,"P",{"data-svelte-h":!0}),w(A)!=="svelte-vwh3sq"&&(A.textContent=ql),bt=r(e),N=c(e,"P",{"data-svelte-h":!0}),w(N)!=="svelte-aqc99n"&&(N.textContent=Kl),Jt=r(e),F=c(e,"P",{"data-svelte-h":!0}),w(F)!=="svelte-175e9wr"&&(F.innerHTML=Ol),wt=r(e),y(W.$$.fragment,e),Tt=r(e),S=c(e,"P",{"data-svelte-h":!0}),w(S)!=="svelte-3l5nsa"&&(S.textContent=es),Ut=r(e),y(x.$$.fragment,e),ft=r(e),Y=c(e,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-q14pfj"&&(Y.textContent=ts),ht=r(e),z=c(e,"P",{"data-svelte-h":!0}),w(z)!=="svelte-4dj09k"&&(z.innerHTML=ls),jt=r(e),y(I.$$.fragment,e),Ct=r(e),H=c(e,"P",{"data-svelte-h":!0}),w(H)!=="svelte-utgp5r"&&(H.textContent=ss),gt=r(e),L=c(e,"OL",{"data-svelte-h":!0}),w(L)!=="svelte-1ix81x8"&&(L.innerHTML=as),Zt=r(e),y(D.$$.fragment,e),$t=r(e),P=c(e,"P",{"data-svelte-h":!0}),w(P)!=="svelte-12jvdq3"&&(P.innerHTML=os),It=r(e),y(q.$$.fragment,e),vt=r(e),K=c(e,"P",{"data-svelte-h":!0}),w(K)!=="svelte-1dppnmf"&&(K.innerHTML=ns),_t=r(e),y(v.$$.fragment,e),Rt=r(e),y(O.$$.fragment,e),Vt=r(e),ee=c(e,"P",{"data-svelte-h":!0}),w(ee)!=="svelte-1nfhg37"&&(ee.textContent=is),Gt=r(e),te=c(e,"P",{"data-svelte-h":!0}),w(te)!=="svelte-1yil1pb"&&(te.innerHTML=rs),Et=r(e),le=c(e,"P",{"data-svelte-h":!0}),w(le)!=="svelte-1wt46f4"&&(le.textContent=ps),Bt=r(e),y(se.$$.fragment,e),Xt=r(e),ae=c(e,"P",{"data-svelte-h":!0}),w(ae)!=="svelte-1qc22uu"&&(ae.textContent=Ms),kt=r(e),y(oe.$$.fragment,e),Qt=r(e),ne=c(e,"P",{"data-svelte-h":!0}),w(ne)!=="svelte-1rjq902"&&(ne.textContent=cs),At=r(e),y(_.$$.fragment,e),Nt=r(e),y(ie.$$.fragment,e),Ft=r(e),re=c(e,"P",{"data-svelte-h":!0}),w(re)!=="svelte-27mc02"&&(re.innerHTML=ds),Wt=r(e),y(pe.$$.fragment,e),St=r(e),Me=c(e,"P",{"data-svelte-h":!0}),w(Me)!=="svelte-16ex640"&&(Me.innerHTML=ys),xt=r(e),ce=c(e,"P",{"data-svelte-h":!0}),w(ce)!=="svelte-12sit8s"&&(ce.innerHTML=ms),Yt=r(e),de=c(e,"P",{"data-svelte-h":!0}),w(de)!=="svelte-1jq5p1b"&&(de.textContent=us),zt=r(e),y(ye.$$.fragment,e),Ht=r(e),y(me.$$.fragment,e),Lt=r(e),ue=c(e,"P",{"data-svelte-h":!0}),w(ue)!=="svelte-1hxrxsl"&&(ue.innerHTML=bs),Dt=r(e),y(be.$$.fragment,e),Pt=r(e),Je=c(e,"UL",{"data-svelte-h":!0}),w(Je)!=="svelte-lyz1u1"&&(Je.innerHTML=Js),qt=r(e),y(we.$$.fragment,e),Kt=r(e),Te=c(e,"UL",{"data-svelte-h":!0}),w(Te)!=="svelte-1j466wa"&&(Te.innerHTML=ws),Ot=r(e),y(Ue.$$.fragment,e),el=r(e),fe=c(e,"P",{"data-svelte-h":!0}),w(fe)!=="svelte-1ytdalz"&&(fe.textContent=Ts),tl=r(e),he=c(e,"UL",{"data-svelte-h":!0}),w(he)!=="svelte-xo376n"&&(he.innerHTML=Us),ll=r(e),y(je.$$.fragment,e),sl=r(e),Ce=c(e,"P",{"data-svelte-h":!0}),w(Ce)!=="svelte-133erjf"&&(Ce.textContent=fs),al=r(e),ge=c(e,"UL",{"data-svelte-h":!0}),w(ge)!=="svelte-xovzns"&&(ge.innerHTML=hs),ol=r(e),y(Ze.$$.fragment,e),nl=r(e),$e=c(e,"P",{"data-svelte-h":!0}),w($e)!=="svelte-53ok25"&&($e.textContent=js),il=r(e),Ie=c(e,"P",{"data-svelte-h":!0}),w(Ie)!=="svelte-g5y8pt"&&(Ie.textContent=Cs),rl=r(e),ve=c(e,"P",{"data-svelte-h":!0}),w(ve)!=="svelte-1gvnhwt"&&(ve.textContent=gs),pl=r(e),_e=c(e,"P",{"data-svelte-h":!0}),w(_e)!=="svelte-1rzn05f"&&(_e.innerHTML=Zs),Ml=r(e),y(Re.$$.fragment,e),cl=r(e),Ve=c(e,"UL",{"data-svelte-h":!0}),w(Ve)!=="svelte-1d8rggu"&&(Ve.innerHTML=$s),dl=r(e),y(Ge.$$.fragment,e),yl=r(e),Ee=c(e,"P",{"data-svelte-h":!0}),w(Ee)!=="svelte-18hgtfq"&&(Ee.innerHTML=Is),ml=r(e),y(Be.$$.fragment,e),ul=r(e),y(Xe.$$.fragment,e),bl=r(e),ke=c(e,"P",{"data-svelte-h":!0}),w(ke)!=="svelte-1e1wth5"&&(ke.innerHTML=vs),Jl=r(e),Qe=c(e,"P",{"data-svelte-h":!0}),w(Qe)!=="svelte-1abr8n2"&&(Qe.textContent=_s),wl=r(e),y(R.$$.fragment,e),Tl=r(e),Ae=c(e,"P",{"data-svelte-h":!0}),w(Ae)!=="svelte-10lfyd3"&&(Ae.innerHTML=Rs),Ul=r(e),y(Ne.$$.fragment,e),fl=r(e),Fe=c(e,"P",{"data-svelte-h":!0}),w(Fe)!=="svelte-1ce314c"&&(Fe.innerHTML=Vs),hl=r(e),y(We.$$.fragment,e),jl=r(e),Se=c(e,"P",{"data-svelte-h":!0}),w(Se)!=="svelte-1aio4w2"&&(Se.textContent=Gs),Cl=r(e),xe=c(e,"OL",{"data-svelte-h":!0}),w(xe)!=="svelte-jwp2v"&&(xe.innerHTML=Es),gl=r(e),Ye=c(e,"P",{"data-svelte-h":!0}),w(Ye)!=="svelte-1fsreqm"&&(Ye.innerHTML=Bs),Zl=r(e),ze=c(e,"P",{"data-svelte-h":!0}),w(ze)!=="svelte-1lwh85c"&&(ze.innerHTML=Xs),$l=r(e),y(He.$$.fragment,e),Il=r(e),Le=c(e,"P",{"data-svelte-h":!0}),w(Le)!=="svelte-v678sy"&&(Le.innerHTML=ks),vl=r(e),De=c(e,"P",{"data-svelte-h":!0}),w(De)!=="svelte-7xiimr"&&(De.innerHTML=Qs),_l=r(e),y(Pe.$$.fragment,e),Rl=r(e),qe=c(e,"P",{"data-svelte-h":!0}),w(qe)!=="svelte-1bpkjcm"&&(qe.innerHTML=As),Vl=r(e),y(Ke.$$.fragment,e),Gl=r(e),Oe=c(e,"P",{"data-svelte-h":!0}),w(Oe)!=="svelte-15j4w0e"&&(Oe.textContent=Ns),El=r(e),y(et.$$.fragment,e),Bl=r(e),tt=c(e,"P",{"data-svelte-h":!0}),w(tt)!=="svelte-ex9l9h"&&(tt.textContent=Fs),Xl=r(e),y(lt.$$.fragment,e),kl=r(e),y(st.$$.fragment,e),Ql=r(e),at=c(e,"P",{"data-svelte-h":!0}),w(at)!=="svelte-p9k5a"&&(at.innerHTML=Ws),Al=r(e),y(V.$$.fragment,e),Nl=r(e),ot=c(e,"P",{"data-svelte-h":!0}),w(ot)!=="svelte-v77er4"&&(ot.textContent=Ss),Fl=r(e),nt=c(e,"OL",{"data-svelte-h":!0}),w(nt)!=="svelte-j2c0fi"&&(nt.innerHTML=xs),Wl=r(e),y(it.$$.fragment,e),Sl=r(e),rt=c(e,"P",{}),Ps(rt).forEach(l),this.h()},h(){qs(o,"name","hf:doc:metadata"),qs(o,"content",ha)},m(e,t){sa(document.head,o),s(e,p,t),s(e,a,t),s(e,T,t),m(n,e,t),s(e,U,t),m(h,e,t),s(e,C,t),s(e,G,t),s(e,Mt,t),s(e,E,t),s(e,ct,t),s(e,B,t),s(e,dt,t),s(e,X,t),s(e,yt,t),s(e,k,t),s(e,mt,t),s(e,Q,t),s(e,ut,t),s(e,A,t),s(e,bt,t),s(e,N,t),s(e,Jt,t),s(e,F,t),s(e,wt,t),m(W,e,t),s(e,Tt,t),s(e,S,t),s(e,Ut,t),m(x,e,t),s(e,ft,t),s(e,Y,t),s(e,ht,t),s(e,z,t),s(e,jt,t),m(I,e,t),s(e,Ct,t),s(e,H,t),s(e,gt,t),s(e,L,t),s(e,Zt,t),m(D,e,t),s(e,$t,t),s(e,P,t),s(e,It,t),m(q,e,t),s(e,vt,t),s(e,K,t),s(e,_t,t),m(v,e,t),s(e,Rt,t),m(O,e,t),s(e,Vt,t),s(e,ee,t),s(e,Gt,t),s(e,te,t),s(e,Et,t),s(e,le,t),s(e,Bt,t),m(se,e,t),s(e,Xt,t),s(e,ae,t),s(e,kt,t),m(oe,e,t),s(e,Qt,t),s(e,ne,t),s(e,At,t),m(_,e,t),s(e,Nt,t),m(ie,e,t),s(e,Ft,t),s(e,re,t),s(e,Wt,t),m(pe,e,t),s(e,St,t),s(e,Me,t),s(e,xt,t),s(e,ce,t),s(e,Yt,t),s(e,de,t),s(e,zt,t),m(ye,e,t),s(e,Ht,t),m(me,e,t),s(e,Lt,t),s(e,ue,t),s(e,Dt,t),m(be,e,t),s(e,Pt,t),s(e,Je,t),s(e,qt,t),m(we,e,t),s(e,Kt,t),s(e,Te,t),s(e,Ot,t),m(Ue,e,t),s(e,el,t),s(e,fe,t),s(e,tl,t),s(e,he,t),s(e,ll,t),m(je,e,t),s(e,sl,t),s(e,Ce,t),s(e,al,t),s(e,ge,t),s(e,ol,t),m(Ze,e,t),s(e,nl,t),s(e,$e,t),s(e,il,t),s(e,Ie,t),s(e,rl,t),s(e,ve,t),s(e,pl,t),s(e,_e,t),s(e,Ml,t),m(Re,e,t),s(e,cl,t),s(e,Ve,t),s(e,dl,t),m(Ge,e,t),s(e,yl,t),s(e,Ee,t),s(e,ml,t),m(Be,e,t),s(e,ul,t),m(Xe,e,t),s(e,bl,t),s(e,ke,t),s(e,Jl,t),s(e,Qe,t),s(e,wl,t),m(R,e,t),s(e,Tl,t),s(e,Ae,t),s(e,Ul,t),m(Ne,e,t),s(e,fl,t),s(e,Fe,t),s(e,hl,t),m(We,e,t),s(e,jl,t),s(e,Se,t),s(e,Cl,t),s(e,xe,t),s(e,gl,t),s(e,Ye,t),s(e,Zl,t),s(e,ze,t),s(e,$l,t),m(He,e,t),s(e,Il,t),s(e,Le,t),s(e,vl,t),s(e,De,t),s(e,_l,t),m(Pe,e,t),s(e,Rl,t),s(e,qe,t),s(e,Vl,t),m(Ke,e,t),s(e,Gl,t),s(e,Oe,t),s(e,El,t),m(et,e,t),s(e,Bl,t),s(e,tt,t),s(e,Xl,t),m(lt,e,t),s(e,kl,t),m(st,e,t),s(e,Ql,t),s(e,at,t),s(e,Al,t),m(V,e,t),s(e,Nl,t),s(e,ot,t),s(e,Fl,t),s(e,nt,t),s(e,Wl,t),m(it,e,t),s(e,Sl,t),s(e,rt,t),xl=!0},p(e,[t]){const Ys={};t&2&&(Ys.$$scope={dirty:t,ctx:e}),I.$set(Ys);const zs={};t&2&&(zs.$$scope={dirty:t,ctx:e}),v.$set(zs);const Hs={};t&2&&(Hs.$$scope={dirty:t,ctx:e}),_.$set(Hs);const Ls={};t&2&&(Ls.$$scope={dirty:t,ctx:e}),R.$set(Ls);const Ds={};t&2&&(Ds.$$scope={dirty:t,ctx:e}),V.$set(Ds)},i(e){xl||(u(n.$$.fragment,e),u(h.$$.fragment,e),u(W.$$.fragment,e),u(x.$$.fragment,e),u(I.$$.fragment,e),u(D.$$.fragment,e),u(q.$$.fragment,e),u(v.$$.fragment,e),u(O.$$.fragment,e),u(se.$$.fragment,e),u(oe.$$.fragment,e),u(_.$$.fragment,e),u(ie.$$.fragment,e),u(pe.$$.fragment,e),u(ye.$$.fragment,e),u(me.$$.fragment,e),u(be.$$.fragment,e),u(we.$$.fragment,e),u(Ue.$$.fragment,e),u(je.$$.fragment,e),u(Ze.$$.fragment,e),u(Re.$$.fragment,e),u(Ge.$$.fragment,e),u(Be.$$.fragment,e),u(Xe.$$.fragment,e),u(R.$$.fragment,e),u(Ne.$$.fragment,e),u(We.$$.fragment,e),u(He.$$.fragment,e),u(Pe.$$.fragment,e),u(Ke.$$.fragment,e),u(et.$$.fragment,e),u(lt.$$.fragment,e),u(st.$$.fragment,e),u(V.$$.fragment,e),u(it.$$.fragment,e),xl=!0)},o(e){b(n.$$.fragment,e),b(h.$$.fragment,e),b(W.$$.fragment,e),b(x.$$.fragment,e),b(I.$$.fragment,e),b(D.$$.fragment,e),b(q.$$.fragment,e),b(v.$$.fragment,e),b(O.$$.fragment,e),b(se.$$.fragment,e),b(oe.$$.fragment,e),b(_.$$.fragment,e),b(ie.$$.fragment,e),b(pe.$$.fragment,e),b(ye.$$.fragment,e),b(me.$$.fragment,e),b(be.$$.fragment,e),b(we.$$.fragment,e),b(Ue.$$.fragment,e),b(je.$$.fragment,e),b(Ze.$$.fragment,e),b(Re.$$.fragment,e),b(Ge.$$.fragment,e),b(Be.$$.fragment,e),b(Xe.$$.fragment,e),b(R.$$.fragment,e),b(Ne.$$.fragment,e),b(We.$$.fragment,e),b(He.$$.fragment,e),b(Pe.$$.fragment,e),b(Ke.$$.fragment,e),b(et.$$.fragment,e),b(lt.$$.fragment,e),b(st.$$.fragment,e),b(V.$$.fragment,e),b(it.$$.fragment,e),xl=!1},d(e){e&&(l(p),l(a),l(T),l(U),l(C),l(G),l(Mt),l(E),l(ct),l(B),l(dt),l(X),l(yt),l(k),l(mt),l(Q),l(ut),l(A),l(bt),l(N),l(Jt),l(F),l(wt),l(Tt),l(S),l(Ut),l(ft),l(Y),l(ht),l(z),l(jt),l(Ct),l(H),l(gt),l(L),l(Zt),l($t),l(P),l(It),l(vt),l(K),l(_t),l(Rt),l(Vt),l(ee),l(Gt),l(te),l(Et),l(le),l(Bt),l(Xt),l(ae),l(kt),l(Qt),l(ne),l(At),l(Nt),l(Ft),l(re),l(Wt),l(St),l(Me),l(xt),l(ce),l(Yt),l(de),l(zt),l(Ht),l(Lt),l(ue),l(Dt),l(Pt),l(Je),l(qt),l(Kt),l(Te),l(Ot),l(el),l(fe),l(tl),l(he),l(ll),l(sl),l(Ce),l(al),l(ge),l(ol),l(nl),l($e),l(il),l(Ie),l(rl),l(ve),l(pl),l(_e),l(Ml),l(cl),l(Ve),l(dl),l(yl),l(Ee),l(ml),l(ul),l(bl),l(ke),l(Jl),l(Qe),l(wl),l(Tl),l(Ae),l(Ul),l(fl),l(Fe),l(hl),l(jl),l(Se),l(Cl),l(xe),l(gl),l(Ye),l(Zl),l(ze),l($l),l(Il),l(Le),l(vl),l(De),l(_l),l(Rl),l(qe),l(Vl),l(Gl),l(Oe),l(El),l(Bl),l(tt),l(Xl),l(kl),l(Ql),l(at),l(Al),l(Nl),l(ot),l(Fl),l(nt),l(Wl),l(Sl),l(rt)),l(o),J(n,e),J(h,e),J(W,e),J(x,e),J(I,e),J(D,e),J(q,e),J(v,e),J(O,e),J(se,e),J(oe,e),J(_,e),J(ie,e),J(pe,e),J(ye,e),J(me,e),J(be,e),J(we,e),J(Ue,e),J(je,e),J(Ze,e),J(Re,e),J(Ge,e),J(Be,e),J(Xe,e),J(R,e),J(Ne,e),J(We,e),J(He,e),J(Pe,e),J(Ke,e),J(et,e),J(lt,e),J(st,e),J(V,e),J(it,e)}}}const ha='{"title":"Imitation Learning on Real-World Robots","local":"imitation-learning-on-real-world-robots","sections":[{"title":"Set up and Calibrate","local":"set-up-and-calibrate","sections":[],"depth":2},{"title":"Teleoperate","local":"teleoperate","sections":[],"depth":2},{"title":"Cameras","local":"cameras","sections":[],"depth":2},{"title":"Teleoperate with cameras","local":"teleoperate-with-cameras","sections":[],"depth":2},{"title":"Record a dataset","local":"record-a-dataset","sections":[{"title":"Dataset upload","local":"dataset-upload","sections":[],"depth":4},{"title":"Record function","local":"record-function","sections":[{"title":"1. Data Storage","local":"1-data-storage","sections":[],"depth":5},{"title":"2. Checkpointing and Resuming","local":"2-checkpointing-and-resuming","sections":[],"depth":5},{"title":"3. Recording Parameters","local":"3-recording-parameters","sections":[],"depth":5},{"title":"4. Keyboard Controls During Recording","local":"4-keyboard-controls-during-recording","sections":[],"depth":5}],"depth":4},{"title":"Tips for gathering data","local":"tips-for-gathering-data","sections":[],"depth":4},{"title":"Troubleshooting:","local":"troubleshooting","sections":[],"depth":4}],"depth":2},{"title":"Visualize a dataset","local":"visualize-a-dataset","sections":[],"depth":2},{"title":"Replay an episode","local":"replay-an-episode","sections":[],"depth":2},{"title":"Train a policy","local":"train-a-policy","sections":[{"title":"Train using Google Colab","local":"train-using-google-colab","sections":[],"depth":4},{"title":"Upload policy checkpoints","local":"upload-policy-checkpoints","sections":[],"depth":4}],"depth":2},{"title":"Run inference and evaluate your policy","local":"run-inference-and-evaluate-your-policy","sections":[],"depth":2}],"depth":1}';function ja(f){return Os(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _a extends ea{constructor(o){super(),ta(this,o,ja,fa,Ks,{})}}export{_a as component};
