From 1f375d83c28aa6423c1ca905ee780d1881aa6714 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 09:55:30 -0500 Subject: [PATCH 01/60] Tutorial: an overview step from the workshop handout What the reBot Arm and LeRobot are, the teleoperate-record-train idea, what you need, the arm's specifications and the safety rules. Markdown tables now render, and lists in a step keep their markers. Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 6 +++-- content/docs/overview.md | 46 +++++++++++++++++++++++++++++++++++++ plugins/yaml_page.py | 4 ++-- theme/static/css/app.css | 28 ++++++++++++++++++++++ 4 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 content/docs/overview.md diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 6539b4f..89f6208 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -9,8 +9,9 @@ # # The steps themselves are Markdown files in content/docs/. Each file's # first heading ("# ...") is the step's title; everything under it is the -# step. Fenced code blocks ("```bash") get a Copy button. A GitHub-style -# alert ("> [!CAUTION]" and the lines after it) becomes a callout. A +# step. Fenced code blocks ("```bash") get a Copy button, tables are +# drawn as tables, and a GitHub-style alert ("> [!CAUTION]" and the lines +# after it) becomes a callout. A # picture goes in content/images/ and is written as # ![what it shows](/images/). # @@ -23,6 +24,7 @@ title: "Tutorials" # The steps, in order: one Markdown file each, in content/docs/. steps: + - overview.md - install.md - calibrate.md - teleoperate.md diff --git a/content/docs/overview.md b/content/docs/overview.md new file mode 100644 index 0000000..8689d23 --- /dev/null +++ b/content/docs/overview.md @@ -0,0 +1,46 @@ +# The reBot Arm and LeRobot + +## What is a reBot Arm? + +The reBot Arm B601-RS is a six-joint robot arm made by Seeed, launched as an open-source arm to lower the barrier to learning embodied intelligence. + +## What is LeRobot? + +LeRobot is Hugging Face's open-source robot learning library, written in PyTorch. It focuses on imitation learning and reinforcement learning, and provides pretrained models, datasets of human demonstrations, and simulation environments. + +## Teleoperate, record, train + +1. You move the leader arm by hand, and the follower copies it in real time. +2. While you do that, cameras and joint positions are recorded as episodes. One episode is one attempt at the task, like "grab the black cube". +3. You train a neural network on those episodes. +4. The trained network then looks through the cameras and moves the arm by itself. + +## What you need + +- Ubuntu 22.04 or 24.04 +- Python 3.12 +- Torch 2.6. A CPU build runs the basic workflows; a CUDA build is needed for GPU acceleration. +- An NVIDIA GPU with CUDA 12 or newer, optional, for GPU-accelerated training and inference. + +## Specifications + +| Item | Spec | +| --- | --- | +| Degrees of freedom | 6 + 1 (gripper) | +| Reach | 754.7 mm with gripper, 587.5 mm without | +| Payload | 2.5 kg rated, 5 kg max | +| Repeatability | 0.1 mm | +| Weight | 6.7 kg | +| Motors | 3 RobStride 06, 4 RobStride 00 | +| Communication | CAN bus at 1 Mbps | +| Operating voltage | DC 48 V | +| Power supply | DC 48 V, 15 A | + +## Safety + +> [!CAUTION] +> Stay aware of your surroundings and confirm the area is clear before operating any robot arm. Keep hands, loose clothing and accessories clear of moving parts, and never leave a powered arm unattended. Cut power immediately if anything behaves unexpectedly. + +- Handle all hardware with care. +- Respect other participants' workspaces and equipment, and ask before handling anything that is not yours. +- Return all tools and materials to their designated place before leaving. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 473e7ca..9b466ce 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -173,7 +173,7 @@ def _prepare_tutorial(self, data): @staticmethod def _render_markdown(text): """Markdown to HTML, the way GitHub shows it: fenced code blocks (each - with a Copy button), and "> [!CAUTION]" alerts as callouts.""" + with a Copy button), tables, and "> [!CAUTION]" alerts as callouts.""" def alert(match): kind = match.group(1).lower() @@ -182,7 +182,7 @@ def alert(match): return f'
{kind.capitalize()}{body}
\n' text = ALERT.sub(alert, text + "\n") - html = markdown.markdown(text, extensions=["fenced_code", "sane_lists"]) + html = markdown.markdown(text, extensions=["fenced_code", "sane_lists", "tables"]) # Every code block gets a Copy button, wired up by app.js. return re.sub( r"
(.*?)
", diff --git a/theme/static/css/app.css b/theme/static/css/app.css index cb05334..440c5bd 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1256,6 +1256,12 @@ textarea { font: 700 16px/1.3 var(--f-type); text-transform: uppercase; } +.md ul { + list-style: disc; +} +.md ol { + list-style: decimal; +} .md ul, .md ol { display: grid; @@ -1265,6 +1271,28 @@ textarea { .md a { font-weight: 700; } +/* A table from the Markdown: plain rules, the first column bold. */ +.md table { + width: 100%; + border-collapse: collapse; + font-size: 14px; + line-height: 1.4; +} +.md th, +.md td { + padding: 7px 10px 7px 0; + border-bottom: 1px solid var(--ink); + text-align: left; + vertical-align: top; +} +.md th { + font-size: 12px; + text-transform: uppercase; + letter-spacing: 0.06em; +} +.md td:first-child { + font-weight: 700; +} .md code { padding: 0 4px; background: var(--faint); From f05b74bee50515024dbdbb6899bb1f0666b09692 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 09:57:17 -0500 Subject: [PATCH 02/60] Install: drop the repeated activation at the end of the uv steps Co-Authored-By: Claude Fable 5.1 --- content/docs/install.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/content/docs/install.md b/content/docs/install.md index e079ad5..26f05a8 100644 --- a/content/docs/install.md +++ b/content/docs/install.md @@ -56,7 +56,4 @@ source .venv/bin/activate # Install LeRobot and the Seeed plugins uv pip install -e ".[all]" uv pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 - -# Activate environment -source .venv/bin/activate ``` From 39a2a425fb94e1d8d1cd6f1e7e5967f3944dfd0f Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:00:54 -0500 Subject: [PATCH 03/60] Tutorial: the overview is an About entry, not a numbered step content/docs/about.md is listed under about: in _tutorial.yaml and shows first in the list with an i instead of a number; the steps start at Installation. Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 5 ++++- content/docs/{overview.md => about.md} | 2 +- plugins/yaml_page.py | 16 +++++++++++----- theme/static/css/app.css | 4 ++++ theme/templates/app_macros.html | 6 ++++-- theme/templates/app_upcoming.html | 8 ++++---- 6 files changed, 28 insertions(+), 13 deletions(-) rename content/docs/{overview.md => about.md} (98%) diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 89f6208..8f127eb 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -22,9 +22,12 @@ title: "Tutorials" +# An About entry at the top of the list, not numbered: what the arm and +# LeRobot are, what you need, the specifications and the safety rules. +about: about.md + # The steps, in order: one Markdown file each, in content/docs/. steps: - - overview.md - install.md - calibrate.md - teleoperate.md diff --git a/content/docs/overview.md b/content/docs/about.md similarity index 98% rename from content/docs/overview.md rename to content/docs/about.md index 8689d23..38dc8b1 100644 --- a/content/docs/overview.md +++ b/content/docs/about.md @@ -1,4 +1,4 @@ -# The reBot Arm and LeRobot +# About ## What is a reBot Arm? diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 9b466ce..fbff7e3 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -145,22 +145,28 @@ def _prepare_tutorial(self, data): step is a page inside the Tutorial card, with the id `tutorial-`.""" docs_dir = os.path.join(self.path, "docs") names = [str(n) for n in data.get("steps") or []] - steps = [] - for name in names: + + def read(name): path = os.path.join(docs_dir, name) if not os.path.exists(path): log.error("_tutorial.yaml lists %s, but there is no such file in %s", name, docs_dir) - continue + return None with open(path, encoding="utf-8") as fh: text = fh.read() heading = re.match(r"\s*#\s+(.+?)\s*\n", text) title = heading.group(1).strip() if heading else os.path.splitext(name)[0].replace("-", " ").title() body = text[heading.end():] if heading else text slug = os.path.splitext(name)[0] - steps.append({"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)}) + return {"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)} + + steps = [s for s in (read(n) for n in names) if s] + # The About entry: a page like the steps, but not numbered. + about = read(str(data["about"])) if data.get("about") else None + data["about"] = about + data["pages"] = ([about] if about else []) + steps if os.path.isdir(docs_dir): for name in sorted(os.listdir(docs_dir)): - if name.endswith(".md") and name not in names: + if name.endswith(".md") and name not in names and name != (about or {}).get("file"): log.warning("content/docs/%s is not listed in _tutorial.yaml, so it is not built", name) total = len(steps) for i, step in enumerate(steps): diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 440c5bd..778be97 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1225,6 +1225,10 @@ textarea { height: 20px; stroke-width: 2.8; } +.steps .about .num { + font: 400 italic 16px/1 var(--f-type); + text-transform: lowercase; +} .steps a.cur .num { background: var(--ink); color: var(--paper); diff --git a/theme/templates/app_macros.html b/theme/templates/app_macros.html index d1beafa..a911914 100644 --- a/theme/templates/app_macros.html +++ b/theme/templates/app_macros.html @@ -104,9 +104,11 @@

{{ day.day|e }}

{% endmacro %} -{# The tutorial's steps, numbered, each a link to its section of the page. #} -{% macro tutorial_steps(steps) %} +{# The tutorial's steps, numbered, each a link to its page in the card, with + the About entry first when there is one. #} +{% macro tutorial_steps(steps, about=None) %}
    + {% if about %}
  1. i{{ about.title|e }}{{ icon('right') }}
  2. {% endif %} {% for st in steps %}
  3. {{ st.number }}{{ st.title|e }}{{ icon('right') }}
  4. {% endfor %} diff --git a/theme/templates/app_upcoming.html b/theme/templates/app_upcoming.html index 2f22caf..a2364e2 100644 --- a/theme/templates/app_upcoming.html +++ b/theme/templates/app_upcoming.html @@ -24,19 +24,19 @@

    {{ page.title|e }}

    {{ tutorial.title|e }}

    - {{ ui.tutorial_steps(tutorial.steps_data) }} + {{ ui.tutorial_steps(tutorial.steps_data, tutorial.about) }}
    {{ ui.icon('left') }}Back
    - {% for st in tutorial.steps_data %} + {% for pg in tutorial.pages %} {# Built from the Markdown file, so not escaped here. #} -
    {{ st.html }}
    +
    {{ pg.html }}
    {% endfor %}
    From b3b104127ab751b816c1c4f30c4bab2f5a5be2ac Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:29:34 -0500 Subject: [PATCH 04/60] Tutorial: the fork's current robot and leader names rebot_b601_follower with motor_family=rs, and rebot_102_leader, as in the Seeed fork's own guide; the wiki's older plugin names are noted in the Calibration step. Installation no longer installs the plugin packages and notes the CUDA 12.8 torch build for older drivers. Co-Authored-By: Claude Fable 5.1 --- content/docs/calibrate.md | 13 ++++++++----- content/docs/cameras.md | 16 ++++++++-------- content/docs/dataset.md | 12 ++++++------ content/docs/install.md | 12 +++++------- content/docs/teleoperate.md | 8 ++++---- content/docs/train.md | 4 ++-- 6 files changed, 33 insertions(+), 32 deletions(-) diff --git a/content/docs/calibrate.md b/content/docs/calibrate.md index 5888826..0e61e2c 100644 --- a/content/docs/calibrate.md +++ b/content/docs/calibrate.md @@ -1,5 +1,8 @@ # Robot Calibration +> [!NOTE] +> These names are for the current Seeed fork of LeRobot, which has the reBot arm built in. Seeed's wiki uses an older setup with two plugin packages, where the follower is `seeed_b601_rs_follower` with `--robot.can_adapter=socketcan` and the leader is `rebot_arm_102_leader`. Use whichever your install knows: `lerobot-calibrate --help` lists the types. + ## 1. Follower Arm ```bash @@ -10,10 +13,10 @@ sudo ip link set can0 up # Calibrate lerobot-calibrate \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ - --robot.id=follower1 \ - --robot.can_adapter=socketcan + --robot.id=follower1 ``` ## 2. Leader Arm @@ -28,7 +31,7 @@ sudo chmod 666 /dev/ttyUSB0 # Calibrate lerobot-calibrate \ - --teleop.type=rebot_arm_102_leader \ + --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ - --teleop.id=rebot_arm_102_leader + --teleop.id=leader1 ``` diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 978b0da..9056113 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -14,14 +14,14 @@ Each camera's `Id` is its `index_or_path`. A test image from each camera is save ```bash lerobot-teleoperate \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.can_adapter=socketcan \ --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ - --teleop.type=rebot_arm_102_leader \ + --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ - --teleop.id=rebot_arm_102_leader \ + --teleop.id=leader1 \ --display_data=true ``` @@ -29,13 +29,13 @@ lerobot-teleoperate \ ```bash lerobot-teleoperate \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.can_adapter=socketcan \ --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ - --teleop.type=rebot_arm_102_leader \ + --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ - --teleop.id=rebot_arm_102_leader \ + --teleop.id=leader1 \ --display_data=true ``` diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 784a2ec..89c55a6 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -6,14 +6,14 @@ Set up the ports and cameras first, as in Camera Setup. Then record five episode ```bash lerobot-record \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.can_adapter=socketcan \ --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ - --teleop.type=rebot_arm_102_leader \ + --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ - --teleop.id=rebot_arm_102_leader \ + --teleop.id=leader1 \ --display_data=true \ --dataset.repo_id=seeed_rebot_b601_rs/test \ --dataset.num_episodes=5 \ @@ -51,9 +51,9 @@ The robot repeats the first episode: ```bash lerobot-replay \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ - --robot.can_adapter=socketcan \ --robot.id=follower1 \ --dataset.repo_id=seeed_rebot_b601_rs/test \ --dataset.episode=0 diff --git a/content/docs/install.md b/content/docs/install.md index 26f05a8..4e1127f 100644 --- a/content/docs/install.md +++ b/content/docs/install.md @@ -31,13 +31,9 @@ conda activate lerobot # Install ffmpeg (if video errors occur, use ffmpeg=7.1.1 instead) conda install -y ffmpeg -c conda-forge -# Install LeRobot and the Seeed plugins +# Install LeRobot cd ~/rebot_lerobot/lerobot pip install -e ".[all]" -pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 - -# Activate environment -conda activate lerobot ``` ## 3B. Install with uv @@ -53,7 +49,9 @@ cd ~/rebot_lerobot/lerobot uv venv --python 3.12 source .venv/bin/activate -# Install LeRobot and the Seeed plugins +# Install LeRobot uv pip install -e ".[all]" -uv pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 ``` + +> [!NOTE] +> The reBot arm is built into this fork, so no extra plugin packages are needed. If `lerobot-calibrate` warns that your NVIDIA driver is too old, install the torch build for CUDA 12.8: `uv pip install torch --index-url https://download.pytorch.org/whl/cu128`. diff --git a/content/docs/teleoperate.md b/content/docs/teleoperate.md index 4eb3a4a..54abcc8 100644 --- a/content/docs/teleoperate.md +++ b/content/docs/teleoperate.md @@ -19,11 +19,11 @@ sudo ip link set can0 up ```bash lerobot-teleoperate \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.can_adapter=socketcan \ - --teleop.type=rebot_arm_102_leader \ + --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ - --teleop.id=rebot_arm_102_leader + --teleop.id=leader1 ``` diff --git a/content/docs/train.md b/content/docs/train.md index 18e2350..b0942e1 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -27,9 +27,9 @@ Run the policy on the robot. This records 10 episodes of the policy's own attemp ```bash lerobot-record \ - --robot.type=seeed_b601_rs_follower \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ --robot.port=can0 \ - --robot.can_adapter=socketcan \ --robot.id=follower1 \ --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ --display_data=false \ From 3001bc8446ba7274b9cae3cb63674778a41a9269 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:33:07 -0500 Subject: [PATCH 05/60] Tutorial: requirements as the fork declares them Co-Authored-By: Claude Fable 5.1 --- content/docs/about.md | 6 +++--- content/docs/install.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/about.md b/content/docs/about.md index 38dc8b1..f3a0942 100644 --- a/content/docs/about.md +++ b/content/docs/about.md @@ -18,9 +18,9 @@ LeRobot is Hugging Face's open-source robot learning library, written in PyTorch ## What you need - Ubuntu 22.04 or 24.04 -- Python 3.12 -- Torch 2.6. A CPU build runs the basic workflows; a CUDA build is needed for GPU acceleration. -- An NVIDIA GPU with CUDA 12 or newer, optional, for GPU-accelerated training and inference. +- Python 3.12 or newer +- PyTorch 2.7 to 2.15, installed for you. The default build needs NVIDIA driver 580.65 or newer; an older driver can use the CUDA 12 build, which stops at torch 2.14. +- An NVIDIA GPU, optional. Teleoperation and recording run on the CPU; training needs the GPU. ## Specifications diff --git a/content/docs/install.md b/content/docs/install.md index 4e1127f..cf63d83 100644 --- a/content/docs/install.md +++ b/content/docs/install.md @@ -54,4 +54,4 @@ uv pip install -e ".[all]" ``` > [!NOTE] -> The reBot arm is built into this fork, so no extra plugin packages are needed. If `lerobot-calibrate` warns that your NVIDIA driver is too old, install the torch build for CUDA 12.8: `uv pip install torch --index-url https://download.pytorch.org/whl/cu128`. +> The reBot arm is built into this fork, so no extra plugin packages are needed. If LeRobot warns that your NVIDIA driver is too old, either update the driver to 580 or newer, or before installing LeRobot take the CUDA 12 build of PyTorch: `uv pip install --torch-backend cu126 torch torchvision` and `uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec`. From 67edb74d0dd2f93367b77d522538cd84b617addb Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:35:00 -0500 Subject: [PATCH 06/60] Tutorial: a Requirements entry under About The unnumbered entries at the top of the list are now a list in _tutorial.yaml (about:), so About and Requirements both sit above the steps. The requirements come from the fork's own declarations. Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 8 +++++--- content/docs/about.md | 7 ------- content/docs/requirements.md | 7 +++++++ plugins/yaml_page.py | 11 +++++++---- theme/templates/app_macros.html | 6 +++--- 5 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 content/docs/requirements.md diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 8f127eb..4c6dbf8 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -22,9 +22,11 @@ title: "Tutorials" -# An About entry at the top of the list, not numbered: what the arm and -# LeRobot are, what you need, the specifications and the safety rules. -about: about.md +# Entries at the top of the list that are not numbered steps: what the arm +# and LeRobot are, and what you need before starting. +about: + - about.md + - requirements.md # The steps, in order: one Markdown file each, in content/docs/. steps: diff --git a/content/docs/about.md b/content/docs/about.md index f3a0942..58f4a39 100644 --- a/content/docs/about.md +++ b/content/docs/about.md @@ -15,13 +15,6 @@ LeRobot is Hugging Face's open-source robot learning library, written in PyTorch 3. You train a neural network on those episodes. 4. The trained network then looks through the cameras and moves the arm by itself. -## What you need - -- Ubuntu 22.04 or 24.04 -- Python 3.12 or newer -- PyTorch 2.7 to 2.15, installed for you. The default build needs NVIDIA driver 580.65 or newer; an older driver can use the CUDA 12 build, which stops at torch 2.14. -- An NVIDIA GPU, optional. Teleoperation and recording run on the CPU; training needs the GPU. - ## Specifications | Item | Spec | diff --git a/content/docs/requirements.md b/content/docs/requirements.md new file mode 100644 index 0000000..297ae78 --- /dev/null +++ b/content/docs/requirements.md @@ -0,0 +1,7 @@ +# Requirements + +- Ubuntu 22.04 or 24.04. Linux is the documented platform for the arm. +- Python 3.12 or newer. The fork requires at least 3.12. +- PyTorch 2.7 up to 2.15. The installer picks it for you. The default Linux build is a CUDA 13 build and needs NVIDIA driver 580.65 or newer; with an older driver the install warns that the driver is too old. In that case install the CUDA 12 build of torch first, which tops out at torch 2.14. +- ffmpeg, as a system package with uv, or from conda-forge with conda. +- An NVIDIA GPU, optional. Calibration, teleoperation and recording run on the CPU. Training is where the GPU matters, roughly hours on an RTX 3060 versus days without one. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index fbff7e3..1d7e223 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -160,13 +160,16 @@ def read(name): return {"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)} steps = [s for s in (read(n) for n in names) if s] - # The About entry: a page like the steps, but not numbered. - about = read(str(data["about"])) if data.get("about") else None + # The About entries: pages like the steps, but not numbered. + about_names = data.get("about") or [] + if isinstance(about_names, str): + about_names = [about_names] + about = [a for a in (read(str(n)) for n in about_names) if a] data["about"] = about - data["pages"] = ([about] if about else []) + steps + data["pages"] = about + steps if os.path.isdir(docs_dir): for name in sorted(os.listdir(docs_dir)): - if name.endswith(".md") and name not in names and name != (about or {}).get("file"): + if name.endswith(".md") and name not in names and name not in [str(n) for n in about_names]: log.warning("content/docs/%s is not listed in _tutorial.yaml, so it is not built", name) total = len(steps) for i, step in enumerate(steps): diff --git a/theme/templates/app_macros.html b/theme/templates/app_macros.html index a911914..36e2a8a 100644 --- a/theme/templates/app_macros.html +++ b/theme/templates/app_macros.html @@ -105,10 +105,10 @@

    {{ day.day|e }}

    {% endmacro %} {# The tutorial's steps, numbered, each a link to its page in the card, with - the About entry first when there is one. #} -{% macro tutorial_steps(steps, about=None) %} + the unnumbered About entries first. #} +{% macro tutorial_steps(steps, about=[]) %}
      - {% if about %}
    1. i{{ about.title|e }}{{ icon('right') }}
    2. {% endif %} + {% for ab in about %}
    3. i{{ ab.title|e }}{{ icon('right') }}
    4. {% endfor %} {% for st in steps %}
    5. {{ st.number }}{{ st.title|e }}{{ icon('right') }}
    6. {% endfor %} From baac988b8890ae25d32d691a0ba19ed159377fd2 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:36:06 -0500 Subject: [PATCH 07/60] Requirements: commands, not prose Co-Authored-By: Claude Fable 5.1 --- content/docs/requirements.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/content/docs/requirements.md b/content/docs/requirements.md index 297ae78..7f6b09b 100644 --- a/content/docs/requirements.md +++ b/content/docs/requirements.md @@ -1,7 +1,31 @@ # Requirements -- Ubuntu 22.04 or 24.04. Linux is the documented platform for the arm. -- Python 3.12 or newer. The fork requires at least 3.12. -- PyTorch 2.7 up to 2.15. The installer picks it for you. The default Linux build is a CUDA 13 build and needs NVIDIA driver 580.65 or newer; with an older driver the install warns that the driver is too old. In that case install the CUDA 12 build of torch first, which tops out at torch 2.14. -- ffmpeg, as a system package with uv, or from conda-forge with conda. -- An NVIDIA GPU, optional. Calibration, teleoperation and recording run on the CPU. Training is where the GPU matters, roughly hours on an RTX 3060 versus days without one. +Ubuntu 22.04 or 24.04, Python 3.12 or newer, and ffmpeg. An NVIDIA GPU is optional: training needs it, the rest runs on the CPU. + +## 1. System Packages + +```bash +sudo apt update && sudo apt install -y git curl ffmpeg +``` + +## 2. NVIDIA Driver + +PyTorch's default build needs driver 580.65 or newer. Check yours: + +```bash +nvidia-smi --query-gpu=driver_version --format=csv,noheader +``` + +If it is older, update the driver and reboot: + +```bash +sudo apt install -y nvidia-driver-580-open +sudo reboot +``` + +Or keep the old driver and install the CUDA 12 build of PyTorch before LeRobot (this stays on torch 2.14): + +```bash +uv pip install --torch-backend cu126 torch torchvision +uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec +``` From e7580b090fc23946a5891247702e8f11a6e7a85a Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:37:45 -0500 Subject: [PATCH 08/60] Tutorial: a mouse drag selects text, only a finger swipes Co-Authored-By: Claude Fable 5.1 --- theme/static/js/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/theme/static/js/app.js b/theme/static/js/app.js index 3009a8e..7bd2f80 100644 --- a/theme/static/js/app.js +++ b/theme/static/js/app.js @@ -440,11 +440,12 @@ if (tcard) { if (i >= 0 && i < pages.length) location.hash = `#${pages[i].id}`; }; - // A sideways swipe (or drag with the mouse) follows the finger, then snaps - // to the nearest step. Up and down is left to the page's own scrolling. + // A sideways swipe follows the finger, then snaps to the nearest step. Up + // and down is left to the page's own scrolling. A mouse is not a finger: + // dragging with it selects text, as anywhere else. let x0 = 0, y0 = 0, dx = 0, t0 = 0, dragging = null, pointer = null; track.addEventListener('pointerdown', (e) => { - if (e.button !== 0 || e.target.closest('button, a, pre')) return; + if (e.pointerType === 'mouse' || e.button !== 0 || e.target.closest('button, a, pre')) return; dragging = 'maybe'; x0 = e.clientX; y0 = e.clientY; dx = 0; t0 = performance.now(); pointer = e.pointerId; }); track.addEventListener('pointermove', (e) => { From 2d04fece4786b717ba7967c621f5451c6f4d4b15 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:39:31 -0500 Subject: [PATCH 09/60] Requirements: options as labelled sections, not sentences Co-Authored-By: Claude Fable 5.1 --- content/docs/requirements.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/content/docs/requirements.md b/content/docs/requirements.md index 7f6b09b..5a28005 100644 --- a/content/docs/requirements.md +++ b/content/docs/requirements.md @@ -1,6 +1,6 @@ # Requirements -Ubuntu 22.04 or 24.04, Python 3.12 or newer, and ffmpeg. An NVIDIA GPU is optional: training needs it, the rest runs on the CPU. +Ubuntu 22.04 or 24.04, Python 3.12 or newer, ffmpeg. NVIDIA GPU optional: needed for training only. ## 1. System Packages @@ -10,20 +10,23 @@ sudo apt update && sudo apt install -y git curl ffmpeg ## 2. NVIDIA Driver -PyTorch's default build needs driver 580.65 or newer. Check yours: +PyTorch's default build: driver 580.65 or newer. ```bash +# Check the driver version nvidia-smi --query-gpu=driver_version --format=csv,noheader ``` -If it is older, update the driver and reboot: +### 2A. Driver older than 580: update it ```bash sudo apt install -y nvidia-driver-580-open sudo reboot ``` -Or keep the old driver and install the CUDA 12 build of PyTorch before LeRobot (this stays on torch 2.14): +### 2B. Driver older than 580: keep it, use the CUDA 12 build of PyTorch + +Run before installing LeRobot. Stays on torch 2.14. ```bash uv pip install --torch-backend cu126 torch torchvision From 8e7272f1c6c1c943d8a6cb829987c33fdd37a4f7 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:41:18 -0500 Subject: [PATCH 10/60] Tutorial list: steps grouped under Setup and Usage steps: in _tutorial.yaml is now a list of groups, each with a heading and its files; the numbering runs on across groups. About and Requirements stay above them, unnumbered. Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 23 ++++++++++++++--------- plugins/yaml_page.py | 16 +++++++++++++++- theme/static/css/app.css | 10 ++++++++++ theme/templates/app_macros.html | 7 +++++-- theme/templates/app_upcoming.html | 2 +- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 4c6dbf8..7a3bb92 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -15,8 +15,8 @@ # picture goes in content/images/ and is written as # ![what it shows](/images/). # -# To add a step: put its .md file in content/docs/ and add its name to -# `steps`, in the place it belongs. A file that is not listed is not built, +# To add a step: put its .md file in content/docs/ and add its name under +# the group it belongs to in `steps`, in the place it belongs. A file that is not listed is not built, # and the build says so. # ============================================================================= @@ -28,14 +28,19 @@ about: - about.md - requirements.md -# The steps, in order: one Markdown file each, in content/docs/. +# The steps, in order: one Markdown file each, in content/docs/. They are +# grouped under headings in the list; the numbering runs on across groups. steps: - - install.md - - calibrate.md - - teleoperate.md - - cameras.md - - dataset.md - - train.md + - group: "Setup" + files: + - install.md + - calibrate.md + - group: "Usage" + files: + - teleoperate.md + - cameras.md + - dataset.md + - train.md # Where the steps come from: a link, always in view under the open step. source: diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 1d7e223..b81587c 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -144,7 +144,17 @@ def _prepare_tutorial(self, data): `steps` gives. The file's first heading is the step's title. Each step is a page inside the Tutorial card, with the id `tutorial-`.""" docs_dir = os.path.join(self.path, "docs") - names = [str(n) for n in data.get("steps") or []] + # `steps` is a list of groups ({group: title, files: [...]}) or, for a + # list without headings, of file names. + groups = [] + for item in data.get("steps") or []: + if isinstance(item, dict): + groups.append({"title": item.get("group") or "", "files": [str(f) for f in item.get("files") or []]}) + elif groups and not groups[-1]["title"]: + groups[-1]["files"].append(str(item)) + else: + groups.append({"title": "", "files": [str(item)]}) + names = [f for g in groups for f in g["files"]] def read(name): path = os.path.join(docs_dir, name) @@ -160,6 +170,10 @@ def read(name): return {"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)} steps = [s for s in (read(n) for n in names) if s] + by_file = {s["file"]: s for s in steps} + for g in groups: + g["steps"] = [by_file[f] for f in g["files"] if f in by_file] + data["groups"] = groups # The About entries: pages like the steps, but not numbered. about_names = data.get("about") or [] if isinstance(about_names, str): diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 778be97..fed1c88 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1225,6 +1225,16 @@ textarea { height: 20px; stroke-width: 2.8; } +/* A group heading in the list: Setup, Usage. */ +.steps .grp { + padding: 16px 0 2px; + border-bottom: 0; + font-weight: 700; + font-size: 12px; + text-transform: uppercase; + letter-spacing: 0.08em; + color: var(--mute); +} .steps .about .num { font: 400 italic 16px/1 var(--f-type); text-transform: lowercase; diff --git a/theme/templates/app_macros.html b/theme/templates/app_macros.html index 36e2a8a..3ab0b51 100644 --- a/theme/templates/app_macros.html +++ b/theme/templates/app_macros.html @@ -106,12 +106,15 @@

      {{ day.day|e }}

      {# The tutorial's steps, numbered, each a link to its page in the card, with the unnumbered About entries first. #} -{% macro tutorial_steps(steps, about=[]) %} +{% macro tutorial_steps(groups, about=[]) %}
        {% for ab in about %}
      1. i{{ ab.title|e }}{{ icon('right') }}
      2. {% endfor %} - {% for st in steps %} + {% for g in groups %} + {% if g.title %}{% endif %} + {% for st in g.steps %}
      3. {{ st.number }}{{ st.title|e }}{{ icon('right') }}
      4. {% endfor %} + {% endfor %}
      {% endmacro %} diff --git a/theme/templates/app_upcoming.html b/theme/templates/app_upcoming.html index a2364e2..af86bb8 100644 --- a/theme/templates/app_upcoming.html +++ b/theme/templates/app_upcoming.html @@ -24,7 +24,7 @@

      {{ page.title|e }}

      {{ tutorial.title|e }}

      - {{ ui.tutorial_steps(tutorial.steps_data, tutorial.about) }} + {{ ui.tutorial_steps(tutorial.groups, tutorial.about) }}
      {{ ui.icon('left') }}Back From 6fbc88900add8c13debcf9df828a49c10dc2b7f5 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:41:45 -0500 Subject: [PATCH 11/60] Tutorial list: About and Requirements under System Setup Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 6 +++--- theme/static/css/app.css | 3 +++ theme/templates/app_macros.html | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 7a3bb92..d50ab1c 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -22,8 +22,8 @@ title: "Tutorials" -# Entries at the top of the list that are not numbered steps: what the arm -# and LeRobot are, and what you need before starting. +# Entries at the top of the first group that are not numbered steps: what +# the arm and LeRobot are, and what you need before starting. about: - about.md - requirements.md @@ -31,7 +31,7 @@ about: # The steps, in order: one Markdown file each, in content/docs/. They are # grouped under headings in the list; the numbering runs on across groups. steps: - - group: "Setup" + - group: "System Setup" files: - install.md - calibrate.md diff --git a/theme/static/css/app.css b/theme/static/css/app.css index fed1c88..f29737b 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1228,6 +1228,9 @@ textarea { /* A group heading in the list: Setup, Usage. */ .steps .grp { padding: 16px 0 2px; +} +.steps .grp:first-child { + padding-top: 0; border-bottom: 0; font-weight: 700; font-size: 12px; diff --git a/theme/templates/app_macros.html b/theme/templates/app_macros.html index 3ab0b51..0922485 100644 --- a/theme/templates/app_macros.html +++ b/theme/templates/app_macros.html @@ -104,13 +104,13 @@

      {{ day.day|e }}

      {% endmacro %} -{# The tutorial's steps, numbered, each a link to its page in the card, with - the unnumbered About entries first. #} +{# The tutorial's steps, numbered, each a link to its page in the card, under + their group headings. The unnumbered About entries open the first group. #} {% macro tutorial_steps(groups, about=[]) %}
        - {% for ab in about %}
      1. i{{ ab.title|e }}{{ icon('right') }}
      2. {% endfor %} {% for g in groups %} {% if g.title %}{% endif %} + {% if loop.first %}{% for ab in about %}
      3. i{{ ab.title|e }}{{ icon('right') }}
      4. {% endfor %}{% endif %} {% for st in g.steps %}
      5. {{ st.number }}{{ st.title|e }}{{ icon('right') }}
      6. {% endfor %} From 356bb95f8e03f28edf79f4e06c23c67445752965 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 10:58:01 -0500 Subject: [PATCH 12/60] Tutorial list: all six steps under Usage Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index d50ab1c..f04ecfe 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -32,11 +32,11 @@ about: # grouped under headings in the list; the numbering runs on across groups. steps: - group: "System Setup" + files: [] + - group: "Usage" files: - install.md - calibrate.md - - group: "Usage" - files: - teleoperate.md - cameras.md - dataset.md From 87553c984ad06e4f715426a7fdb7ded6e6eb7587 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:05:53 -0500 Subject: [PATCH 13/60] Tutorial: clip the card and page viewport instead of hiding overflow A hidden box can still be scrolled by a drag selection in some browsers, which shifted the pages; a clipped box cannot. Co-Authored-By: Claude Fable 5.1 --- theme/static/css/app.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/theme/static/css/app.css b/theme/static/css/app.css index f29737b..d147c6d 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -780,7 +780,7 @@ textarea { } .fit .one { grid-template-rows: auto minmax(0, 1fr); - overflow: hidden; + overflow: clip; } .fit .panel { grid-template-rows: minmax(0, 1fr); @@ -1065,8 +1065,10 @@ textarea { flex-direction: column; align-items: stretch; } +/* Clipped, not hidden: a hidden box can still be scrolled by a drag + selection in some browsers, which would shift the pages. */ .fit .card.big.tcard { - overflow: hidden; + overflow: clip; } .tcard > .ch { flex: none; @@ -1145,7 +1147,7 @@ textarea { .tview { min-height: 0; height: 100%; - overflow: hidden; + overflow: clip; } .ttrack { display: flex; From 100854aba6a5789c29acd897cde4beb59e755bff Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:43:18 -0500 Subject: [PATCH 14/60] Requirements: remove the old NVIDIA driver before installing 580 Co-Authored-By: Claude Fable 5.1 --- content/docs/requirements.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/docs/requirements.md b/content/docs/requirements.md index 5a28005..a15512a 100644 --- a/content/docs/requirements.md +++ b/content/docs/requirements.md @@ -20,6 +20,10 @@ nvidia-smi --query-gpu=driver_version --format=csv,noheader ### 2A. Driver older than 580: update it ```bash +# Remove the old driver first: its packages conflict with the new ones +sudo apt purge '*nvidia*570*' +sudo apt autoremove + sudo apt install -y nvidia-driver-580-open sudo reboot ``` From cb1f9f477a79d06ac218fb5b26c9b7884d80e0b7 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:44:40 -0500 Subject: [PATCH 15/60] Tutorial: the step pages scroll inside a bounded box in every layout In a window shorter than 640px the fit layout is off and the page scrolls; the step pages then grew to full height, so a drag selection scrolled the whole window. The pages' box is now a fixed share of the screen there. Requirements: the driver section is marked optional. Co-Authored-By: Claude Fable 5.1 --- content/docs/requirements.md | 2 +- theme/static/css/app.css | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/content/docs/requirements.md b/content/docs/requirements.md index a15512a..cc09612 100644 --- a/content/docs/requirements.md +++ b/content/docs/requirements.md @@ -8,7 +8,7 @@ Ubuntu 22.04 or 24.04, Python 3.12 or newer, ffmpeg. NVIDIA GPU optional: needed sudo apt update && sudo apt install -y git curl ffmpeg ``` -## 2. NVIDIA Driver +## 2. NVIDIA Driver (optional) PyTorch's default build: driver 580.65 or newer. diff --git a/theme/static/css/app.css b/theme/static/css/app.css index d147c6d..250bed6 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -798,6 +798,9 @@ textarea { overscroll-behavior: contain; scrollbar-width: thin; } + .fit .tview { + height: 100%; + } } /* Most phones: the browser's own bars leave about 650 to 750 px. The card is tightened so everything still fits, and the photo takes whatever @@ -1144,9 +1147,13 @@ textarea { text-decoration-thickness: 3px; text-underline-offset: 4px; } +/* The pages scroll inside a bounded box. In the fit layout the box is what + is left of the card; elsewhere (a short window, where the page scrolls) + it is a fixed share of the screen, so a drag selection scrolls the step + and not the whole page. */ .tview { min-height: 0; - height: 100%; + height: min(62vh, 720px); overflow: clip; } .ttrack { From b607eb0d551b1f2404f40d316b5faa60af49e6b5 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:46:21 -0500 Subject: [PATCH 16/60] Fit layout on any wide screen at least 480px tall A laptop window at a large display scaling is often under 640px tall; without the fit layout the page scrolled, and so did a selection dragged below the tutorial card. Wide screens scroll their cards inside themselves, so the fit layout works there down to 480px. Co-Authored-By: Claude Fable 5.1 --- theme/static/css/app.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 250bed6..679eae7 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -771,7 +771,10 @@ textarea { shorter screen than that (an iPhone SE, or a phone on its side) the page is laid out the ordinary way and scrolls. */ @supports selector(:has(*)) { - @media (min-height: 640px) { + /* A tall enough phone, or any wide screen that is not very short: on a + wide screen the cards scroll inside themselves, so a laptop window at + a large display scaling still fits. */ + @media (min-height: 640px), ((min-width: 700px) and (min-height: 480px)) { .sheet.fit { height: calc(100dvh - var(--chrome)); grid-template-rows: auto minmax(0, 1fr); From 2007b0b8c20646150e9679cc2e5122883521e635 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:55:08 -0500 Subject: [PATCH 17/60] Tutorial: selecting text in a step no longer scrolls it Two causes. The page viewport, now clipped rather than hidden, was no longer a scroll box, so the grid sized it to all the pages at once and the drawn text no longer matched where the browser thought it was; a min-width of 0 fixes the sizing. And the scroll-margin on each page, meant to keep a hash change from scrolling, made Chrome scroll the page to the top whenever a selection was extended inside it; with the boxes clipped it is not needed, so it is gone. The step text is also laid out as flowing blocks rather than a grid. Co-Authored-By: Claude Fable 5.1 --- theme/static/css/app.css | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 679eae7..20b9509 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1155,6 +1155,7 @@ textarea { it is a fixed share of the screen, so a drag selection scrolls the step and not the whole page. */ .tview { + min-width: 0; /* clip is not a scroll box, so the grid would size this to all the pages */ min-height: 0; height: min(62vh, 720px); overflow: clip; @@ -1177,8 +1178,9 @@ textarea { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; - /* The address points here; the slide, not a scroll, brings it into view. */ - scroll-margin: 100vh 0 0 100vw; + /* No scroll-margin here: the boxes around the page are clipped, so the + address's target cannot scroll anything, and a scroll-margin makes a + selection dragged inside the page scroll it to the top. */ } .tfoot { padding-top: 8px; @@ -1259,16 +1261,19 @@ textarea { color: var(--paper); box-shadow: inset 0 0 0 2px var(--hi); } -/* A step's text, as written in its Markdown file. */ +/* A step's text, as written in its Markdown file. Flowing blocks with + margins, not a grid: in a grid, a selection dragged through a gap jumps + to the first block and scrolls the step to it. */ .md { justify-self: stretch; - display: grid; - gap: 14px; } .md > * { min-width: 0; margin: 0; } +.md > * + * { + margin-top: 14px; +} .md h2 { margin-top: 8px; padding-top: 16px; @@ -1293,10 +1298,11 @@ textarea { } .md ul, .md ol { - display: grid; - gap: 4px; padding-left: 22px; } +.md li + li { + margin-top: 4px; +} .md a { font-weight: 700; } @@ -1333,7 +1339,8 @@ textarea { scrolls sideways is never hidden under it. */ .code { justify-self: stretch; - display: grid; + display: flex; + flex-direction: column; border: 2px solid var(--ink); background: var(--white); box-shadow: 3px 3px 0 var(--ink); @@ -1353,7 +1360,7 @@ textarea { } .code .copy { order: 1; - justify-self: end; + align-self: flex-end; margin: -2px -2px 0 0; min-height: 28px; padding: 2px 8px; @@ -1362,8 +1369,6 @@ textarea { /* A "> [!CAUTION]" alert from the Markdown. */ .callout { justify-self: stretch; - display: grid; - gap: 6px; padding: 12px 14px; border: 2px dashed var(--ink); } @@ -1372,7 +1377,11 @@ textarea { border-style: solid; background: var(--hi); } +.callout > * + * { + margin-top: 6px; +} .callout > b { + display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; From 9c39da104df78ee4161d0545215c83edd1eab611 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:57:42 -0500 Subject: [PATCH 18/60] Tutorial: the CUDA 12 PyTorch step belongs to Installation Co-Authored-By: Claude Fable 5.1 --- content/docs/install.md | 20 +++++++++++++++++++- content/docs/requirements.md | 11 +---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/content/docs/install.md b/content/docs/install.md index cf63d83..4c624e5 100644 --- a/content/docs/install.md +++ b/content/docs/install.md @@ -30,7 +30,16 @@ conda activate lerobot # Install ffmpeg (if video errors occur, use ffmpeg=7.1.1 instead) conda install -y ffmpeg -c conda-forge +``` + +Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). + +```bash +pip install --index-url https://download.pytorch.org/whl/cu126 torch torchvision +pip install --index-url https://download.pytorch.org/whl/cpu torchcodec +``` +```bash # Install LeRobot cd ~/rebot_lerobot/lerobot pip install -e ".[all]" @@ -48,10 +57,19 @@ sudo apt install -y ffmpeg cd ~/rebot_lerobot/lerobot uv venv --python 3.12 source .venv/bin/activate +``` + +Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). + +```bash +uv pip install --torch-backend cu126 torch torchvision +uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec +``` +```bash # Install LeRobot uv pip install -e ".[all]" ``` > [!NOTE] -> The reBot arm is built into this fork, so no extra plugin packages are needed. If LeRobot warns that your NVIDIA driver is too old, either update the driver to 580 or newer, or before installing LeRobot take the CUDA 12 build of PyTorch: `uv pip install --torch-backend cu126 torch torchvision` and `uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec`. +> The reBot arm is built into this fork, so no extra plugin packages are needed. diff --git a/content/docs/requirements.md b/content/docs/requirements.md index cc09612..06d684b 100644 --- a/content/docs/requirements.md +++ b/content/docs/requirements.md @@ -17,7 +17,7 @@ PyTorch's default build: driver 580.65 or newer. nvidia-smi --query-gpu=driver_version --format=csv,noheader ``` -### 2A. Driver older than 580: update it +Driver older than 580: update it, or install the CUDA 12 build of PyTorch during the installation step. ```bash # Remove the old driver first: its packages conflict with the new ones @@ -27,12 +27,3 @@ sudo apt autoremove sudo apt install -y nvidia-driver-580-open sudo reboot ``` - -### 2B. Driver older than 580: keep it, use the CUDA 12 build of PyTorch - -Run before installing LeRobot. Stays on torch 2.14. - -```bash -uv pip install --torch-backend cu126 torch torchvision -uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec -``` From 8e6c554b624e5cfd9c87cdd7434f94d72e5b5f98 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:58:33 -0500 Subject: [PATCH 19/60] Installation: one Install section with uv and Conda sub-headings Co-Authored-By: Claude Fable 5.1 --- content/docs/install.md | 58 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/content/docs/install.md b/content/docs/install.md index 4c624e5..544770f 100644 --- a/content/docs/install.md +++ b/content/docs/install.md @@ -14,62 +14,64 @@ cd ~/rebot_lerobot git clone https://github.com/Seeed-Projects/lerobot.git ``` -## 3A. Install with conda +## 3. Install + +### 3 - uv ```bash -# Install Miniforge -cd ~ -wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -bash Miniforge3-$(uname)-$(uname -m).sh -~/miniforge3/bin/conda init bash +# Install uv and ffmpeg +curl -LsSf https://astral.sh/uv/install.sh | sh source ~/.bashrc +sudo apt install -y ffmpeg # Create and activate the environment -conda create -y -n lerobot python=3.12 -conda activate lerobot - -# Install ffmpeg (if video errors occur, use ffmpeg=7.1.1 instead) -conda install -y ffmpeg -c conda-forge +cd ~/rebot_lerobot/lerobot +uv venv --python 3.12 +source .venv/bin/activate ``` Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). ```bash -pip install --index-url https://download.pytorch.org/whl/cu126 torch torchvision -pip install --index-url https://download.pytorch.org/whl/cpu torchcodec +uv pip install --torch-backend cu126 torch torchvision +uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec ``` ```bash # Install LeRobot -cd ~/rebot_lerobot/lerobot -pip install -e ".[all]" +uv pip install -e ".[all]" ``` -## 3B. Install with uv +> [!NOTE] +> The reBot arm is built into this fork, so no extra plugin packages are needed. + +### 3 - Conda ```bash -# Install uv and ffmpeg -curl -LsSf https://astral.sh/uv/install.sh | sh +# Install Miniforge +cd ~ +wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" +bash Miniforge3-$(uname)-$(uname -m).sh +~/miniforge3/bin/conda init bash source ~/.bashrc -sudo apt install -y ffmpeg # Create and activate the environment -cd ~/rebot_lerobot/lerobot -uv venv --python 3.12 -source .venv/bin/activate +conda create -y -n lerobot python=3.12 +conda activate lerobot + +# Install ffmpeg (if video errors occur, use ffmpeg=7.1.1 instead) +conda install -y ffmpeg -c conda-forge ``` Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). ```bash -uv pip install --torch-backend cu126 torch torchvision -uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec +pip install --index-url https://download.pytorch.org/whl/cu126 torch torchvision +pip install --index-url https://download.pytorch.org/whl/cpu torchcodec ``` ```bash # Install LeRobot -uv pip install -e ".[all]" +cd ~/rebot_lerobot/lerobot +pip install -e ".[all]" ``` - -> [!NOTE] -> The reBot arm is built into this fork, so no extra plugin packages are needed. From a2306d53ec8dba2cf95cd68bacd3a47eb24b518f Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 11:58:41 -0500 Subject: [PATCH 20/60] Installation: the note about plugin packages goes last Co-Authored-By: Claude Fable 5.1 --- content/docs/install.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/install.md b/content/docs/install.md index 544770f..557b260 100644 --- a/content/docs/install.md +++ b/content/docs/install.md @@ -42,9 +42,6 @@ uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec uv pip install -e ".[all]" ``` -> [!NOTE] -> The reBot arm is built into this fork, so no extra plugin packages are needed. - ### 3 - Conda ```bash @@ -75,3 +72,6 @@ pip install --index-url https://download.pytorch.org/whl/cpu torchcodec cd ~/rebot_lerobot/lerobot pip install -e ".[all]" ``` + +> [!NOTE] +> The reBot arm is built into this fork, so no extra plugin packages are needed. From dc83dfa35b68d7fdb2c7b0e2bf34cc70c0268254 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:01:16 -0500 Subject: [PATCH 21/60] Tutorial: two step-1 installs, plugin packages, About links, no markers LeRobot Installation is two entries that share number 1, uv and Conda, each a complete page. Both install the two Seeed plugin packages, so the wiki's robot and leader names work alongside the fork's own; the note about the names is gone from Calibration. About and Requirements lose their i marker. The About page links the arm, the leader arm and LeRobot. Markdown links open in a new tab. Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 5 ++- content/docs/about.md | 6 +-- content/docs/calibrate.md | 3 -- content/docs/{install.md => install-conda.md} | 36 ++------------- content/docs/install-uv.md | 44 +++++++++++++++++++ plugins/yaml_page.py | 27 +++++++++--- theme/static/css/app.css | 6 +-- theme/templates/app_macros.html | 2 +- 8 files changed, 79 insertions(+), 50 deletions(-) rename content/docs/{install.md => install-conda.md} (59%) create mode 100644 content/docs/install-uv.md diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index f04ecfe..1abeba5 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -30,12 +30,15 @@ about: # The steps, in order: one Markdown file each, in content/docs/. They are # grouped under headings in the list; the numbering runs on across groups. +# A list in place of a file name is a set of alternatives (such as two ways +# to install) that share one number. steps: - group: "System Setup" files: [] - group: "Usage" files: - - install.md + # Alternatives share a number: either one is step 1. + - [install-uv.md, install-conda.md] - calibrate.md - teleoperate.md - cameras.md diff --git a/content/docs/about.md b/content/docs/about.md index 58f4a39..43a3f48 100644 --- a/content/docs/about.md +++ b/content/docs/about.md @@ -2,15 +2,15 @@ ## What is a reBot Arm? -The reBot Arm B601-RS is a six-joint robot arm made by Seeed, launched as an open-source arm to lower the barrier to learning embodied intelligence. +The [reBot Arm B601-RS](https://wiki.seeedstudio.com/rebot_arm_b601_rs_lerobot/) is a six-joint robot arm made by Seeed, launched as an open-source arm to lower the barrier to learning embodied intelligence. ## What is LeRobot? -LeRobot is Hugging Face's open-source robot learning library, written in PyTorch. It focuses on imitation learning and reinforcement learning, and provides pretrained models, datasets of human demonstrations, and simulation environments. +[LeRobot](https://github.com/huggingface/lerobot) is Hugging Face's open-source robot learning library, written in PyTorch. It focuses on imitation learning and reinforcement learning, and provides pretrained models, datasets of human demonstrations, and simulation environments. ## Teleoperate, record, train -1. You move the leader arm by hand, and the follower copies it in real time. +1. You move the [leader arm](https://www.seeedstudio.com/StarAi-Arm-Violin-p-6571.html) by hand, and the [follower](https://wiki.seeedstudio.com/rebot_arm_b601_rs_lerobot/) copies it in real time. 2. While you do that, cameras and joint positions are recorded as episodes. One episode is one attempt at the task, like "grab the black cube". 3. You train a neural network on those episodes. 4. The trained network then looks through the cameras and moves the arm by itself. diff --git a/content/docs/calibrate.md b/content/docs/calibrate.md index 0e61e2c..cb661fa 100644 --- a/content/docs/calibrate.md +++ b/content/docs/calibrate.md @@ -1,8 +1,5 @@ # Robot Calibration -> [!NOTE] -> These names are for the current Seeed fork of LeRobot, which has the reBot arm built in. Seeed's wiki uses an older setup with two plugin packages, where the follower is `seeed_b601_rs_follower` with `--robot.can_adapter=socketcan` and the leader is `rebot_arm_102_leader`. Use whichever your install knows: `lerobot-calibrate --help` lists the types. - ## 1. Follower Arm ```bash diff --git a/content/docs/install.md b/content/docs/install-conda.md similarity index 59% rename from content/docs/install.md rename to content/docs/install-conda.md index 557b260..5f1bb74 100644 --- a/content/docs/install.md +++ b/content/docs/install-conda.md @@ -1,4 +1,4 @@ -# LeRobot Installation +# LeRobot Installation (Conda) ## 1. System Packages @@ -16,34 +16,6 @@ git clone https://github.com/Seeed-Projects/lerobot.git ## 3. Install -### 3 - uv - -```bash -# Install uv and ffmpeg -curl -LsSf https://astral.sh/uv/install.sh | sh -source ~/.bashrc -sudo apt install -y ffmpeg - -# Create and activate the environment -cd ~/rebot_lerobot/lerobot -uv venv --python 3.12 -source .venv/bin/activate -``` - -Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). - -```bash -uv pip install --torch-backend cu126 torch torchvision -uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec -``` - -```bash -# Install LeRobot -uv pip install -e ".[all]" -``` - -### 3 - Conda - ```bash # Install Miniforge cd ~ @@ -68,10 +40,10 @@ pip install --index-url https://download.pytorch.org/whl/cpu torchcodec ``` ```bash -# Install LeRobot +# Install LeRobot and the Seeed plugins cd ~/rebot_lerobot/lerobot pip install -e ".[all]" +pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 ``` -> [!NOTE] -> The reBot arm is built into this fork, so no extra plugin packages are needed. +The fork has the arm built in as `rebot_b601_follower` and `rebot_102_leader`; the plugins add the names Seeed's wiki uses, `seeed_b601_rs_follower` and `rebot_arm_102_leader`, so either set works. diff --git a/content/docs/install-uv.md b/content/docs/install-uv.md new file mode 100644 index 0000000..77ec21c --- /dev/null +++ b/content/docs/install-uv.md @@ -0,0 +1,44 @@ +# LeRobot Installation (uv) + +## 1. System Packages + +```bash +sudo apt update && sudo apt install -y git curl +``` + +## 2. Clone LeRobot + +```bash +mkdir -p ~/rebot_lerobot +cd ~/rebot_lerobot +git clone https://github.com/Seeed-Projects/lerobot.git +``` + +## 3. Install + +```bash +# Install uv and ffmpeg +curl -LsSf https://astral.sh/uv/install.sh | sh +source ~/.bashrc +sudo apt install -y ffmpeg + +# Create and activate the environment +cd ~/rebot_lerobot/lerobot +uv venv --python 3.12 +source .venv/bin/activate +``` + +Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). + +```bash +uv pip install --torch-backend cu126 torch torchvision +uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec +``` + +```bash +# Install LeRobot and the Seeed plugins +uv pip install -e ".[all]" +uv pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 +``` + +The fork has the arm built in as `rebot_b601_follower` and `rebot_102_leader`; the plugins add the names Seeed's wiki uses, `seeed_b601_rs_follower` and `rebot_arm_102_leader`, so either set works. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index b81587c..1c002fb 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -146,15 +146,20 @@ def _prepare_tutorial(self, data): docs_dir = os.path.join(self.path, "docs") # `steps` is a list of groups ({group: title, files: [...]}) or, for a # list without headings, of file names. + # Within a group, a file name is one step; a list of names is a set of + # alternatives that share one number. + def entries(files): + return [[str(f) for f in e] if isinstance(e, list) else [str(e)] for e in files or []] + groups = [] for item in data.get("steps") or []: if isinstance(item, dict): - groups.append({"title": item.get("group") or "", "files": [str(f) for f in item.get("files") or []]}) + groups.append({"title": item.get("group") or "", "entries": entries(item.get("files"))}) elif groups and not groups[-1]["title"]: - groups[-1]["files"].append(str(item)) + groups[-1]["entries"] += entries([item]) else: - groups.append({"title": "", "files": [str(item)]}) - names = [f for g in groups for f in g["files"]] + groups.append({"title": "", "entries": entries([item])}) + names = [f for g in groups for e in g["entries"] for f in e] def read(name): path = os.path.join(docs_dir, name) @@ -171,8 +176,15 @@ def read(name): steps = [s for s in (read(n) for n in names) if s] by_file = {s["file"]: s for s in steps} + number = 0 for g in groups: - g["steps"] = [by_file[f] for f in g["files"] if f in by_file] + g["steps"] = [] + for e in g["entries"]: + number += 1 + for f in e: + if f in by_file: + by_file[f]["number"] = number + g["steps"].append(by_file[f]) data["groups"] = groups # The About entries: pages like the steps, but not numbered. about_names = data.get("about") or [] @@ -185,9 +197,8 @@ def read(name): for name in sorted(os.listdir(docs_dir)): if name.endswith(".md") and name not in names and name not in [str(n) for n in about_names]: log.warning("content/docs/%s is not listed in _tutorial.yaml, so it is not built", name) - total = len(steps) + total = number for i, step in enumerate(steps): - step["number"] = i + 1 step["total"] = total step["prev"] = steps[i - 1] if i else None step["next"] = steps[i + 1] if i + 1 < total else None @@ -206,6 +217,8 @@ def alert(match): text = ALERT.sub(alert, text + "\n") html = markdown.markdown(text, extensions=["fenced_code", "sane_lists", "tables"]) + # Links to other sites open in a new tab, as everywhere on the site. + html = re.sub(r'', r'', html) # Every code block gets a Copy button, wired up by app.js. return re.sub( r"
        (.*?)
        ", diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 20b9509..2c8b6f9 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1252,9 +1252,9 @@ textarea { letter-spacing: 0.08em; color: var(--mute); } -.steps .about .num { - font: 400 italic 16px/1 var(--f-type); - text-transform: lowercase; +/* An About entry has no number: its name starts where a numbered one does. */ +.steps .about a { + grid-template-columns: minmax(0, 1fr) 20px; } .steps a.cur .num { background: var(--ink); diff --git a/theme/templates/app_macros.html b/theme/templates/app_macros.html index 0922485..166704f 100644 --- a/theme/templates/app_macros.html +++ b/theme/templates/app_macros.html @@ -110,7 +110,7 @@

        {{ day.day|e }}

          {% for g in groups %} {% if g.title %}{% endif %} - {% if loop.first %}{% for ab in about %}
        1. i{{ ab.title|e }}{{ icon('right') }}
        2. {% endfor %}{% endif %} + {% if loop.first %}{% for ab in about %}
        3. {{ ab.title|e }}{{ icon('right') }}
        4. {% endfor %}{% endif %} {% for st in g.steps %}
        5. {{ st.number }}{{ st.title|e }}{{ icon('right') }}
        6. {% endfor %} From 7ded04e6cb84a60588edabb9613bff8c801ffce1 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:01:35 -0500 Subject: [PATCH 22/60] Tutorial list: every group heading styled, not only the first Co-Authored-By: Claude Fable 5.1 --- theme/static/css/app.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 2c8b6f9..cccbeee 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1239,12 +1239,9 @@ textarea { height: 20px; stroke-width: 2.8; } -/* A group heading in the list: Setup, Usage. */ +/* A group heading in the list: System Setup, Usage. */ .steps .grp { padding: 16px 0 2px; -} -.steps .grp:first-child { - padding-top: 0; border-bottom: 0; font-weight: 700; font-size: 12px; @@ -1252,6 +1249,9 @@ textarea { letter-spacing: 0.08em; color: var(--mute); } +.steps .grp:first-child { + padding-top: 0; +} /* An About entry has no number: its name starts where a numbered one does. */ .steps .about a { grid-template-columns: minmax(0, 1fr) 20px; From c030186a37c5cf03ffad4bf1fc7d20d0132915ab Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:02:25 -0500 Subject: [PATCH 23/60] Tutorial list: an Installation group with steps 1a and 1b Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 8 +++++--- plugins/yaml_page.py | 3 ++- theme/static/css/app.css | 1 + theme/templates/app_macros.html | 2 +- theme/templates/app_upcoming.html | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 1abeba5..8fe132a 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -31,14 +31,16 @@ about: # The steps, in order: one Markdown file each, in content/docs/. They are # grouped under headings in the list; the numbering runs on across groups. # A list in place of a file name is a set of alternatives (such as two ways -# to install) that share one number. +# to install) that share one number and are told apart by a letter: 1a, 1b. steps: - group: "System Setup" files: [] - - group: "Usage" + - group: "Installation" files: - # Alternatives share a number: either one is step 1. + # Alternatives share a number and get a letter each: 1a, 1b. - [install-uv.md, install-conda.md] + - group: "Usage" + files: - calibrate.md - teleoperate.md - cameras.md diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 1c002fb..8886efe 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -181,9 +181,10 @@ def read(name): g["steps"] = [] for e in g["entries"]: number += 1 - for f in e: + for k, f in enumerate(e): if f in by_file: by_file[f]["number"] = number + by_file[f]["label"] = f"{number}{'abcdefgh'[k]}" if len(e) > 1 else str(number) g["steps"].append(by_file[f]) data["groups"] = groups # The About entries: pages like the steps, but not numbered. diff --git a/theme/static/css/app.css b/theme/static/css/app.css index cccbeee..98618e6 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1230,6 +1230,7 @@ textarea { place-items: center; width: 30px; height: 30px; + letter-spacing: -0.02em; /* "1a" fits the box */ border: 2px solid var(--ink); background: var(--white); font: 400 16px/1 var(--f-mast); diff --git a/theme/templates/app_macros.html b/theme/templates/app_macros.html index 166704f..f1aa0db 100644 --- a/theme/templates/app_macros.html +++ b/theme/templates/app_macros.html @@ -112,7 +112,7 @@

          {{ day.day|e }}

          {% if g.title %}{% endif %} {% if loop.first %}{% for ab in about %}
        7. {{ ab.title|e }}{{ icon('right') }}
        8. {% endfor %}{% endif %} {% for st in g.steps %} -
        9. {{ st.number }}{{ st.title|e }}{{ icon('right') }}
        10. +
        11. {{ st.label }}{{ st.title|e }}{{ icon('right') }}
        12. {% endfor %} {% endfor %}
        diff --git a/theme/templates/app_upcoming.html b/theme/templates/app_upcoming.html index af86bb8..7f5e14a 100644 --- a/theme/templates/app_upcoming.html +++ b/theme/templates/app_upcoming.html @@ -29,7 +29,7 @@

        {{ tutorial.title|e }}

        From d9ae68948e8434035065e2cd3470d8fffeb6c813 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:04:11 -0500 Subject: [PATCH 24/60] Installation steps named UV and Conda Co-Authored-By: Claude Fable 5.1 --- content/docs/install-conda.md | 2 +- content/docs/install-uv.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/install-conda.md b/content/docs/install-conda.md index 5f1bb74..df82339 100644 --- a/content/docs/install-conda.md +++ b/content/docs/install-conda.md @@ -1,4 +1,4 @@ -# LeRobot Installation (Conda) +# Conda ## 1. System Packages diff --git a/content/docs/install-uv.md b/content/docs/install-uv.md index 77ec21c..118d5e7 100644 --- a/content/docs/install-uv.md +++ b/content/docs/install-uv.md @@ -1,4 +1,4 @@ -# LeRobot Installation (uv) +# UV ## 1. System Packages From e54998a4c2a765e4502f67d0ee1bd78263bf7e8a Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:05:36 -0500 Subject: [PATCH 25/60] Installation: drop the sentence about the two name sets Co-Authored-By: Claude Fable 5.1 --- content/docs/install-conda.md | 2 -- content/docs/install-uv.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/content/docs/install-conda.md b/content/docs/install-conda.md index df82339..5e6a083 100644 --- a/content/docs/install-conda.md +++ b/content/docs/install-conda.md @@ -45,5 +45,3 @@ cd ~/rebot_lerobot/lerobot pip install -e ".[all]" pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 ``` - -The fork has the arm built in as `rebot_b601_follower` and `rebot_102_leader`; the plugins add the names Seeed's wiki uses, `seeed_b601_rs_follower` and `rebot_arm_102_leader`, so either set works. diff --git a/content/docs/install-uv.md b/content/docs/install-uv.md index 118d5e7..bdaa17d 100644 --- a/content/docs/install-uv.md +++ b/content/docs/install-uv.md @@ -40,5 +40,3 @@ uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec uv pip install -e ".[all]" uv pip install lerobot-robot-seeed-b601 lerobot-teleoperator-rebot-arm-102 ``` - -The fork has the arm built in as `rebot_b601_follower` and `rebot_102_leader`; the plugins add the names Seeed's wiki uses, `seeed_b601_rs_follower` and `rebot_arm_102_leader`, so either set works. From 94b39062fd55ac6bc0db8f2fc82c2dc64d7c1d23 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:06:04 -0500 Subject: [PATCH 26/60] Installation: a plainer line for the CUDA 12 PyTorch block Co-Authored-By: Claude Fable 5.1 --- content/docs/install-conda.md | 2 +- content/docs/install-uv.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/install-conda.md b/content/docs/install-conda.md index 5e6a083..31c7585 100644 --- a/content/docs/install-conda.md +++ b/content/docs/install-conda.md @@ -32,7 +32,7 @@ conda activate lerobot conda install -y ffmpeg -c conda-forge ``` -Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). +NVIDIA driver older than 580: install PyTorch for CUDA 12 first. ```bash pip install --index-url https://download.pytorch.org/whl/cu126 torch torchvision diff --git a/content/docs/install-uv.md b/content/docs/install-uv.md index bdaa17d..a74b101 100644 --- a/content/docs/install-uv.md +++ b/content/docs/install-uv.md @@ -28,7 +28,7 @@ uv venv --python 3.12 source .venv/bin/activate ``` -Driver older than 580 only: the CUDA 12 build of PyTorch (stays on torch 2.14). +NVIDIA driver older than 580: install PyTorch for CUDA 12 first. ```bash uv pip install --torch-backend cu126 torch torchvision From 7c77bd63dfe4f302163c52f4dc79d4e0e6dfe894 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:06:55 -0500 Subject: [PATCH 27/60] Installation: check the driver version before the CUDA 12 block; GPU optional Co-Authored-By: Claude Fable 5.1 --- content/docs/install-conda.md | 6 +++++- content/docs/install-uv.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/content/docs/install-conda.md b/content/docs/install-conda.md index 31c7585..3d67af6 100644 --- a/content/docs/install-conda.md +++ b/content/docs/install-conda.md @@ -32,7 +32,11 @@ conda activate lerobot conda install -y ffmpeg -c conda-forge ``` -NVIDIA driver older than 580: install PyTorch for CUDA 12 first. +NVIDIA GPU (optional): check the driver version. Older than 580: install PyTorch for CUDA 12 first. + +```bash +nvidia-smi --query-gpu=driver_version --format=csv,noheader +``` ```bash pip install --index-url https://download.pytorch.org/whl/cu126 torch torchvision diff --git a/content/docs/install-uv.md b/content/docs/install-uv.md index a74b101..50db9ac 100644 --- a/content/docs/install-uv.md +++ b/content/docs/install-uv.md @@ -28,7 +28,11 @@ uv venv --python 3.12 source .venv/bin/activate ``` -NVIDIA driver older than 580: install PyTorch for CUDA 12 first. +NVIDIA GPU (optional): check the driver version. Older than 580: install PyTorch for CUDA 12 first. + +```bash +nvidia-smi --query-gpu=driver_version --format=csv,noheader +``` ```bash uv pip install --torch-backend cu126 torch torchvision From 0163719d5e734179f02dc970f58dc140942b5003 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:07:42 -0500 Subject: [PATCH 28/60] Installation: the GPU part and the LeRobot install under sub-headings Co-Authored-By: Claude Fable 5.1 --- content/docs/install-conda.md | 6 +++++- content/docs/install-uv.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/content/docs/install-conda.md b/content/docs/install-conda.md index 3d67af6..f70fe15 100644 --- a/content/docs/install-conda.md +++ b/content/docs/install-conda.md @@ -32,7 +32,9 @@ conda activate lerobot conda install -y ffmpeg -c conda-forge ``` -NVIDIA GPU (optional): check the driver version. Older than 580: install PyTorch for CUDA 12 first. +### NVIDIA GPU (optional) + +Check the driver version. Older than 580: install PyTorch for CUDA 12 first. ```bash nvidia-smi --query-gpu=driver_version --format=csv,noheader @@ -43,6 +45,8 @@ pip install --index-url https://download.pytorch.org/whl/cu126 torch torchvision pip install --index-url https://download.pytorch.org/whl/cpu torchcodec ``` +### Install LeRobot + ```bash # Install LeRobot and the Seeed plugins cd ~/rebot_lerobot/lerobot diff --git a/content/docs/install-uv.md b/content/docs/install-uv.md index 50db9ac..b092c11 100644 --- a/content/docs/install-uv.md +++ b/content/docs/install-uv.md @@ -28,7 +28,9 @@ uv venv --python 3.12 source .venv/bin/activate ``` -NVIDIA GPU (optional): check the driver version. Older than 580: install PyTorch for CUDA 12 first. +### NVIDIA GPU (optional) + +Check the driver version. Older than 580: install PyTorch for CUDA 12 first. ```bash nvidia-smi --query-gpu=driver_version --format=csv,noheader @@ -39,6 +41,8 @@ uv pip install --torch-backend cu126 torch torchvision uv pip install --index-url https://download.pytorch.org/whl/cpu torchcodec ``` +### Install LeRobot + ```bash # Install LeRobot and the Seeed plugins uv pip install -e ".[all]" From 34216b5df5290543da574b768ab5a9fe5dc3557b Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:10:50 -0500 Subject: [PATCH 29/60] Calibration: press c to start Co-Authored-By: Claude Fable 5.1 --- content/docs/calibrate.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/calibrate.md b/content/docs/calibrate.md index cb661fa..36b0c18 100644 --- a/content/docs/calibrate.md +++ b/content/docs/calibrate.md @@ -16,6 +16,8 @@ lerobot-calibrate \ --robot.id=follower1 ``` +Press `c` to start the calibration. + ## 2. Leader Arm ```bash From e5ce9feea505b7c870216ccfc81efb416e34cb6c Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:15:04 -0500 Subject: [PATCH 30/60] Tutorial: a Sim to Real step from Seeed's Isaac Sim project Co-Authored-By: Claude Fable 5.1 --- content/data/_tutorial.yaml | 1 + content/docs/sim.md | 55 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 content/docs/sim.md diff --git a/content/data/_tutorial.yaml b/content/data/_tutorial.yaml index 8fe132a..7c41e3e 100644 --- a/content/data/_tutorial.yaml +++ b/content/data/_tutorial.yaml @@ -46,6 +46,7 @@ steps: - cameras.md - dataset.md - train.md + - sim.md # Where the steps come from: a link, always in view under the open step. source: diff --git a/content/docs/sim.md b/content/docs/sim.md new file mode 100644 index 0000000..e4b2442 --- /dev/null +++ b/content/docs/sim.md @@ -0,0 +1,55 @@ +# Sim to Real + +Teleoperate a simulated reBot Arm in Isaac Sim with the real leader arm, record a LeRobot dataset there, and train on it as in Training and Evaluation. From Seeed's [rebot-arm-dli-isaacsim](https://github.com/Seeed-Projects/rebot-arm-dli-isaacsim) project. + +Needs an NVIDIA RTX GPU with at least 12 GB of VRAM, Isaac Sim 6.1, and the calibrated leader arm. + +## 1. Isaac Sim + +Download the standalone Linux build from [NVIDIA](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/quick-install.html), then: + +```bash +unzip isaac-sim-standalone-6.1.0-linux-x86_64.zip -d ~/isaacsim +cd ~/isaacsim +./post_install.sh +``` + +## 2. The Project + +```bash +sudo apt install -y git-lfs +cd ~ +git clone https://github.com/Seeed-Projects/rebot-arm-dli-isaacsim.git +cd rebot-arm-dli-isaacsim +git lfs install +git lfs pull +``` + +## 3. Teleoperate in the Simulation + +```bash +cd ~/rebot-arm-dli-isaacsim +./run.sh --leader-port /dev/ttyUSB0 +``` + +Click the Isaac Sim viewport first so it has keyboard focus. Keys while recording: + +- **S**: start or stop an episode. +- **C**: discard the episode. + +Episodes are saved as a LeRobot dataset in `datasets/rebot_stationery_front_side`. + +## 4. Visualize and Replay + +```bash +lerobot-dataset-viz \ + --repo-id local/rebot_stationery_front_side \ + --root ~/rebot-arm-dli-isaacsim/datasets/rebot_stationery_front_side \ + --episode-index 0 +``` + +```bash +cd ~/rebot-arm-dli-isaacsim +./run.sh --no-start-bridge --no-recording --no-dr +~/rebot_lerobot/lerobot/.venv/bin/python scripts/replay_episode.py --episode 0 +``` From 49a6559cc147507949c5dfa5ef27893c5b6d065d Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:39:15 -0500 Subject: [PATCH 31/60] Calibration: the leader arm's port setup and calibration as separate blocks Co-Authored-By: Claude Fable 5.1 --- content/docs/calibrate.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/content/docs/calibrate.md b/content/docs/calibrate.md index 36b0c18..7f00ed9 100644 --- a/content/docs/calibrate.md +++ b/content/docs/calibrate.md @@ -7,7 +7,9 @@ sudo ip link set can0 down 2>/dev/null sudo ip link set can0 type can bitrate 1000000 sudo ip link set can0 up +``` +```bash # Calibrate lerobot-calibrate \ --robot.type=rebot_b601_follower \ @@ -20,15 +22,25 @@ Press `c` to start the calibration. ## 2. Leader Arm +### Serial port + ```bash -# If the last line shows ttyUSB as "disconnected", remove brltty sudo dmesg | grep ttyUSB +``` + +The last line shows ttyUSB as "disconnected": remove brltty, then unplug and replug the arm. + +```bash sudo apt remove brltty +``` -# Grant access to the serial port +```bash sudo chmod 666 /dev/ttyUSB0 +``` -# Calibrate +### Calibrate + +```bash lerobot-calibrate \ --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ From c70b4a8466368bee639a67c821fa266d9c9c84b1 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:42:49 -0500 Subject: [PATCH 32/60] Calibration: the leader's serial port setup in one block Co-Authored-By: Claude Fable 5.1 --- content/docs/calibrate.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/content/docs/calibrate.md b/content/docs/calibrate.md index 7f00ed9..f68cd1e 100644 --- a/content/docs/calibrate.md +++ b/content/docs/calibrate.md @@ -26,15 +26,10 @@ Press `c` to start the calibration. ```bash sudo dmesg | grep ttyUSB -``` - -The last line shows ttyUSB as "disconnected": remove brltty, then unplug and replug the arm. -```bash +# Last line shows ttyUSB as "disconnected": remove brltty, then replug the arm sudo apt remove brltty -``` -```bash sudo chmod 666 /dev/ttyUSB0 ``` From 2736ddfd2b2c88b8c6b84db456bbf8279f9a46e9 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:46:23 -0500 Subject: [PATCH 33/60] Teleoperation: Ctrl-C stops it Co-Authored-By: Claude Fable 5.1 --- content/docs/teleoperate.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/teleoperate.md b/content/docs/teleoperate.md index 54abcc8..961d84c 100644 --- a/content/docs/teleoperate.md +++ b/content/docs/teleoperate.md @@ -27,3 +27,5 @@ lerobot-teleoperate \ --teleop.port=/dev/ttyUSB0 \ --teleop.id=leader1 ``` + +Press `Ctrl` + `C` to stop. From b9ebbd0650821cd078a4c6f8139f3f8c59b9a759 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:50:29 -0500 Subject: [PATCH 34/60] Camera Setup: links to the wiki, the fork's cameras guide and LeRobot's docs Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 9056113..e41938b 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -1,5 +1,7 @@ # Camera Setup +More on cameras: [Add Cameras](https://wiki.seeedstudio.com/rebot_arm_b601_rs_lerobot/#add-cameras) on Seeed's wiki, the [cameras guide](https://github.com/Seeed-Projects/lerobot/blob/main/docs/source/cameras.mdx) in the Seeed LeRobot repository, and [LeRobot's cameras page](https://huggingface.co/docs/lerobot/cameras). + ## 1. Find the Cameras Find the camera indices (use `realsense` instead of `opencv` for Intel RealSense cameras): From b346998ffb8ea60b5bae460516d33cda6d31ac4d Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:51:28 -0500 Subject: [PATCH 35/60] Camera Setup: links as a Resources list at the end Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index e41938b..5475415 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -1,12 +1,9 @@ # Camera Setup -More on cameras: [Add Cameras](https://wiki.seeedstudio.com/rebot_arm_b601_rs_lerobot/#add-cameras) on Seeed's wiki, the [cameras guide](https://github.com/Seeed-Projects/lerobot/blob/main/docs/source/cameras.mdx) in the Seeed LeRobot repository, and [LeRobot's cameras page](https://huggingface.co/docs/lerobot/cameras). - ## 1. Find the Cameras -Find the camera indices (use `realsense` instead of `opencv` for Intel RealSense cameras): - ```bash +# Intel RealSense: use realsense instead of opencv lerobot-find-cameras opencv ``` @@ -41,3 +38,9 @@ lerobot-teleoperate \ --teleop.id=leader1 \ --display_data=true ``` + +## Resources + +- [Add Cameras](https://wiki.seeedstudio.com/rebot_arm_b601_rs_lerobot/#add-cameras), Seeed wiki +- [Cameras guide](https://github.com/Seeed-Projects/lerobot/blob/main/docs/source/cameras.mdx), Seeed LeRobot repository +- [Cameras](https://huggingface.co/docs/lerobot/cameras), LeRobot docs From 9245573a99167d42856107c97377fa661c146709 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 12:52:57 -0500 Subject: [PATCH 36/60] Camera Setup: pick the USB camera's Id, not the laptop webcam's Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 5475415..3063d65 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -7,7 +7,7 @@ lerobot-find-cameras opencv ``` -Each camera's `Id` is its `index_or_path`. A test image from each camera is saved to `outputs/captured_images` in the current directory. +This lists every camera, including a laptop's built-in webcam. Each camera's `Id` is its `index_or_path`, and a test image from each is saved to `outputs/captured_images`. Open the images to see which `Id` is the USB camera on the robot, usually not `0`, and use that `Id` below. ## 2. Teleoperate with One Camera @@ -24,6 +24,8 @@ lerobot-teleoperate \ --display_data=true ``` +`index_or_path: 0` is the USB camera's `Id` from step 1. + ## 3. Teleoperate with Two Cameras ```bash From d169c4dae5ead93b3f214deda1e4d7509b65c64b Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:07:42 -0500 Subject: [PATCH 37/60] Agenda from Luma, and four tracks under it The agenda has the hackathon's schedule from its Luma page: Friday 6 PM setup for teams, Saturday 10 AM hacking, 4 PM open house and demos, 5 PM wrap. Under it, a Tracks list that unfolds per track: Sim to Real, Gravity Compensation, Object Tracking, 3D Modeling. Each is a Markdown file in content/tracks/ with a short brief, a list of starting resources, papers and practical tips, every link checked. page.yaml lists the files; the build renders them the way it renders tutorial steps. Co-Authored-By: Claude Fable 5.1 --- README.md | 5 ++++ content/data/page.yaml | 24 +++++++++++----- content/tracks/3d-modeling.md | 28 ++++++++++++++++++ content/tracks/gravity-compensation.md | 27 +++++++++++++++++ content/tracks/object-tracking.md | 28 ++++++++++++++++++ content/tracks/sim-to-real.md | 25 ++++++++++++++++ plugins/yaml_page.py | 32 +++++++++++++-------- theme/static/css/app.css | 40 ++++++++++++++++++++++++++ theme/templates/app_upcoming.html | 9 ++++++ 9 files changed, 199 insertions(+), 19 deletions(-) create mode 100644 content/tracks/3d-modeling.md create mode 100644 content/tracks/gravity-compensation.md create mode 100644 content/tracks/object-tracking.md create mode 100644 content/tracks/sim-to-real.md diff --git a/README.md b/README.md index 9a7819a..2346c48 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,11 @@ first heading is the step's title) and add the file's name to `steps:` in tab on the homepage, at `/#tutorial-`. Code blocks get a Copy button and `> [!CAUTION]` alerts become callouts, as on GitHub. +**Add a track.** Write it as a Markdown file in `content/tracks/` (its first +heading is the track's name) and add the file's name under `tracks:` in +`page.yaml`. It appears under the agenda on the homepage and unfolds when +tapped. + **Add a hackathon entry.** Add a block to `_projects.yaml` and put its media in `content/images/projects//`: `poster.jpg` (required) and `preview.mp4` (optional, a silent 6 to 8 second loop). The entry appears on diff --git a/content/data/page.yaml b/content/data/page.yaml index e0072b6..2687f1a 100644 --- a/content/data/page.yaml +++ b/content/data/page.yaml @@ -79,19 +79,29 @@ hardware: credit: "Image: Arducam, via Core Electronics" # ---- Agenda ----------------------------------------------------------------- -# PLACEHOLDER until the schedule is set. One row per item: +# From the event's Luma page (the Register link). One row per item: # when the time, in the left column # what what happens # note optional, a smaller line under it # Keep it to about four rows a day so the card fits a phone screen. -# For reference, the August 2026 hackathon ran: Friday 10:00 AM intro -# tutorial, 12:01 PM opening ceremony, 2:00 PM hacking begins, 10:00 PM -# hacking ends for the day; Saturday 10:00 AM doors open, 3:00 PM demos -# and judging, 4:15 PM awards, 5:00 PM wrap. agenda: - day: "Friday, Nov. 20" rows: - - { when: "TBA", what: "Full schedule coming soon" } + - { when: "6:00 PM", what: "Pre-hackathon setup", note: "Optional. Teams can come the night before to set up their arm." } - day: "Saturday, Nov. 21" rows: - - { when: "TBA", what: "Full schedule coming soon" } + - { when: "10:00 AM", what: "Hacking begins" } + - { when: "4:00 PM", what: "Open house and demos", note: "Teams show what they built. Open to everyone." } + - { when: "5:00 PM", what: "Wrap" } + +# ---- Tracks ----------------------------------------------------------------- +# Topics a team can pick, shown under the agenda. Each is a Markdown file in +# content/tracks/: its first heading is the track's name, and the rest is +# shown when the track is tapped. Links in it open in a new tab. +tracks: + title: "Tracks" + files: + - sim-to-real.md + - gravity-compensation.md + - object-tracking.md + - 3d-modeling.md diff --git a/content/tracks/3d-modeling.md b/content/tracks/3d-modeling.md new file mode 100644 index 0000000..00d33cd --- /dev/null +++ b/content/tracks/3d-modeling.md @@ -0,0 +1,28 @@ +# 3D Modeling + +Teach the arm to look at an object from enough viewpoints to build a good 3D model of it. Mount the camera on the wrist, drive the arm through poses around a small object, capture an image at each stop, and reconstruct. The arm's kinematics plus a one-time hand-eye calibration give the camera pose for every frame, which is what usually fails on small, low-texture objects. + +The smart part replaces a fixed orbit with next-best-view: after each batch, score candidate poses by how much unseen surface they would reveal, move to the best one, repeat. Compare against a fixed orbit with the same image budget. + +## Start here + +- [Nerfstudio](https://docs.nerf.studio/): nerfacto and splatfacto reconstruction from posed images. +- [COLMAP](https://colmap.github.io/): structure from motion and multi-view stereo, the classic photogrammetry pipeline. +- [Open3D reconstruction system](https://www.open3d.org/docs/latest/tutorial/reconstruction_system/index.html): fusing RGB-D frames from a RealSense. +- [pyrealsense2](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python): the RealSense Python wrapper. +- [Hand-eye calibration with OpenCV](https://roboflow.com/blog/hand-eye-calibration): finding the camera-to-gripper transform, step by step. +- [nbvplanner](https://github.com/ethz-asl/nbvplanner): a reference next-best-view planner. + +## Papers + +- [ActiveNeRF: Learning where to See with Uncertainty Estimation](https://arxiv.org/abs/2209.08546) (2022) +- [NeurAR: Neural Uncertainty for Autonomous 3D Reconstruction](https://arxiv.org/abs/2207.10985) (2022) +- [ActiveSplat: High-Fidelity Scene Reconstruction through Active Gaussian Splatting](https://arxiv.org/abs/2410.21955) (2024) +- [3D Gaussian Splatting for Real-Time Radiance Field Rendering](https://arxiv.org/abs/2308.04079) (2023) + +## Tips + +- One textured object about 10 cm across, 30 to 60 views, a hemisphere only. Day one: calibration, pose list, capture script, a first reconstruction. Day two: the next-best-view loop, a greedy voxel-coverage planner is enough. +- Stop the arm and wait half a second before each capture to avoid motion blur. Fix exposure and white balance. A wrong camera-to-gripper transform silently ruins everything, so validate it by reprojecting a checkerboard. The D405 is a near-range camera: keep it within about 7 to 50 cm. +- Check which poses the arm can actually reach before planning over them. +- Measure with a known object: surface coverage per image count, Chamfer distance to the true mesh, PSNR on held-out views. Plot next-best-view against the fixed orbit at equal image budgets. diff --git a/content/tracks/gravity-compensation.md b/content/tracks/gravity-compensation.md new file mode 100644 index 0000000..59a6647 --- /dev/null +++ b/content/tracks/gravity-compensation.md @@ -0,0 +1,27 @@ +# Gravity Compensation + +Make the arm weightless: each joint is commanded the torque that gravity exerts on the links beyond it, so the motors hold the arm's weight and a person moving it by hand feels only friction and inertia. The RobStride motors make this feasible. They are backdrivable and torque-controllable in MIT mode, where each command carries a position, a velocity, gains and a feed-forward torque. + +A weekend goal: compute the gravity torque from the arm's URDF with Pinocchio, send it as the feed-forward torque with near-zero gains, measure a per-joint scale and friction, tune, and demo a floating arm. Stretch: learn a residual torque model from logged pose and torque data, or build kinesthetic teaching on top, moving the arm by hand to record demonstrations. + +## Start here + +- [Seeed's gravity compensation demo](https://www.youtube.com/watch?v=qOhz4Im6hcM): what the finished thing looks like. +- [gravity.py in Seeed's LeRobot plugin](https://github.com/Seeed-Projects/lerobot-robot-seeed-b601/blob/main/lerobot_robot_seeed_b601/gravity.py): a working gravity feed-forward from the URDF, wired into the MIT command. The tutorial's install step puts this plugin in your environment. Its [URDF](https://github.com/Seeed-Projects/lerobot-robot-seeed-b601/blob/main/lerobot_robot_seeed_b601/assets/00-arm-rs_asm-v3.urdf) is the mass model. +- [Seeed's Pinocchio guide](https://wiki.seeedstudio.com/rebot_arm_b601_rs_pinocchio_meshcat/): computing the gravity torque and sending it, with the gains Seeed uses. +- [Seeed's RS identification write-up](https://github.com/Seeed-Projects/reBotArm_control_py/blob/main/docs/gravity_calibration_rs_2026-07-17.md): measured scale factors, friction and pitfalls on this exact arm, with the [measurement harness](https://github.com/Seeed-Projects/reBotArm_control_py/blob/main/tools/gravity_calibration/README.md). +- [RobStride motor control](https://wiki.seeedstudio.com/robstride_control/): MIT mode, gain ranges per motor, CAN IDs, error codes. +- [Pinocchio inverse dynamics example](https://github.com/stack-of-tasks/pinocchio/blob/master/examples/inverse-dynamics.py): gravity torque from a URDF in a few lines. + +## References + +- [Dynamic identification of the Franka Emika Panda robot with retrieval of feasible parameters](https://iris.uniroma1.it/bitstream/11573/1356777/2/Gaz_Postprint_Dynamic-Identification_2019.pdf) (Gaz et al., 2019): identifying masses and friction from data. +- [Zero-force drag and start-up torque compensation strategies for robots](https://www.cambridge.org/core/journals/robotica/article/zeroforce-drag-and-startup-torque-compensation-strategies-for-robots/66BBC748206D3F79F3E8BD4C51147E7B) (Li et al., 2025): gravity plus friction from joint currents. +- [Modern Robotics](https://hades.mech.northwestern.edu/index.php/Modern_Robotics), chapter 8, Dynamics of Open Chains: the theory, free. + +## Tips + +- Joints 2 and 3 carry nearly all the gravity load; the wrist's gravity torque is below its friction. Start one joint at a time, fit a scale and a friction term per joint, then add a small gain or a friction term to cover the floor of a few tenths of a newton-metre. +- Identify from poses with clearance; contact with the table or another link produces convincing fake fits. Compute velocity by differencing positions. Log motor temperature: holding torque heats the wrist motors. +- Never cut torque on a raised arm, it falls. Ramp the feed-forward in over a second or two, abort into a position hold, clamp the torque to a fraction of peak, and keep the workspace clear. +- Measure the holding error per joint across poses, and how much force it takes to move the arm by hand, before and after. diff --git a/content/tracks/object-tracking.md b/content/tracks/object-tracking.md new file mode 100644 index 0000000..1402a55 --- /dev/null +++ b/content/tracks/object-tracking.md @@ -0,0 +1,28 @@ +# Object Tracking + +Detect an object in the camera and make the arm follow it: keep it centred in the image, then reach to it. The simplest loop skips camera-to-robot calibration altogether. Measure the pixel error between the object and the image centre, turn it into small joint increments (base yaw from the x error, shoulder or wrist pitch from the y error), and send them at 10 to 30 Hz with a low gain and a dead band. + +A weekend plan: day one, frames from the camera and a detector, then the centring loop. Day two, a fixed-camera variant where a marker pose or RealSense depth gives a 3D target. Stretch: reach and grasp, which needs eye-in-hand calibration. + +## Start here + +- [Ultralytics YOLO, tracking mode](https://docs.ultralytics.com/modes/track/): detection with persistent object IDs, a few lines of Python. +- [OpenCV ArUco detection](https://github.com/opencv/opencv/blob/4.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown): a printed marker gives a full 3D pose with no training. The safest starting point. +- [SAM 2](https://github.com/facebookresearch/sam2): click an object once and its video predictor tracks the mask through frames. +- [Grounding DINO](https://github.com/IDEA-Research/GroundingDINO): detect "red cup" from a text prompt. +- [ViSP image-based visual servoing](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-ibvs.html) and [eye-in-hand calibration](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-calibration-extrinsic-eye-in-hand.html): the theory and a library, for the reach-to-it stretch. +- [LeRobot cameras](https://huggingface.co/docs/lerobot/cameras): reading frames, `read_latest`, RealSense depth. +- [RebotB601Follower](https://github.com/Seeed-Projects/lerobot/blob/main/src/lerobot/robots/rebot_b601_follower/rebot_b601_follower.py): `get_observation()` and `send_action()` with per-joint position targets, clipped by `max_relative_target` and the soft joint limits. + +## Papers + +- [SAM 2: Segment Anything in Images and Videos](https://arxiv.org/abs/2408.00714) (Ravi et al., 2024) +- [Grounding DINO](https://arxiv.org/abs/2303.05499) (Liu et al., 2023): open-set object detection from text. +- [ViT-VS](https://arxiv.org/abs/2503.04545) (Scherl et al., 2025): visual servoing on pretrained vision transformer features. + +## Tips + +- "Keep the object centred" is a complete demo; "reach to it" is the stretch. Use a bright, distinct object, with a colour threshold as the fallback if the detector fails. +- Detector time plus camera buffering is often 100 ms or more. Servo on the newest frame with `read_latest`, run the detector at 640 by 480 or smaller, smooth the target with a moving average, and cap the per-step joint change with `max_relative_target` so one bad detection cannot throw the arm. +- Keep the soft joint limits on and Ctrl-C ready. Start with the gripper and wrist away from the table. +- Measure pixel error over time, settling time after moving the object, and the loop rate in Hz. Those three make a convincing final plot. diff --git a/content/tracks/sim-to-real.md b/content/tracks/sim-to-real.md new file mode 100644 index 0000000..4760058 --- /dev/null +++ b/content/tracks/sim-to-real.md @@ -0,0 +1,25 @@ +# Sim to Real + +Teleoperate the reBot arm inside Isaac Sim, record LeRobot datasets there, train an imitation policy, then run it on the real arm with the real cameras. Sim data is cheap and unlimited; the question is whether the policy survives the gap in visuals, dynamics and calibration. + +A weekend goal: one simple pick-and-place, 50 to 100 sim episodes with domain randomization, an ACT policy that works in sim, then a measured success rate on the real arm. Stretch: co-train with 10 to 20 real episodes and compare. + +## Start here + +- [rebot-arm-dli-isaacsim](https://github.com/Seeed-Projects/rebot-arm-dli-isaacsim): Seeed's Isaac Sim project for this arm. Leader-arm teleop of the simulated arm, LeRobot dataset recording, domain randomization of object pose, mass and lighting. See the Sim to Real tutorial step. +- [Train an SO-101 Robot From Sim-to-Real With NVIDIA Isaac](https://docs.nvidia.com/learning/physical-ai/sim-to-real-so-101/latest/): NVIDIA's free course. Sim data collection, domain randomization, co-training with real data, measuring the actuation gap. The steps map closely to the reBot workflow. +- [Sim-to-Real-SO-101-Workshop](https://github.com/isaac-sim/Sim-to-Real-SO-101-Workshop): the course's code, with evaluation scripts worth copying. +- [LeRobot: ACT](https://huggingface.co/docs/lerobot/act): training and deploying ACT on a real follower arm. +- [LeRobot: imitation learning in sim](https://huggingface.co/docs/lerobot/main/en/il_sim): the record, train, evaluate loop in MuJoCo, if Isaac Sim is too heavy for your machine. + +## Papers + +- [Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware](https://arxiv.org/abs/2304.13705) (Zhao et al., 2023): introduces ACT. 50 demonstrations can be enough for contact-rich tasks. +- [Diffusion Policy](https://arxiv.org/abs/2303.04137) (Chi et al., 2023): the main alternative to ACT in LeRobot. Handles demonstrations that solve the task in several different ways. +- [Domain Randomization for Transferring Deep Neural Networks from Simulation to the Real World](https://arxiv.org/abs/1703.06907) (Tobin et al., 2017): why randomizing textures, lighting and camera pose makes a sim-trained vision model transfer. + +## Tips + +- One task, one object, a fixed start region. Match the real scene to the sim scene first: same camera placement and resolution, same table colour. +- Before training, check that joint order, units and calibration agree between the sim dataset and the real arm: replay a sim episode on the real arm with `lerobot-replay`. +- Measure success rate over 10 to 20 real trials per policy, the sim success rate of the same checkpoint, and the per-joint error when replaying a sim trajectory on the real arm. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 8886efe..fc0b744 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -161,18 +161,7 @@ def entries(files): groups.append({"title": "", "entries": entries([item])}) names = [f for g in groups for e in g["entries"] for f in e] - def read(name): - path = os.path.join(docs_dir, name) - if not os.path.exists(path): - log.error("_tutorial.yaml lists %s, but there is no such file in %s", name, docs_dir) - return None - with open(path, encoding="utf-8") as fh: - text = fh.read() - heading = re.match(r"\s*#\s+(.+?)\s*\n", text) - title = heading.group(1).strip() if heading else os.path.splitext(name)[0].replace("-", " ").title() - body = text[heading.end():] if heading else text - slug = os.path.splitext(name)[0] - return {"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)} + read = lambda name: self._read_doc(docs_dir, name, "_tutorial.yaml") # noqa: E731 steps = [s for s in (read(n) for n in names) if s] by_file = {s["file"]: s for s in steps} @@ -205,6 +194,21 @@ def read(name): step["next"] = steps[i + 1] if i + 1 < total else None data["steps_data"] = steps + def _read_doc(self, folder, name, listed_in): + """A Markdown file as a page: its first heading is the title, the rest + is rendered. None, with an error logged, if the file is missing.""" + path = os.path.join(folder, name) + if not os.path.exists(path): + log.error("%s lists %s, but there is no such file in %s", listed_in, name, folder) + return None + with open(path, encoding="utf-8") as fh: + text = fh.read() + heading = re.match(r"\s*#\s+(.+?)\s*\n", text) + slug = os.path.splitext(name)[0] + title = heading.group(1).strip() if heading else slug.replace("-", " ").title() + body = text[heading.end():] if heading else text + return {"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)} + @staticmethod def _render_markdown(text): """Markdown to HTML, the way GitHub shows it: fenced code blocks (each @@ -258,6 +262,10 @@ def _prepare_app_page(self, data, raw): if layout == "upcoming": for item in (data.get("hardware") or {}).get("items") or []: self._add_youtube(item) + # The tracks under the agenda: Markdown files in content/tracks/. + tracks_dir = os.path.join(self.path, "tracks") + files = (data.get("tracks") or {}).get("files") or [] + data["tracks_data"] = [t for t in (self._read_doc(tracks_dir, str(f), "page.yaml") for f in files) if t] elif layout == "previous": photos = data.get("photos") or {} if photos.get("folder"): diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 98618e6..2038199 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -558,6 +558,46 @@ textarea { } +/* Tracks under the agenda: one line each, unfolding to its notes. */ +.tracks { + justify-self: stretch; +} +.track { + border-bottom: 1px solid var(--ink); +} +.track summary { + display: flex; + align-items: center; + gap: 10px; + min-height: 48px; + padding: 6px 0; + font-weight: 700; + cursor: pointer; + list-style: none; +} +.track summary::-webkit-details-marker { + display: none; +} +.track summary::before { + content: "+"; + flex: none; + width: 18px; + font: 400 24px/1 var(--f-mast); +} +.track[open] summary::before { + content: "\2212"; +} +.track .md { + padding: 2px 0 16px 28px; + font-size: 14.5px; +} +.track .md h2 { + margin-top: 6px; + padding-top: 0; + border-top: 0; + font: 700 12px/1.3 var(--f-type); + letter-spacing: 0.06em; +} .dash { justify-self: stretch; display: grid; diff --git a/theme/templates/app_upcoming.html b/theme/templates/app_upcoming.html index 7f5e14a..03efdac 100644 --- a/theme/templates/app_upcoming.html +++ b/theme/templates/app_upcoming.html @@ -74,6 +74,15 @@

        Agenda

        {% if place %}

        Meet @ {{ ui.map_link(place.map, place.map.title, place.map.title ~ ': open the map') }}

        {% endif %}
        {{ ui.agenda(page.agenda) }} + {% if page.tracks_data %} +
        +

        {{ (page.tracks.title or 'Tracks')|e }}

        + {% for t in page.tracks_data %} + {# Built from the Markdown file, so not escaped here. #} +
        {{ t.title|e }}
        {{ t.html }}
        + {% endfor %} +
        + {% endif %}
      From 6027a27e9c445097619a9d8ab45c4b2d2dddd3cd Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:12:27 -0500 Subject: [PATCH 38/60] Tracks: an overview, links and videos each Co-Authored-By: Claude Fable 5.1 --- content/tracks/3d-modeling.md | 32 ++++++++----------------- content/tracks/gravity-compensation.md | 32 +++++++++---------------- content/tracks/object-tracking.md | 33 +++++++++----------------- content/tracks/sim-to-real.md | 29 ++++++++-------------- 4 files changed, 42 insertions(+), 84 deletions(-) diff --git a/content/tracks/3d-modeling.md b/content/tracks/3d-modeling.md index 00d33cd..4d02f5f 100644 --- a/content/tracks/3d-modeling.md +++ b/content/tracks/3d-modeling.md @@ -1,28 +1,16 @@ # 3D Modeling -Teach the arm to look at an object from enough viewpoints to build a good 3D model of it. Mount the camera on the wrist, drive the arm through poses around a small object, capture an image at each stop, and reconstruct. The arm's kinematics plus a one-time hand-eye calibration give the camera pose for every frame, which is what usually fails on small, low-texture objects. +Move a wrist camera around an object, reconstruct it, and pick each next viewpoint by what is still unseen instead of following a fixed orbit. The arm's kinematics give the camera pose for every frame. -The smart part replaces a fixed orbit with next-best-view: after each batch, score candidate poses by how much unseen surface they would reveal, move to the best one, repeat. Compare against a fixed orbit with the same image budget. +## Links -## Start here +- [Nerfstudio](https://docs.nerf.studio/): reconstruction from posed images, NeRF or Gaussian splats. +- [COLMAP](https://colmap.github.io/): classic photogrammetry. +- [Open3D reconstruction system](https://www.open3d.org/docs/latest/tutorial/reconstruction_system/index.html): fusing RealSense depth frames. +- [Hand-eye calibration with OpenCV](https://roboflow.com/blog/hand-eye-calibration): the camera-to-gripper transform. +- [nbvplanner](https://github.com/ethz-asl/nbvplanner): a reference next-best-view planner, and the papers [ActiveNeRF](https://arxiv.org/abs/2209.08546) and [ActiveSplat](https://arxiv.org/abs/2410.21955). -- [Nerfstudio](https://docs.nerf.studio/): nerfacto and splatfacto reconstruction from posed images. -- [COLMAP](https://colmap.github.io/): structure from motion and multi-view stereo, the classic photogrammetry pipeline. -- [Open3D reconstruction system](https://www.open3d.org/docs/latest/tutorial/reconstruction_system/index.html): fusing RGB-D frames from a RealSense. -- [pyrealsense2](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python): the RealSense Python wrapper. -- [Hand-eye calibration with OpenCV](https://roboflow.com/blog/hand-eye-calibration): finding the camera-to-gripper transform, step by step. -- [nbvplanner](https://github.com/ethz-asl/nbvplanner): a reference next-best-view planner. +## Videos -## Papers - -- [ActiveNeRF: Learning where to See with Uncertainty Estimation](https://arxiv.org/abs/2209.08546) (2022) -- [NeurAR: Neural Uncertainty for Autonomous 3D Reconstruction](https://arxiv.org/abs/2207.10985) (2022) -- [ActiveSplat: High-Fidelity Scene Reconstruction through Active Gaussian Splatting](https://arxiv.org/abs/2410.21955) (2024) -- [3D Gaussian Splatting for Real-Time Radiance Field Rendering](https://arxiv.org/abs/2308.04079) (2023) - -## Tips - -- One textured object about 10 cm across, 30 to 60 views, a hemisphere only. Day one: calibration, pose list, capture script, a first reconstruction. Day two: the next-best-view loop, a greedy voxel-coverage planner is enough. -- Stop the arm and wait half a second before each capture to avoid motion blur. Fix exposure and white balance. A wrong camera-to-gripper transform silently ruins everything, so validate it by reprojecting a checkerboard. The D405 is a near-range camera: keep it within about 7 to 50 cm. -- Check which poses the arm can actually reach before planning over them. -- Measure with a known object: surface coverage per image count, Chamfer distance to the true mesh, PSNR on held-out views. Plot next-best-view against the fixed orbit at equal image budgets. +- [How to create Gaussian splats with Nerfstudio](https://www.youtube.com/watch?v=LhAa1B9CFeY): from images to a splat. +- [Gaussian splatting tutorial](https://www.youtube.com/watch?v=08NYHDwOqow): how a scene is captured. diff --git a/content/tracks/gravity-compensation.md b/content/tracks/gravity-compensation.md index 59a6647..5bedd96 100644 --- a/content/tracks/gravity-compensation.md +++ b/content/tracks/gravity-compensation.md @@ -1,27 +1,17 @@ # Gravity Compensation -Make the arm weightless: each joint is commanded the torque that gravity exerts on the links beyond it, so the motors hold the arm's weight and a person moving it by hand feels only friction and inertia. The RobStride motors make this feasible. They are backdrivable and torque-controllable in MIT mode, where each command carries a position, a velocity, gains and a feed-forward torque. +Command each joint the torque that gravity puts on it, so the arm floats and can be moved by hand. The RobStride motors take a feed-forward torque in MIT mode, which makes this possible. -A weekend goal: compute the gravity torque from the arm's URDF with Pinocchio, send it as the feed-forward torque with near-zero gains, measure a per-joint scale and friction, tune, and demo a floating arm. Stretch: learn a residual torque model from logged pose and torque data, or build kinesthetic teaching on top, moving the arm by hand to record demonstrations. +## Links -## Start here +- [gravity.py in Seeed's LeRobot plugin](https://github.com/Seeed-Projects/lerobot-robot-seeed-b601/blob/main/lerobot_robot_seeed_b601/gravity.py): a working gravity feed-forward from the arm's [URDF](https://github.com/Seeed-Projects/lerobot-robot-seeed-b601/blob/main/lerobot_robot_seeed_b601/assets/00-arm-rs_asm-v3.urdf). The install step puts this plugin in your environment. +- [Seeed's Pinocchio guide](https://wiki.seeedstudio.com/rebot_arm_b601_rs_pinocchio_meshcat/): computing and sending the gravity torque. +- [Seeed's identification write-up](https://github.com/Seeed-Projects/reBotArm_control_py/blob/main/docs/gravity_calibration_rs_2026-07-17.md): measured scale and friction on this exact arm. +- [RobStride motor control](https://wiki.seeedstudio.com/robstride_control/): MIT mode, gain ranges, CAN IDs. +- [Modern Robotics](https://hades.mech.northwestern.edu/index.php/Modern_Robotics), chapter 8: the theory, free. -- [Seeed's gravity compensation demo](https://www.youtube.com/watch?v=qOhz4Im6hcM): what the finished thing looks like. -- [gravity.py in Seeed's LeRobot plugin](https://github.com/Seeed-Projects/lerobot-robot-seeed-b601/blob/main/lerobot_robot_seeed_b601/gravity.py): a working gravity feed-forward from the URDF, wired into the MIT command. The tutorial's install step puts this plugin in your environment. Its [URDF](https://github.com/Seeed-Projects/lerobot-robot-seeed-b601/blob/main/lerobot_robot_seeed_b601/assets/00-arm-rs_asm-v3.urdf) is the mass model. -- [Seeed's Pinocchio guide](https://wiki.seeedstudio.com/rebot_arm_b601_rs_pinocchio_meshcat/): computing the gravity torque and sending it, with the gains Seeed uses. -- [Seeed's RS identification write-up](https://github.com/Seeed-Projects/reBotArm_control_py/blob/main/docs/gravity_calibration_rs_2026-07-17.md): measured scale factors, friction and pitfalls on this exact arm, with the [measurement harness](https://github.com/Seeed-Projects/reBotArm_control_py/blob/main/tools/gravity_calibration/README.md). -- [RobStride motor control](https://wiki.seeedstudio.com/robstride_control/): MIT mode, gain ranges per motor, CAN IDs, error codes. -- [Pinocchio inverse dynamics example](https://github.com/stack-of-tasks/pinocchio/blob/master/examples/inverse-dynamics.py): gravity torque from a URDF in a few lines. +## Videos -## References - -- [Dynamic identification of the Franka Emika Panda robot with retrieval of feasible parameters](https://iris.uniroma1.it/bitstream/11573/1356777/2/Gaz_Postprint_Dynamic-Identification_2019.pdf) (Gaz et al., 2019): identifying masses and friction from data. -- [Zero-force drag and start-up torque compensation strategies for robots](https://www.cambridge.org/core/journals/robotica/article/zeroforce-drag-and-startup-torque-compensation-strategies-for-robots/66BBC748206D3F79F3E8BD4C51147E7B) (Li et al., 2025): gravity plus friction from joint currents. -- [Modern Robotics](https://hades.mech.northwestern.edu/index.php/Modern_Robotics), chapter 8, Dynamics of Open Chains: the theory, free. - -## Tips - -- Joints 2 and 3 carry nearly all the gravity load; the wrist's gravity torque is below its friction. Start one joint at a time, fit a scale and a friction term per joint, then add a small gain or a friction term to cover the floor of a few tenths of a newton-metre. -- Identify from poses with clearance; contact with the table or another link produces convincing fake fits. Compute velocity by differencing positions. Log motor temperature: holding torque heats the wrist motors. -- Never cut torque on a raised arm, it falls. Ramp the feed-forward in over a second or two, abort into a position hold, clamp the torque to a fraction of peak, and keep the workspace clear. -- Measure the holding error per joint across poses, and how much force it takes to move the arm by hand, before and after. +- [reBot Arm B601-RS gravity compensation](https://www.youtube.com/watch?v=qOhz4Im6hcM): Seeed's demo on this arm. +- [GLUON robotic arm gravity compensation](https://www.youtube.com/watch?v=hVikkLC9sb0): the same effect on another arm. +- [S-drive gravity compensation mode](https://www.youtube.com/watch?v=TITTxwZSgXE): a minimal arm, the same idea. diff --git a/content/tracks/object-tracking.md b/content/tracks/object-tracking.md index 1402a55..47da81b 100644 --- a/content/tracks/object-tracking.md +++ b/content/tracks/object-tracking.md @@ -1,28 +1,17 @@ # Object Tracking -Detect an object in the camera and make the arm follow it: keep it centred in the image, then reach to it. The simplest loop skips camera-to-robot calibration altogether. Measure the pixel error between the object and the image centre, turn it into small joint increments (base yaw from the x error, shoulder or wrist pitch from the y error), and send them at 10 to 30 Hz with a low gain and a dead band. +Detect an object in the camera and move the arm to keep it centred, then reach to it. The simplest loop turns the object's pixel error into small joint moves, with no camera calibration. -A weekend plan: day one, frames from the camera and a detector, then the centring loop. Day two, a fixed-camera variant where a marker pose or RealSense depth gives a 3D target. Stretch: reach and grasp, which needs eye-in-hand calibration. +## Links -## Start here +- [Ultralytics YOLO, tracking mode](https://docs.ultralytics.com/modes/track/): detection with persistent IDs. +- [OpenCV ArUco](https://github.com/opencv/opencv/blob/4.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown): a printed marker gives a 3D pose with no training. +- [SAM 2](https://github.com/facebookresearch/sam2) and [Grounding DINO](https://github.com/IDEA-Research/GroundingDINO): track a clicked object, or detect one from a text prompt. +- [ViSP visual servoing tutorial](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-ibvs.html): the theory, for reaching to the object. +- [RebotB601Follower](https://github.com/Seeed-Projects/lerobot/blob/main/src/lerobot/robots/rebot_b601_follower/rebot_b601_follower.py): sending joint targets from Python. -- [Ultralytics YOLO, tracking mode](https://docs.ultralytics.com/modes/track/): detection with persistent object IDs, a few lines of Python. -- [OpenCV ArUco detection](https://github.com/opencv/opencv/blob/4.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown): a printed marker gives a full 3D pose with no training. The safest starting point. -- [SAM 2](https://github.com/facebookresearch/sam2): click an object once and its video predictor tracks the mask through frames. -- [Grounding DINO](https://github.com/IDEA-Research/GroundingDINO): detect "red cup" from a text prompt. -- [ViSP image-based visual servoing](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-ibvs.html) and [eye-in-hand calibration](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-calibration-extrinsic-eye-in-hand.html): the theory and a library, for the reach-to-it stretch. -- [LeRobot cameras](https://huggingface.co/docs/lerobot/cameras): reading frames, `read_latest`, RealSense depth. -- [RebotB601Follower](https://github.com/Seeed-Projects/lerobot/blob/main/src/lerobot/robots/rebot_b601_follower/rebot_b601_follower.py): `get_observation()` and `send_action()` with per-joint position targets, clipped by `max_relative_target` and the soft joint limits. +## Videos -## Papers - -- [SAM 2: Segment Anything in Images and Videos](https://arxiv.org/abs/2408.00714) (Ravi et al., 2024) -- [Grounding DINO](https://arxiv.org/abs/2303.05499) (Liu et al., 2023): open-set object detection from text. -- [ViT-VS](https://arxiv.org/abs/2503.04545) (Scherl et al., 2025): visual servoing on pretrained vision transformer features. - -## Tips - -- "Keep the object centred" is a complete demo; "reach to it" is the stretch. Use a bright, distinct object, with a colour threshold as the fallback if the detector fails. -- Detector time plus camera buffering is often 100 ms or more. Servo on the newest frame with `read_latest`, run the detector at 640 by 480 or smaller, smooth the target with a moving average, and cap the per-step joint change with `max_relative_target` so one bad detection cannot throw the arm. -- Keep the soft joint limits on and Ctrl-C ready. Start with the gripper and wrist away from the table. -- Measure pixel error over time, settling time after moving the object, and the loop rate in Hz. Those three make a convincing final plot. +- [Braccio arm pickup with OpenCV object detection](https://www.youtube.com/watch?v=y_R0t8rGT8o): detect, then reach. +- [Robot head tracking a ball with OpenCV](https://www.youtube.com/watch?v=gsktsIc4Fjs): the centring loop, with a colour detector. +- [Shadow Robot visual servoing](https://www.youtube.com/watch?v=CQOnBJyfvr8): a simulated arm following a real object. diff --git a/content/tracks/sim-to-real.md b/content/tracks/sim-to-real.md index 4760058..4d6193f 100644 --- a/content/tracks/sim-to-real.md +++ b/content/tracks/sim-to-real.md @@ -1,25 +1,16 @@ # Sim to Real -Teleoperate the reBot arm inside Isaac Sim, record LeRobot datasets there, train an imitation policy, then run it on the real arm with the real cameras. Sim data is cheap and unlimited; the question is whether the policy survives the gap in visuals, dynamics and calibration. +Teleoperate a simulated reBot arm in Isaac Sim, record datasets there, train a policy on them, then run it on the real arm. -A weekend goal: one simple pick-and-place, 50 to 100 sim episodes with domain randomization, an ACT policy that works in sim, then a measured success rate on the real arm. Stretch: co-train with 10 to 20 real episodes and compare. +## Links -## Start here +- [rebot-arm-dli-isaacsim](https://github.com/Seeed-Projects/rebot-arm-dli-isaacsim): Seeed's Isaac Sim project for this arm. See the Sim to Real tutorial step. +- [Train an SO-101 Robot From Sim-to-Real With NVIDIA Isaac](https://docs.nvidia.com/learning/physical-ai/sim-to-real-so-101/latest/): NVIDIA's free course, with its [workshop code](https://github.com/isaac-sim/Sim-to-Real-SO-101-Workshop). +- [LeRobot: ACT](https://huggingface.co/docs/lerobot/act): training and running the policy on the real arm. +- [ACT paper](https://arxiv.org/abs/2304.13705) and [domain randomization paper](https://arxiv.org/abs/1703.06907). -- [rebot-arm-dli-isaacsim](https://github.com/Seeed-Projects/rebot-arm-dli-isaacsim): Seeed's Isaac Sim project for this arm. Leader-arm teleop of the simulated arm, LeRobot dataset recording, domain randomization of object pose, mass and lighting. See the Sim to Real tutorial step. -- [Train an SO-101 Robot From Sim-to-Real With NVIDIA Isaac](https://docs.nvidia.com/learning/physical-ai/sim-to-real-so-101/latest/): NVIDIA's free course. Sim data collection, domain randomization, co-training with real data, measuring the actuation gap. The steps map closely to the reBot workflow. -- [Sim-to-Real-SO-101-Workshop](https://github.com/isaac-sim/Sim-to-Real-SO-101-Workshop): the course's code, with evaluation scripts worth copying. -- [LeRobot: ACT](https://huggingface.co/docs/lerobot/act): training and deploying ACT on a real follower arm. -- [LeRobot: imitation learning in sim](https://huggingface.co/docs/lerobot/main/en/il_sim): the record, train, evaluate loop in MuJoCo, if Isaac Sim is too heavy for your machine. +## Videos -## Papers - -- [Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware](https://arxiv.org/abs/2304.13705) (Zhao et al., 2023): introduces ACT. 50 demonstrations can be enough for contact-rich tasks. -- [Diffusion Policy](https://arxiv.org/abs/2303.04137) (Chi et al., 2023): the main alternative to ACT in LeRobot. Handles demonstrations that solve the task in several different ways. -- [Domain Randomization for Transferring Deep Neural Networks from Simulation to the Real World](https://arxiv.org/abs/1703.06907) (Tobin et al., 2017): why randomizing textures, lighting and camera pose makes a sim-trained vision model transfer. - -## Tips - -- One task, one object, a fixed start region. Match the real scene to the sim scene first: same camera placement and resolution, same table colour. -- Before training, check that joint order, units and calibration agree between the sim dataset and the real arm: replay a sim episode on the real arm with `lerobot-replay`. -- Measure success rate over 10 to 20 real trials per policy, the sim success rate of the same checkpoint, and the per-joint error when replaying a sim trajectory on the real arm. +- [Train an SO-101 Robot From Sim-to-Real](https://www.youtube.com/playlist?list=PL2bKqBZg-pzVQspO8-wieuIFctBdz_Tr_): the NVIDIA course, as a playlist. +- [From Zero to Teleop: LeRobot SO-101 + Isaac Sim](https://www.youtube.com/watch?v=mQ7O73dEDcU): step by step to a pick-and-place in sim. +- [Dual xArm imitation learning with LeRobot ACT](https://www.youtube.com/watch?v=wBwZH6POk38): what a trained ACT policy looks like on real arms. From dd42f8f61622c7cce89f873ba7b4c933c0353467 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:19:17 -0500 Subject: [PATCH 39/60] Camera Setup: editable commands, settings shared and remembered A fence written as { .bash .edit } renders as an editable code block with an Editable tag beside its Copy button; Copy takes what is there now. The two camera commands use it, with the edits to make (the camera Id, an optional rotation) as comment lines at the top. A camera's Id or rotation typed into one block carries over to every other command that names that camera, in the dataset and training steps too, and is kept in the browser for the next visit. Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 11 ++++---- plugins/yaml_page.py | 12 +++++++-- theme/static/css/app.css | 26 ++++++++++++++++++ theme/static/js/app.js | 57 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 97 insertions(+), 9 deletions(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 3063d65..8033906 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -7,11 +7,13 @@ lerobot-find-cameras opencv ``` -This lists every camera, including a laptop's built-in webcam. Each camera's `Id` is its `index_or_path`, and a test image from each is saved to `outputs/captured_images`. Open the images to see which `Id` is the USB camera on the robot, usually not `0`, and use that `Id` below. +This lists every camera, including a laptop's built-in webcam, and saves a test image from each to `outputs/captured_images`. Open the images to see which `Id` is the USB camera on the robot. ## 2. Teleoperate with One Camera -```bash +```{ .bash .edit } +# Edit here: index_or_path is the camera's Id from step 1. +# Image upside down: add rotation: 180 after fourcc: MJPG. lerobot-teleoperate \ --robot.type=rebot_b601_follower \ --robot.motor_family=rs \ @@ -24,11 +26,10 @@ lerobot-teleoperate \ --display_data=true ``` -`index_or_path: 0` is the USB camera's `Id` from step 1. - ## 3. Teleoperate with Two Cameras -```bash +```{ .bash .edit } +# Edit here: one index_or_path per camera, from step 1. lerobot-teleoperate \ --robot.type=rebot_b601_follower \ --robot.motor_family=rs \ diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index fc0b744..be638bb 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -221,10 +221,18 @@ def alert(match): return f'
      {kind.capitalize()}{body}
      \n' text = ALERT.sub(alert, text + "\n") - html = markdown.markdown(text, extensions=["fenced_code", "sane_lists", "tables"]) + html = markdown.markdown(text, extensions=["fenced_code", "sane_lists", "tables", "attr_list"]) # Links to other sites open in a new tab, as everywhere on the site. html = re.sub(r'', r'', html) - # Every code block gets a Copy button, wired up by app.js. + # Every code block gets a Copy button, wired up by app.js. A fence + # written as ```{ .bash .edit } can be typed into, and Copy copies + # what is there now. + html = re.sub( + r'
      ]*)>(.*?)
      ', + r'
      Editable
      \2
      ', + html, + flags=re.S, + ) return re.sub( r"
      (.*?)
      ", r'
      \1
      ', diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 2038199..67508f1 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1399,6 +1399,29 @@ textarea { background: none; font: inherit; } +/* An editable block: a bar with the Editable tag and the Copy button. */ +.code .cbar { + order: 1; + display: flex; + justify-content: space-between; + align-items: center; + margin: -2px -2px 0 -2px; +} +.code .edit-tag { + padding-left: 14px; + font-size: 11px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.06em; + color: var(--mute); +} +.code.editable:focus-within { + box-shadow: 3px 3px 0 var(--hi); +} +.code.editable code { + outline: none; + cursor: text; +} .code .copy { order: 1; align-self: flex-end; @@ -1407,6 +1430,9 @@ textarea { padding: 2px 8px; font-size: 11px; } +.code .cbar .copy { + margin: 0; +} /* A "> [!CAUTION]" alert from the Markdown. */ .callout { justify-self: stretch; diff --git a/theme/static/js/app.js b/theme/static/js/app.js index 7bd2f80..b62e731 100644 --- a/theme/static/js/app.js +++ b/theme/static/js/app.js @@ -373,7 +373,7 @@ if (clips.length && !reducedMotion) { for (const button of $$('[data-copy]')) { button.addEventListener('click', async () => { const label = button.textContent; - const code = button.parentElement.querySelector('code'); + const code = (button.closest('.code') || button.parentElement).querySelector('code'); try { await navigator.clipboard.writeText(button.dataset.copy || code?.textContent || ''); button.textContent = 'Copied'; @@ -399,6 +399,59 @@ function syncBack() { for (const back of $$('[data-back]')) back.setAttribute('aria-disabled', String(onHome && !canGoBack())); } +// Camera settings in the tutorial's commands. Each camera is written as +// `front: {type: opencv, index_or_path: 0, ...}`. What is typed into an +// editable block (the camera's Id, a rotation) carries over to every other +// command that names the same camera, and is kept for the next visit. +const CAMERA = /\b(front|side)\s*:\s*\{([^}]*)\}/g; +const FIELD = (name) => new RegExp(`${name}:\\s*([^,}\\s]+)`); +const camBlocks = $$('.code code').filter((code) => CAMERA.test(code.textContent) && !CAMERA.test('')); +if (camBlocks.length) { + const KEY = 'tutorial-cameras'; + const readCameras = (text) => { + const out = {}; + for (const [, name, body] of text.matchAll(CAMERA)) { + out[name] = { index: FIELD('index_or_path').exec(body)?.[1], rotation: FIELD('rotation').exec(body)?.[1] }; + } + return out; + }; + const applyCameras = (text, cams) => + text.replace(CAMERA, (all, name, body) => { + const cam = cams[name]; + if (!cam) return all; + let b = body; + if (cam.index !== undefined) b = b.replace(FIELD('index_or_path'), `index_or_path: ${cam.index}`); + if (cam.rotation !== undefined) { + b = FIELD('rotation').test(b) ? b.replace(FIELD('rotation'), `rotation: ${cam.rotation}`) : b.replace(/\s*$/, `, rotation: ${cam.rotation}`); + } else { + b = b.replace(/,\s*rotation:\s*[^,}\s]+/, ''); + } + return `${name}: {${b}}`; + }); + let cams = {}; + try { cams = JSON.parse(localStorage.getItem(KEY)) || {}; } catch {} + const spread = (from) => { + for (const code of camBlocks) { + if (code === from) continue; + const next = applyCameras(code.textContent, cams); + if (next !== code.textContent) code.textContent = next; + } + }; + if (Object.keys(cams).length) spread(null); + let pending = 0; + for (const code of camBlocks) { + if (!code.isContentEditable) continue; + code.addEventListener('input', () => { + clearTimeout(pending); + pending = setTimeout(() => { + cams = { ...cams, ...readCameras(code.textContent) }; + try { localStorage.setItem(KEY, JSON.stringify(cams)); } catch {} + spread(code); + }, 400); + }); + } +} + // ---- 7. Tutorial ------------------------------------------------------------ // The Tutorial card on the homepage. The address says which step is open // (#tutorial-). The steps' pages sit side by side; a swipe, a name in @@ -473,7 +526,7 @@ if (tcard) { track.addEventListener('pointerup', settle); track.addEventListener('pointercancel', settle); tcard.addEventListener('keydown', (e) => { - if (e.target.closest('input, textarea')) return; + if (e.target.closest('input, textarea, [contenteditable]')) return; if (e.key === 'ArrowRight') stepTo(cur + 1); if (e.key === 'ArrowLeft') stepTo(cur - 1); }); From ccc00507c0e0f993a2a0307726fdc01079f009cd Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:20:16 -0500 Subject: [PATCH 40/60] Camera configs: rotation 0 by default, there to edit; no double-wrapped editable block Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 6 +++--- content/docs/dataset.md | 2 +- content/docs/train.md | 2 +- plugins/yaml_page.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 8033906..628871e 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -13,13 +13,13 @@ This lists every camera, including a laptop's built-in webcam, and saves a test ```{ .bash .edit } # Edit here: index_or_path is the camera's Id from step 1. -# Image upside down: add rotation: 180 after fourcc: MJPG. +# Image upside down: rotation: 180. lerobot-teleoperate \ --robot.type=rebot_b601_follower \ --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ --teleop.id=leader1 \ @@ -35,7 +35,7 @@ lerobot-teleoperate \ --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ --teleop.id=leader1 \ diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 89c55a6..0891054 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -10,7 +10,7 @@ lerobot-record \ --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ --teleop.type=rebot_102_leader \ --teleop.port=/dev/ttyUSB0 \ --teleop.id=leader1 \ diff --git a/content/docs/train.md b/content/docs/train.md index b0942e1..8810c9b 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -31,7 +31,7 @@ lerobot-record \ --robot.motor_family=rs \ --robot.port=can0 \ --robot.id=follower1 \ - --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ --display_data=false \ --dataset.repo_id=seeed_rebot_b601_rs/eval_test \ --dataset.single_task="Grab the black cube" \ diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index be638bb..8677b89 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -229,7 +229,7 @@ def alert(match): # what is there now. html = re.sub( r'
      ]*)>(.*?)
      ', - r'
      Editable
      \2
      ', + r'
      Editable
      \2
      ', html, flags=re.S, ) From 3c5e42a30323044fe5409708873e328400002f1f Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:21:26 -0500 Subject: [PATCH 41/60] Camera commands: only the camera Id and rotation can be edited The values of index_or_path and rotation in any command's camera settings are fields that can be typed into, highlighted in place; the rest of the command is static. A value typed in one command carries over to every other command naming that camera, in the dataset and training steps too, and is kept in the browser for the next visit. The editable-block fence is gone. Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 8 +++--- plugins/yaml_page.py | 37 ++++++++++++++---------- theme/static/css/app.css | 12 +++++++- theme/static/js/app.js | 62 ++++++++++++---------------------------- 4 files changed, 55 insertions(+), 64 deletions(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 628871e..c4bc0a4 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -11,8 +11,8 @@ This lists every camera, including a laptop's built-in webcam, and saves a test ## 2. Teleoperate with One Camera -```{ .bash .edit } -# Edit here: index_or_path is the camera's Id from step 1. +```bash +# index_or_path is the camera's Id from step 1. # Image upside down: rotation: 180. lerobot-teleoperate \ --robot.type=rebot_b601_follower \ @@ -28,8 +28,8 @@ lerobot-teleoperate \ ## 3. Teleoperate with Two Cameras -```{ .bash .edit } -# Edit here: one index_or_path per camera, from step 1. +```bash +# One index_or_path per camera, from step 1. lerobot-teleoperate \ --robot.type=rebot_b601_follower \ --robot.motor_family=rs \ diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 8677b89..f9b1187 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -224,21 +224,28 @@ def alert(match): html = markdown.markdown(text, extensions=["fenced_code", "sane_lists", "tables", "attr_list"]) # Links to other sites open in a new tab, as everywhere on the site. html = re.sub(r'
      ', r'', html) - # Every code block gets a Copy button, wired up by app.js. A fence - # written as ```{ .bash .edit } can be typed into, and Copy copies - # what is there now. - html = re.sub( - r'
      ]*)>(.*?)
      ', - r'
      Editable
      \2
      ', - html, - flags=re.S, - ) - return re.sub( - r"
      (.*?)
      ", - r'
      \1
      ', - html, - flags=re.S, - ) + # Every code block gets a Copy button, wired up by app.js. In a block + # with camera settings (`front: {type: opencv, index_or_path: 0, ...}`) + # the camera's Id and rotation become fields that can be typed into; + # the rest of the command stays as it is. + def field(name, which, value): + return (f'{value}') + + def camera(m): + name, body = m.group(1), m.group(2) + body = re.sub(r"(index_or_path:\s*)([^,}\s]+)", lambda f: f.group(1) + field(name, "index", f.group(2)), body) + body = re.sub(r"(rotation:\s*)([^,}\s]+)", lambda f: f.group(1) + field(name, "rotation", f.group(2)), body) + return f"{name}: {{{body}}}" + + def block(m): + inner = re.sub(r"\b(front|side):\s*\{([^}]*)\}", camera, m.group(1)) + if inner != m.group(1): + return ('
      Editable fields' + '
      ' + inner + "
      ") + return '
      ' + inner + '
      ' + + return re.sub(r"
      (.*?)
      ", block, html, flags=re.S) def _prepare_projects(self, data): """Fill in each project's poster, optional preview clip, and neighbours.""" diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 67508f1..84cfbe6 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1418,10 +1418,20 @@ textarea { .code.editable:focus-within { box-shadow: 3px 3px 0 var(--hi); } -.code.editable code { +/* A field inside a command: the one part that can be typed into. */ +.code .val { + display: inline-block; + min-width: 1.2em; + padding: 0 3px; + background: var(--hi); + border-bottom: 2px solid var(--ink); outline: none; cursor: text; } +.code .val:focus { + background: var(--white); + box-shadow: 0 0 0 2px var(--ink); +} .code .copy { order: 1; align-self: flex-end; diff --git a/theme/static/js/app.js b/theme/static/js/app.js index b62e731..715bc09 100644 --- a/theme/static/js/app.js +++ b/theme/static/js/app.js @@ -399,55 +399,29 @@ function syncBack() { for (const back of $$('[data-back]')) back.setAttribute('aria-disabled', String(onHome && !canGoBack())); } -// Camera settings in the tutorial's commands. Each camera is written as -// `front: {type: opencv, index_or_path: 0, ...}`. What is typed into an -// editable block (the camera's Id, a rotation) carries over to every other -// command that names the same camera, and is kept for the next visit. -const CAMERA = /\b(front|side)\s*:\s*\{([^}]*)\}/g; -const FIELD = (name) => new RegExp(`${name}:\\s*([^,}\\s]+)`); -const camBlocks = $$('.code code').filter((code) => CAMERA.test(code.textContent) && !CAMERA.test('')); -if (camBlocks.length) { +// Camera settings in the tutorial's commands: the camera's Id and rotation +// are fields that can be typed into. A value typed in one command carries +// over to every other command that names the same camera, and is kept in +// the browser for the next visit. +const camFields = $$('.code .val'); +if (camFields.length) { const KEY = 'tutorial-cameras'; - const readCameras = (text) => { - const out = {}; - for (const [, name, body] of text.matchAll(CAMERA)) { - out[name] = { index: FIELD('index_or_path').exec(body)?.[1], rotation: FIELD('rotation').exec(body)?.[1] }; - } - return out; - }; - const applyCameras = (text, cams) => - text.replace(CAMERA, (all, name, body) => { - const cam = cams[name]; - if (!cam) return all; - let b = body; - if (cam.index !== undefined) b = b.replace(FIELD('index_or_path'), `index_or_path: ${cam.index}`); - if (cam.rotation !== undefined) { - b = FIELD('rotation').test(b) ? b.replace(FIELD('rotation'), `rotation: ${cam.rotation}`) : b.replace(/\s*$/, `, rotation: ${cam.rotation}`); - } else { - b = b.replace(/,\s*rotation:\s*[^,}\s]+/, ''); - } - return `${name}: {${b}}`; - }); let cams = {}; try { cams = JSON.parse(localStorage.getItem(KEY)) || {}; } catch {} - const spread = (from) => { - for (const code of camBlocks) { - if (code === from) continue; - const next = applyCameras(code.textContent, cams); - if (next !== code.textContent) code.textContent = next; + const apply = (except) => { + for (const f of camFields) { + const v = cams[f.dataset.cam]?.[f.dataset.field]; + if (f !== except && v !== undefined && f.textContent !== v) f.textContent = v; } }; - if (Object.keys(cams).length) spread(null); - let pending = 0; - for (const code of camBlocks) { - if (!code.isContentEditable) continue; - code.addEventListener('input', () => { - clearTimeout(pending); - pending = setTimeout(() => { - cams = { ...cams, ...readCameras(code.textContent) }; - try { localStorage.setItem(KEY, JSON.stringify(cams)); } catch {} - spread(code); - }, 400); + apply(null); + for (const f of camFields) { + f.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); f.blur(); } }); + f.addEventListener('input', () => { + const v = f.textContent.replace(/\s+/g, ''); + cams = { ...cams, [f.dataset.cam]: { ...cams[f.dataset.cam], [f.dataset.field]: v } }; + try { localStorage.setItem(KEY, JSON.stringify(cams)); } catch {} + apply(f); }); } } From 3d4e4a66ad7fff06701927760a7e2368dcb10b9e Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:22:26 -0500 Subject: [PATCH 42/60] Code blocks: long lines wrap instead of scrolling sideways Co-Authored-By: Claude Fable 5.1 --- theme/static/css/app.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 84cfbe6..90d5cc8 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1390,7 +1390,8 @@ textarea { order: 2; margin: 0; padding: 4px 14px 14px; - overflow-x: auto; + white-space: pre-wrap; /* long lines wrap; nothing scrolls sideways */ + overflow-wrap: anywhere; font: 13.5px/1.5 var(--f-type); tab-size: 4; } From 955453cb9a6d6ff618487cf8ad9f1442b9193bc8 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:23:13 -0500 Subject: [PATCH 43/60] Code blocks: a smaller font on phones so flag lines do not wrap Co-Authored-By: Claude Fable 5.1 --- theme/static/css/app.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 90d5cc8..da2dcee 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1392,7 +1392,7 @@ textarea { padding: 4px 14px 14px; white-space: pre-wrap; /* long lines wrap; nothing scrolls sideways */ overflow-wrap: anywhere; - font: 13.5px/1.5 var(--f-type); + font: 12.5px/1.5 var(--f-type); /* 40 characters across a phone card: a flag line fits */ tab-size: 4; } .code pre code { @@ -2521,6 +2521,9 @@ a.mini { gap: 28px; padding: 12px var(--gut); } + .code pre { + font-size: 13.5px; + } .chip { gap: 7px; font-size: 13.5px; From 0c3e517773f5ddf7a82005f4a289eb1ad36f26c9 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:32:30 -0500 Subject: [PATCH 44/60] Camera Setup: a live Rerun view of every camera; Dataset: one- and two-camera record After lerobot-find-cameras, a short Python block opens every camera it finds in a Rerun window, so the right one can be picked by eye. It was run against the real cameras here, saving to a file instead of a window. Dataset Collection's record step has a one-camera and a two-camera command, with the camera fields shared like everywhere else. Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 23 +++++++++++++++++++++++ content/docs/dataset.md | 25 ++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index c4bc0a4..1ed7ba5 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -7,6 +7,29 @@ lerobot-find-cameras opencv ``` +Live view of every camera in Rerun, to pick the right one by eye. `Ctrl` + `C` stops it. + +```bash +python - <<'EOF' +import rerun as rr +from lerobot.cameras.opencv import OpenCVCamera, OpenCVCameraConfig + +rr.init("cameras", spawn=True) +cams = [] +for info in OpenCVCamera.find_cameras(): + cam = OpenCVCamera(OpenCVCameraConfig(index_or_path=info["id"])) + try: + cam.connect(warmup=False) + except Exception: + continue + cams.append((str(info["id"]).replace("/dev/", ""), cam)) +print("Showing:", [name for name, _ in cams]) +while True: + for name, cam in cams: + rr.log(f"camera/{name}", rr.Image(cam.read())) +EOF +``` + This lists every camera, including a laptop's built-in webcam, and saves a test image from each to `outputs/captured_images`. Open the images to see which `Id` is the USB camera on the robot. ## 2. Teleoperate with One Camera diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 0891054..842788e 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -2,7 +2,30 @@ ## 1. Record -Set up the ports and cameras first, as in Camera Setup. Then record five episodes of one task: +Set up the ports and cameras first, as in Camera Setup. Then record five episodes of one task. + +One camera: + +```bash +lerobot-record \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ + --robot.port=can0 \ + --robot.id=follower1 \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ + --teleop.type=rebot_102_leader \ + --teleop.port=/dev/ttyUSB0 \ + --teleop.id=leader1 \ + --display_data=true \ + --dataset.repo_id=seeed_rebot_b601_rs/test \ + --dataset.num_episodes=5 \ + --dataset.single_task="Grab the black cube" \ + --dataset.push_to_hub=false \ + --dataset.episode_time_s=30 \ + --dataset.reset_time_s=30 +``` + +Two cameras: ```bash lerobot-record \ From 11be1ac69be58e1f5bc181d06dabc3cb6563f902 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:33:24 -0500 Subject: [PATCH 45/60] Dataset: the dataset name, resume flag and episode count are editable fields The record commands carry --resume=false. The dataset name in every command that takes it, the resume flag and the number of episodes are fields like the camera settings: shared across commands and remembered. The evaluation dataset keeps its own name. Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 8 +++++--- plugins/yaml_page.py | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 842788e..02c575c 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -22,7 +22,8 @@ lerobot-record \ --dataset.single_task="Grab the black cube" \ --dataset.push_to_hub=false \ --dataset.episode_time_s=30 \ - --dataset.reset_time_s=30 + --dataset.reset_time_s=30 \ + --resume=false ``` Two cameras: @@ -43,7 +44,8 @@ lerobot-record \ --dataset.single_task="Grab the black cube" \ --dataset.push_to_hub=false \ --dataset.episode_time_s=30 \ - --dataset.reset_time_s=30 + --dataset.reset_time_s=30 \ + --resume=false ``` `repo_id` is any name you like. The dataset is saved under `~/.cache/huggingface/lerobot/`. @@ -54,7 +56,7 @@ Keys while recording: - **Left arrow**: cancel the episode and record it again. - **Esc**: stop, encode the videos and finish. -To continue an interrupted recording, run the same command with `--resume=true`, with `--dataset.num_episodes` set to how many more episodes to add. +To continue an interrupted recording, set `resume` to `true` and `num_episodes` to how many more episodes to add. > [!TIP] > Keep the cameras fixed, grasp the same way every time, and keep the object in view. Aim for 50 or more episodes. You should be able to do the task yourself from the camera images alone. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index f9b1187..73e0891 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -228,9 +228,10 @@ def alert(match): # with camera settings (`front: {type: opencv, index_or_path: 0, ...}`) # the camera's Id and rotation become fields that can be typed into; # the rest of the command stays as it is. - def field(name, which, value): - return (f'{value}') + def field(name, which, value, numeric=True): + mode = ' inputmode="numeric"' if numeric else "" + return (f'{value}') def camera(m): name, body = m.group(1), m.group(2) @@ -240,6 +241,14 @@ def camera(m): def block(m): inner = re.sub(r"\b(front|side):\s*\{([^}]*)\}", camera, m.group(1)) + # The dataset's name, wherever a command takes it; the recording's + # resume flag and episode count. + inner = re.sub(r"(repo[_-]id[= ])(seeed_rebot_b601_rs/test)\b", + lambda f: f.group(1) + field("dataset", "repo_id", f.group(2), numeric=False), inner) + inner = re.sub(r"(--resume=)(true|false)\b", + lambda f: f.group(1) + field("record", "resume", f.group(2), numeric=False), inner) + inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", + lambda f: f.group(1) + field("record", "num_episodes", f.group(2)), inner) if inner != m.group(1): return ('
      Editable fields' '
      ' + inner + "
      ") From 483ff068eed42f81b14b9145d5443804f75670bb Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:33:37 -0500 Subject: [PATCH 46/60] The episode-count field belongs to the record commands only Co-Authored-By: Claude Fable 5.1 --- plugins/yaml_page.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 73e0891..e691c7b 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -247,8 +247,9 @@ def block(m): lambda f: f.group(1) + field("dataset", "repo_id", f.group(2), numeric=False), inner) inner = re.sub(r"(--resume=)(true|false)\b", lambda f: f.group(1) + field("record", "resume", f.group(2), numeric=False), inner) - inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", - lambda f: f.group(1) + field("record", "num_episodes", f.group(2)), inner) + if "--resume=" in inner: # the record commands only, not the evaluation run + inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", + lambda f: f.group(1) + field("record", "num_episodes", f.group(2)), inner) if inner != m.group(1): return ('
      Editable fields' '
      ' + inner + "
      ") From 0cba599fce79d580b39f8da73a43b00744a5040b Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:35:08 -0500 Subject: [PATCH 47/60] Tutorial fields: episode, task, training run, evaluation settings Shared, remembered fields now also cover the episode to view or replay, the task text in the record and evaluation commands, the training run's name (in its output folder, job name and the evaluation's policy path) and step count, and the evaluation dataset's name and episode count. Text fields keep their spaces. Dataset Collection's record step has One camera and Two cameras sub-headings. Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 4 ++-- plugins/yaml_page.py | 15 ++++++++++++++- theme/static/js/app.js | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 02c575c..774bb41 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -4,7 +4,7 @@ Set up the ports and cameras first, as in Camera Setup. Then record five episodes of one task. -One camera: +### One camera ```bash lerobot-record \ @@ -26,7 +26,7 @@ lerobot-record \ --resume=false ``` -Two cameras: +### Two cameras ```bash lerobot-record \ diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index e691c7b..32107d9 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -247,9 +247,22 @@ def block(m): lambda f: f.group(1) + field("dataset", "repo_id", f.group(2), numeric=False), inner) inner = re.sub(r"(--resume=)(true|false)\b", lambda f: f.group(1) + field("record", "resume", f.group(2), numeric=False), inner) - if "--resume=" in inner: # the record commands only, not the evaluation run + if 'data-cam="dataset"' in inner: # commands on this dataset: the episode to view or replay + inner = re.sub(r"(--episode-index |--dataset\.episode=)(\d+)\b", + lambda f: f.group(1) + field("dataset", "episode", f.group(2)), inner) + if "--resume=" in inner: # the record commands only inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", lambda f: f.group(1) + field("record", "num_episodes", f.group(2)), inner) + # The task, wherever it is written; the training run's name and + # length; the evaluation's own dataset and episode count. + inner = re.sub(r"(--dataset\.single_task=")([^&]+)(")", # quotes are escaped in the HTML + lambda f: f.group(1) + field("dataset", "task", f.group(2), numeric=False) + f.group(3), inner) + inner = re.sub(r"\b(act_rebot_test)\b", lambda f: field("train", "job", f.group(1), numeric=False), inner) + inner = re.sub(r"(--steps=)(\d+)\b", lambda f: f.group(1) + field("train", "steps", f.group(2)), inner) + inner = re.sub(r"\b(seeed_rebot_b601_rs/eval_test)\b", lambda f: field("eval", "repo_id", f.group(1), numeric=False), inner) + if "eval_test" in inner: + inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", + lambda f: f.group(1) + field("eval", "num_episodes", f.group(2)), inner) if inner != m.group(1): return ('
      Editable fields' '
      ' + inner + "
      ") diff --git a/theme/static/js/app.js b/theme/static/js/app.js index 715bc09..02a283f 100644 --- a/theme/static/js/app.js +++ b/theme/static/js/app.js @@ -418,7 +418,7 @@ if (camFields.length) { for (const f of camFields) { f.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); f.blur(); } }); f.addEventListener('input', () => { - const v = f.textContent.replace(/\s+/g, ''); + const v = f.textContent.replace(/\s+/g, ' ').trim(); cams = { ...cams, [f.dataset.cam]: { ...cams[f.dataset.cam], [f.dataset.field]: v } }; try { localStorage.setItem(KEY, JSON.stringify(cams)); } catch {} apply(f); From b0fd0e80707dacc96d4cde3e0787f06c1add8883 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:44:57 -0500 Subject: [PATCH 48/60] Camera Setup: name the cameras with v4l2-ctl and watch one with ffplay In place of a Python script: v4l2-ctl lists each camera by name with its /dev/videoN paths, and ffplay shows one live. The device number in the ffplay line is the front camera's Id field, shared with the other commands. Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 27 +++++++-------------------- plugins/yaml_page.py | 2 ++ 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 1ed7ba5..2eb7bf8 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -7,31 +7,18 @@ lerobot-find-cameras opencv ``` -Live view of every camera in Rerun, to pick the right one by eye. `Ctrl` + `C` stops it. +This lists every camera, including a laptop's built-in webcam, and saves a test image from each to `outputs/captured_images`. + +Which camera is which, by name. A camera's Id is the number of the first `/dev/videoN` under it; the USB camera is usually not 0. ```bash -python - <<'EOF' -import rerun as rr -from lerobot.cameras.opencv import OpenCVCamera, OpenCVCameraConfig +sudo apt install -y v4l-utils +v4l2-ctl --list-devices -rr.init("cameras", spawn=True) -cams = [] -for info in OpenCVCamera.find_cameras(): - cam = OpenCVCamera(OpenCVCameraConfig(index_or_path=info["id"])) - try: - cam.connect(warmup=False) - except Exception: - continue - cams.append((str(info["id"]).replace("/dev/", ""), cam)) -print("Showing:", [name for name, _ in cams]) -while True: - for name, cam in cams: - rr.log(f"camera/{name}", rr.Image(cam.read())) -EOF +# Watch one live +ffplay -f v4l2 /dev/video0 ``` -This lists every camera, including a laptop's built-in webcam, and saves a test image from each to `outputs/captured_images`. Open the images to see which `Id` is the USB camera on the robot. - ## 2. Teleoperate with One Camera ```bash diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 32107d9..9e12a9f 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -241,6 +241,8 @@ def camera(m): def block(m): inner = re.sub(r"\b(front|side):\s*\{([^}]*)\}", camera, m.group(1)) + # The camera watched with ffplay is the front camera. + inner = re.sub(r"(ffplay -f v4l2 /dev/video)(\d+)\b", lambda f: f.group(1) + field("front", "index", f.group(2)), inner) # The dataset's name, wherever a command takes it; the recording's # resume flag and episode count. inner = re.sub(r"(repo[_-]id[= ])(seeed_rebot_b601_rs/test)\b", From 41c3d2f1fbf22f57e417be9a1d4a27365f790b1a Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:46:49 -0500 Subject: [PATCH 49/60] Dataset: the record arguments as a short list Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 774bb41..b1148fe 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -48,18 +48,16 @@ lerobot-record \ --resume=false ``` -`repo_id` is any name you like. The dataset is saved under `~/.cache/huggingface/lerobot/`. +- `repo_id`: the dataset's name. Saved under `~/.cache/huggingface/lerobot/`. +- `single_task`: what the episodes show, in a few words. +- `num_episodes`: how many to record. +- `resume`: `true` continues an interrupted recording; `num_episodes` is then how many more to add. +- `index_or_path`, `rotation`: the cameras, as in Camera Setup. -Keys while recording: - -- **Right arrow**: end the episode (or the reset) early and move on. -- **Left arrow**: cancel the episode and record it again. -- **Esc**: stop, encode the videos and finish. - -To continue an interrupted recording, set `resume` to `true` and `num_episodes` to how many more episodes to add. +Keys while recording: **right arrow** ends the episode early, **left arrow** records it again, **Esc** stops and saves. > [!TIP] -> Keep the cameras fixed, grasp the same way every time, and keep the object in view. Aim for 50 or more episodes. You should be able to do the task yourself from the camera images alone. +> Keep the cameras fixed, grasp the same way every time, and keep the object in view. Aim for 50 or more episodes. ## 2. Visualize From a4ebe5a231ea58981f8d1bb7f86ae880ea966d0a Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:48:06 -0500 Subject: [PATCH 50/60] Camera Setup: the find-cameras notes as comment lines Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 2eb7bf8..3d17589 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -7,11 +7,10 @@ lerobot-find-cameras opencv ``` -This lists every camera, including a laptop's built-in webcam, and saves a test image from each to `outputs/captured_images`. - -Which camera is which, by name. A camera's Id is the number of the first `/dev/videoN` under it; the USB camera is usually not 0. +Test images: `outputs/captured_images`. ```bash +# Cameras by name. The Id is the N of the first /dev/videoN listed under a camera sudo apt install -y v4l-utils v4l2-ctl --list-devices From aae659fe51a72efbae1e44ebce3cc83b0cd9d523 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 13:50:04 -0500 Subject: [PATCH 51/60] Camera Setup: listing and live view as two blocks Co-Authored-By: Claude Fable 5.1 --- content/docs/cameras.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/cameras.md b/content/docs/cameras.md index 3d17589..169130f 100644 --- a/content/docs/cameras.md +++ b/content/docs/cameras.md @@ -13,7 +13,9 @@ Test images: `outputs/captured_images`. # Cameras by name. The Id is the N of the first /dev/videoN listed under a camera sudo apt install -y v4l-utils v4l2-ctl --list-devices +``` +```bash # Watch one live ffplay -f v4l2 /dev/video0 ``` From 90a7486cab13a293314be38955185179cf4f5914 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:04:35 -0500 Subject: [PATCH 52/60] Dataset: episode and reset times are editable fields Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 1 + plugins/yaml_page.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index b1148fe..ab97a38 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -51,6 +51,7 @@ lerobot-record \ - `repo_id`: the dataset's name. Saved under `~/.cache/huggingface/lerobot/`. - `single_task`: what the episodes show, in a few words. - `num_episodes`: how many to record. +- `episode_time_s`, `reset_time_s`: seconds per episode, and to put things back between episodes. - `resume`: `true` continues an interrupted recording; `num_episodes` is then how many more to add. - `index_or_path`, `rotation`: the cameras, as in Camera Setup. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 9e12a9f..0ea8a9e 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -255,6 +255,8 @@ def block(m): if "--resume=" in inner: # the record commands only inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", lambda f: f.group(1) + field("record", "num_episodes", f.group(2)), inner) + inner = re.sub(r"(--dataset\.(episode_time_s|reset_time_s)=)(\d+)\b", + lambda f: f.group(1) + field("record", f.group(2), f.group(3)), inner) # The task, wherever it is written; the training run's name and # length; the evaluation's own dataset and episode count. inner = re.sub(r"(--dataset\.single_task=")([^&]+)(")", # quotes are escaped in the HTML From c03490f297b253272bb6055a884a5ae90f0108d5 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:13:01 -0500 Subject: [PATCH 53/60] Dataset: keep the dataset's name as typed; fix the viewer command The fork appends the date and time to a recording's name unless --dataset.no_stamp=true, so the viewer and replay commands could not find it and fell back to the Hub. The record commands now pass no_stamp. The viewer's --display-compressed-images takes no value. Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index ab97a38..aa3d325 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -23,6 +23,7 @@ lerobot-record \ --dataset.push_to_hub=false \ --dataset.episode_time_s=30 \ --dataset.reset_time_s=30 \ + --dataset.no_stamp=true \ --resume=false ``` @@ -45,10 +46,11 @@ lerobot-record \ --dataset.push_to_hub=false \ --dataset.episode_time_s=30 \ --dataset.reset_time_s=30 \ + --dataset.no_stamp=true \ --resume=false ``` -- `repo_id`: the dataset's name. Saved under `~/.cache/huggingface/lerobot/`. +- `repo_id`: the dataset's name. Saved under `~/.cache/huggingface/lerobot/`. Without `no_stamp`, LeRobot adds the date and time to the name on every run. - `single_task`: what the episodes show, in a few words. - `num_episodes`: how many to record. - `episode_time_s`, `reset_time_s`: seconds per episode, and to put things back between episodes. @@ -65,8 +67,7 @@ Keys while recording: **right arrow** ends the episode early, **left arrow** rec ```bash lerobot-dataset-viz \ --repo-id seeed_rebot_b601_rs/test \ - --episode-index 0 \ - --display-compressed-images=false + --episode-index 0 ``` ## 3. Replay From e20a81055db8092c45401efbd521373bd9b5fd0d Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:25:25 -0500 Subject: [PATCH 54/60] Training: the evaluation recording keeps its dataset name as typed too Co-Authored-By: Claude Fable 5.1 --- content/docs/train.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/docs/train.md b/content/docs/train.md index 8810c9b..95b84ff 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -37,6 +37,7 @@ lerobot-record \ --dataset.single_task="Grab the black cube" \ --dataset.num_episodes=10 \ --dataset.push_to_hub=false \ + --dataset.no_stamp=true \ --policy.path=outputs/train/act_rebot_test/checkpoints/last/pretrained_model ``` From 272064b21158ed2f38d1faed0d3b3a5f76a734e6 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:26:43 -0500 Subject: [PATCH 55/60] Visualize, Replay, Training: the dataset by its exact folder Each command passes the dataset's folder under ~/.cache/huggingface/ lerobot as well as its name, so it loads locally and never asks the Hub. The name in the path is the same editable field as the name. Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 2 ++ content/docs/train.md | 1 + plugins/yaml_page.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index aa3d325..781885e 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -67,6 +67,7 @@ Keys while recording: **right arrow** ends the episode early, **left arrow** rec ```bash lerobot-dataset-viz \ --repo-id seeed_rebot_b601_rs/test \ + --root $HOME/.cache/huggingface/lerobot/seeed_rebot_b601_rs/test \ --episode-index 0 ``` @@ -81,5 +82,6 @@ lerobot-replay \ --robot.port=can0 \ --robot.id=follower1 \ --dataset.repo_id=seeed_rebot_b601_rs/test \ + --dataset.root=$HOME/.cache/huggingface/lerobot/seeed_rebot_b601_rs/test \ --dataset.episode=0 ``` diff --git a/content/docs/train.md b/content/docs/train.md index 95b84ff..0270524 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -7,6 +7,7 @@ Train an ACT policy on the dataset you recorded. Use the same `repo_id` as when ```bash lerobot-train \ --dataset.repo_id=seeed_rebot_b601_rs/test \ + --dataset.root=$HOME/.cache/huggingface/lerobot/seeed_rebot_b601_rs/test \ --policy.type=act \ --policy.push_to_hub=false \ --output_dir=outputs/train/act_rebot_test \ diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 0ea8a9e..145e224 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -245,7 +245,7 @@ def block(m): inner = re.sub(r"(ffplay -f v4l2 /dev/video)(\d+)\b", lambda f: f.group(1) + field("front", "index", f.group(2)), inner) # The dataset's name, wherever a command takes it; the recording's # resume flag and episode count. - inner = re.sub(r"(repo[_-]id[= ])(seeed_rebot_b601_rs/test)\b", + inner = re.sub(r"(repo[_-]id[= ]|lerobot/)(seeed_rebot_b601_rs/test)\b", lambda f: f.group(1) + field("dataset", "repo_id", f.group(2), numeric=False), inner) inner = re.sub(r"(--resume=)(true|false)\b", lambda f: f.group(1) + field("record", "resume", f.group(2), numeric=False), inner) From 91a6d1d671034826d311426f9e6aa6727e411992 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:30:15 -0500 Subject: [PATCH 56/60] Visualize, Replay, Training: the dataset by name only Co-Authored-By: Claude Fable 5.1 --- content/docs/dataset.md | 2 -- content/docs/train.md | 1 - 2 files changed, 3 deletions(-) diff --git a/content/docs/dataset.md b/content/docs/dataset.md index 781885e..aa3d325 100644 --- a/content/docs/dataset.md +++ b/content/docs/dataset.md @@ -67,7 +67,6 @@ Keys while recording: **right arrow** ends the episode early, **left arrow** rec ```bash lerobot-dataset-viz \ --repo-id seeed_rebot_b601_rs/test \ - --root $HOME/.cache/huggingface/lerobot/seeed_rebot_b601_rs/test \ --episode-index 0 ``` @@ -82,6 +81,5 @@ lerobot-replay \ --robot.port=can0 \ --robot.id=follower1 \ --dataset.repo_id=seeed_rebot_b601_rs/test \ - --dataset.root=$HOME/.cache/huggingface/lerobot/seeed_rebot_b601_rs/test \ --dataset.episode=0 ``` diff --git a/content/docs/train.md b/content/docs/train.md index 0270524..95b84ff 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -7,7 +7,6 @@ Train an ACT policy on the dataset you recorded. Use the same `repo_id` as when ```bash lerobot-train \ --dataset.repo_id=seeed_rebot_b601_rs/test \ - --dataset.root=$HOME/.cache/huggingface/lerobot/seeed_rebot_b601_rs/test \ --policy.type=act \ --policy.push_to_hub=false \ --output_dir=outputs/train/act_rebot_test \ From fe9a0bb01989c041ac450091e33565f30661208c Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:35:34 -0500 Subject: [PATCH 57/60] Tutorial fields: a dataset name never keeps a trailing slash Co-Authored-By: Claude Fable 5.1 --- theme/static/js/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/theme/static/js/app.js b/theme/static/js/app.js index 02a283f..6149deb 100644 --- a/theme/static/js/app.js +++ b/theme/static/js/app.js @@ -406,8 +406,15 @@ function syncBack() { const camFields = $$('.code .val'); if (camFields.length) { const KEY = 'tutorial-cameras'; + // A value as it should be used: single spaces, and no slash left on the + // end of a dataset's name, which LeRobot rejects. + const clean = (field, v) => { + v = v.replace(/\s+/g, ' ').trim(); + return field === 'repo_id' ? v.replace(/\/+$/, '') : v; + }; let cams = {}; try { cams = JSON.parse(localStorage.getItem(KEY)) || {}; } catch {} + for (const cam of Object.values(cams)) for (const k of Object.keys(cam)) cam[k] = clean(k, String(cam[k])); const apply = (except) => { for (const f of camFields) { const v = cams[f.dataset.cam]?.[f.dataset.field]; @@ -418,7 +425,7 @@ if (camFields.length) { for (const f of camFields) { f.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); f.blur(); } }); f.addEventListener('input', () => { - const v = f.textContent.replace(/\s+/g, ' ').trim(); + const v = clean(f.dataset.field, f.textContent); cams = { ...cams, [f.dataset.cam]: { ...cams[f.dataset.cam], [f.dataset.field]: v } }; try { localStorage.setItem(KEY, JSON.stringify(cams)); } catch {} apply(f); From 997dafdfcfe63b4a5fd25722c65722781600b90d Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:37:59 -0500 Subject: [PATCH 58/60] Training: drop the wandb flag; the fork logs with Trackio, off by default Co-Authored-By: Claude Fable 5.1 --- content/docs/train.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/train.md b/content/docs/train.md index 95b84ff..024f9a1 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -12,7 +12,6 @@ lerobot-train \ --output_dir=outputs/train/act_rebot_test \ --job_name=act_rebot_test \ --policy.device=cuda \ - --wandb.enable=false \ --steps=300000 ``` From 08a932f0c0d749193252f5527c8fff3d2aca4da4 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:40:37 -0500 Subject: [PATCH 59/60] Training: ACT, SmolVLA, Pi0 and Pi0.5 as sub-tabs A run of "###" sections between markers in a step becomes a row of tabs with one panel each; picking a tab picks the same-named tab in every row that has it, and the choice is remembered. The training and evaluation commands come in four tabs, with the extras to install for SmolVLA and Pi0, and a link to the wiki for the rest. Each model's run name is its own shared field. Co-Authored-By: Claude Fable 5.1 --- content/docs/train.md | 136 ++++++++++++++++++++++++++++++++++++++- plugins/yaml_page.py | 24 ++++++- theme/static/css/app.css | 28 ++++++++ theme/static/js/app.js | 26 ++++++++ 4 files changed, 209 insertions(+), 5 deletions(-) diff --git a/content/docs/train.md b/content/docs/train.md index 024f9a1..8b10ddc 100644 --- a/content/docs/train.md +++ b/content/docs/train.md @@ -2,7 +2,10 @@ ## 1. Train -Train an ACT policy on the dataset you recorded. Use the same `repo_id` as when recording. +Train a policy on the dataset you recorded. ACT is the quick one; the others are larger pretrained models that need more GPU memory and time. More models and options: [Seeed's wiki](https://wiki.seeedstudio.com/rebot_arm_b601_rs_lerobot/#training-and-evaluation). + + +### ACT ```bash lerobot-train \ @@ -15,15 +18,87 @@ lerobot-train \ --steps=300000 ``` -Checkpoints are saved under `outputs/train/act_rebot_test/checkpoints/`, so you can stop early and evaluate the latest one. +### SmolVLA + +Fine-tunes the pretrained `smolvla_base`. Lower `batch_size` first if the GPU runs out of memory. + +```bash +uv pip install -e ".[smolvla]" +``` + +```bash +lerobot-train \ + --policy.path=lerobot/smolvla_base \ + --dataset.repo_id=seeed_rebot_b601_rs/test \ + --policy.push_to_hub=false \ + --output_dir=outputs/train/smolvla_rebot_test \ + --job_name=smolvla_rebot_test \ + --policy.device=cuda \ + --batch_size=64 \ + --steps=20000 +``` + +### Pi0 + +Fine-tunes the pretrained `pi0_base`, in bfloat16 with gradient checkpointing to fit in memory. + +```bash +uv pip install -e ".[pi]" +``` + +```bash +lerobot-train \ + --policy.type=pi0 \ + --policy.pretrained_path=lerobot/pi0_base \ + --dataset.repo_id=seeed_rebot_b601_rs/test \ + --policy.push_to_hub=false \ + --output_dir=outputs/train/pi0_rebot_test \ + --job_name=pi0_rebot_test \ + --policy.device=cuda \ + --policy.dtype=bfloat16 \ + --policy.gradient_checkpointing=true \ + --policy.compile_model=true \ + --batch_size=32 \ + --steps=3000 +``` + +### Pi0.5 + +Same as Pi0, with the newer `pi05_base`. + +```bash +uv pip install -e ".[pi]" +``` + +```bash +lerobot-train \ + --policy.type=pi05 \ + --policy.pretrained_path=lerobot/pi05_base \ + --dataset.repo_id=seeed_rebot_b601_rs/test \ + --policy.push_to_hub=false \ + --output_dir=outputs/train/pi05_rebot_test \ + --job_name=pi05_rebot_test \ + --policy.device=cuda \ + --policy.dtype=bfloat16 \ + --policy.gradient_checkpointing=true \ + --policy.compile_model=true \ + --batch_size=32 \ + --steps=3000 +``` + + +Checkpoints are saved under the output folder's `checkpoints/`, so you can stop early and evaluate the latest one. > [!NOTE] -> Training needs an NVIDIA GPU. 50 episodes take about 6 hours on an RTX 3060, and 2 to 3 hours on an RTX 4090. +> Training needs an NVIDIA GPU. ACT on 50 episodes takes about 6 hours on an RTX 3060, and 2 to 3 hours on an RTX 4090. ## 2. Evaluate Run the policy on the robot. This records 10 episodes of the policy's own attempts, with the same cameras as the dataset. + +### ACT + ```bash lerobot-record \ --robot.type=rebot_b601_follower \ @@ -40,4 +115,59 @@ lerobot-record \ --policy.path=outputs/train/act_rebot_test/checkpoints/last/pretrained_model ``` +### SmolVLA + +```bash +lerobot-record \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ + --robot.port=can0 \ + --robot.id=follower1 \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ + --display_data=false \ + --dataset.repo_id=seeed_rebot_b601_rs/eval_test \ + --dataset.single_task="Grab the black cube" \ + --dataset.num_episodes=10 \ + --dataset.push_to_hub=false \ + --dataset.no_stamp=true \ + --policy.path=outputs/train/smolvla_rebot_test/checkpoints/last/pretrained_model +``` + +### Pi0 + +```bash +lerobot-record \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ + --robot.port=can0 \ + --robot.id=follower1 \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ + --display_data=false \ + --dataset.repo_id=seeed_rebot_b601_rs/eval_test \ + --dataset.single_task="Grab the black cube" \ + --dataset.num_episodes=10 \ + --dataset.push_to_hub=false \ + --dataset.no_stamp=true \ + --policy.path=outputs/train/pi0_rebot_test/checkpoints/last/pretrained_model +``` + +### Pi0.5 + +```bash +lerobot-record \ + --robot.type=rebot_b601_follower \ + --robot.motor_family=rs \ + --robot.port=can0 \ + --robot.id=follower1 \ + --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG, rotation: 0}}" \ + --display_data=false \ + --dataset.repo_id=seeed_rebot_b601_rs/eval_test \ + --dataset.single_task="Grab the black cube" \ + --dataset.num_episodes=10 \ + --dataset.push_to_hub=false \ + --dataset.no_stamp=true \ + --policy.path=outputs/train/pi05_rebot_test/checkpoints/last/pretrained_model +``` + + If you see `mean is infinity`, the camera names (`front`, `side`) do not match the ones used when recording. diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 145e224..13b4337 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -261,7 +261,8 @@ def block(m): # length; the evaluation's own dataset and episode count. inner = re.sub(r"(--dataset\.single_task=")([^&]+)(")", # quotes are escaped in the HTML lambda f: f.group(1) + field("dataset", "task", f.group(2), numeric=False) + f.group(3), inner) - inner = re.sub(r"\b(act_rebot_test)\b", lambda f: field("train", "job", f.group(1), numeric=False), inner) + inner = re.sub(r"\b((act|smolvla|pi0|pi05)_rebot_test)\b", + lambda f: field("train", "job_" + f.group(2), f.group(1), numeric=False), inner) inner = re.sub(r"(--steps=)(\d+)\b", lambda f: f.group(1) + field("train", "steps", f.group(2)), inner) inner = re.sub(r"\b(seeed_rebot_b601_rs/eval_test)\b", lambda f: field("eval", "repo_id", f.group(1), numeric=False), inner) if "eval_test" in inner: @@ -272,7 +273,26 @@ def block(m): '
    ' + inner + "
    ") return '
    ' + inner + '
    ' - return re.sub(r"
    (.*?)
    ", block, html, flags=re.S) + html = re.sub(r"
    (.*?)
    ", block, html, flags=re.S) + + # A run of "### " sections between and + # becomes a row of tabs with one panel each. app.js switches them, + # and keeps the same choice across every tab row with those names. + def tabs(m): + parts = re.split(r"

    (.*?)

    ", m.group(1)) + names = parts[1::2] + bodies = parts[2::2] + if not names: + return m.group(1) + buttons = "".join( + f'' + for i, n in enumerate(names)) + panels = "".join( + f'
    {b}
    ' + for i, (n, b) in enumerate(zip(names, bodies))) + return f'
    {buttons}
    {panels}
    ' + + return re.sub(r"(.*?)", tabs, html, flags=re.S) def _prepare_projects(self, data): """Fill in each project's poster, optional preview clip, and neighbours.""" diff --git a/theme/static/css/app.css b/theme/static/css/app.css index da2dcee..81ae140 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1419,6 +1419,34 @@ textarea { .code.editable:focus-within { box-shadow: 3px 3px 0 var(--hi); } +/* Sub-tabs inside a step: one row of names, one panel showing. */ +.subtabs { + margin-top: 14px; +} +.stabs { + display: flex; + flex-wrap: wrap; + gap: 4px 16px; + margin-bottom: 12px; + border-bottom: 2px solid var(--ink); +} +.stab-btn { + padding: 8px 2px; + border: 0; + background: none; + font: 700 12px/1 var(--f-type); + text-transform: uppercase; + letter-spacing: 0.04em; + color: var(--mute); + cursor: pointer; +} +.stab-btn[aria-selected="true"] { + color: var(--ink); + box-shadow: inset 0 -3px 0 var(--hi); +} +.stab > * + * { + margin-top: 14px; +} /* A field inside a command: the one part that can be typed into. */ .code .val { display: inline-block; diff --git a/theme/static/js/app.js b/theme/static/js/app.js index 6149deb..9d1fd5a 100644 --- a/theme/static/js/app.js +++ b/theme/static/js/app.js @@ -433,6 +433,32 @@ if (camFields.length) { } } +// Sub-tabs inside a tutorial step (the model to train, say). Picking a tab +// picks the same-named tab in every other row that has it, and the choice +// is kept for the next visit. +const subtabs = $$('.subtabs'); +if (subtabs.length) { + const KEY = 'tutorial-tab'; + const pick = (name) => { + for (const group of subtabs) { + if (!group.querySelector(`.stab-btn[data-tab="${CSS.escape(name)}"]`)) continue; + for (const b of group.querySelectorAll('.stab-btn')) b.setAttribute('aria-selected', String(b.dataset.tab === name)); + for (const p of group.querySelectorAll('.stab')) p.hidden = p.dataset.tab !== name; + } + }; + let saved = null; + try { saved = localStorage.getItem(KEY); } catch {} + if (saved) pick(saved); + for (const group of subtabs) { + group.addEventListener('click', (e) => { + const b = e.target.closest('.stab-btn'); + if (!b) return; + pick(b.dataset.tab); + try { localStorage.setItem(KEY, b.dataset.tab); } catch {} + }); + } +} + // ---- 7. Tutorial ------------------------------------------------------------ // The Tutorial card on the homepage. The address says which step is open // (#tutorial-). The steps' pages sit side by side; a swipe, a name in From 47aa01ca73956bfa435962b7368477e959843f21 Mon Sep 17 00:00:00 2001 From: Mark Robinson Date: Fri, 20 Nov 2026 14:44:20 -0500 Subject: [PATCH 60/60] Tutorial: each LeRobot command links to its source in the fork A code block that runs a lerobot-* command gets the command's name in its bar, linked to that script in Seeed's LeRobot fork on GitHub. Co-Authored-By: Claude Fable 5.1 --- plugins/yaml_page.py | 19 +++++++++++++++++-- theme/static/css/app.css | 19 ++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/plugins/yaml_page.py b/plugins/yaml_page.py index 13b4337..5df6cba 100644 --- a/plugins/yaml_page.py +++ b/plugins/yaml_page.py @@ -209,6 +209,12 @@ def _read_doc(self, folder, name, listed_in): body = text[heading.end():] if heading else text return {"slug": slug, "id": f"tutorial-{slug}", "file": name, "title": title, "html": self._render_markdown(body)} + # The fork's command-line scripts, and where each one lives. + LEROBOT_SRC = "https://github.com/Seeed-Projects/lerobot/blob/main/src/lerobot/scripts/" + LEROBOT_SCRIPTS = {"lerobot-calibrate", "lerobot-teleoperate", "lerobot-record", "lerobot-replay", + "lerobot-train", "lerobot-eval", "lerobot-dataset-viz", "lerobot-find-cameras", + "lerobot-find-port", "lerobot-setup-motors"} + @staticmethod def _render_markdown(text): """Markdown to HTML, the way GitHub shows it: fenced code blocks (each @@ -268,8 +274,17 @@ def block(m): if "eval_test" in inner: inner = re.sub(r"(--dataset\.num_episodes=)(\d+)\b", lambda f: f.group(1) + field("eval", "num_episodes", f.group(2)), inner) - if inner != m.group(1): - return ('
    Editable fields' + # The LeRobot command the block runs, linked to its source in the + # fork, so each use of a command leads to what it does. + fn = re.search(r"(?m)^(?:]*>)?(lerobot-[a-z-]+)\b", inner) + link = "" + if fn and fn.group(1) in YamlPageGenerator.LEROBOT_SCRIPTS: + link = (f'{fn.group(1)}') + editable = inner != m.group(1) + if editable or link: + tag = 'Editable fields' if editable else "" + return (f'
    {tag}{link}' '
    ' + inner + "
    ") return '
    ' + inner + '
    ' diff --git a/theme/static/css/app.css b/theme/static/css/app.css index 81ae140..d81462e 100644 --- a/theme/static/css/app.css +++ b/theme/static/css/app.css @@ -1408,8 +1408,25 @@ textarea { align-items: center; margin: -2px -2px 0 -2px; } -.code .edit-tag { +.code .cleft { + display: flex; + align-items: center; + gap: 12px; + min-width: 0; padding-left: 14px; +} +/* The command's name, linked to its source. */ +.code .fn { + font-size: 11px; + font-weight: 700; + color: var(--mute); + text-decoration: underline; + text-underline-offset: 2px; +} +.code .fn:hover { + color: var(--ink); +} +.code .edit-tag { font-size: 11px; font-weight: 700; text-transform: uppercase;