Spaces:
Running
Running
Uniform pilot names (CablePilot, DronePilot, ArmPilot) under MacroSwan; links to the moved repos
Browse files- README.md +10 -7
- core/model.json +0 -0
- index.html +4 -4
- main.js +1 -1
- tools/export_model.py +2 -2
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: 馃浉
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
|
@@ -7,11 +7,11 @@ sdk: static
|
|
| 7 |
pinned: true
|
| 8 |
license: mit
|
| 9 |
short_description: Write a drone's task card; a 5.6k-param world model flies it
|
| 10 |
-
thumbnail: https://huggingface.co/spaces/
|
| 11 |
models:
|
| 12 |
-
-
|
| 13 |
datasets:
|
| 14 |
-
-
|
| 15 |
tags:
|
| 16 |
- robotics
|
| 17 |
- world-model
|
|
@@ -23,7 +23,7 @@ tags:
|
|
| 23 |
- embodied-ai
|
| 24 |
---
|
| 25 |
|
| 26 |
-
# SkyJEPA task card
|
| 27 |
|
| 28 |
A 1.3 kg quadrotor carries a 5.6k-parameter SkyJEPA world model. The model learned only the drone's own dynamics,
|
| 29 |
without any task. **You write the task**, in 3D:
|
|
@@ -43,7 +43,7 @@ Everything runs in your browser on one CPU thread. There is no server and no GPU
|
|
| 43 |
|
| 44 |
Goals and costs carry the task. The world model knows its body, never the mission. The same frozen model flies any
|
| 45 |
card, so changing the task means editing a card, not training. This is the architecture behind
|
| 46 |
-
[
|
| 47 |
the aircraft it started from.
|
| 48 |
|
| 49 |
Inspired by **SkyJEPA** (Rao, Zhang, Balestriero, LeCun, Loianno, *Learning Long-Horizon World Models for Zero-Shot
|
|
@@ -53,7 +53,7 @@ Sim-to-Real Control of Quadrotors*, [arXiv:2606.23444](https://arxiv.org/abs/260
|
|
| 53 |
|
| 54 |
| | |
|
| 55 |
|---|---|
|
| 56 |
-
| **World model** | [
|
| 57 |
| **Planner** | MPPI, from dronepilot's `core/mppi.py` with `configs/skyjepa_quad/mppi.yaml`: 256 samples, a 1 s horizon, an ESS-solved temperature and a light pull to hover. |
|
| 58 |
| **Nerve** | dronepilot's `core/nerve.py`: what the model failed to predict over the last 0.25 s, integrated into a felt acceleration that the next plans carry (gain 0.3). Without it this model settles about 0.7 m off a goal. The model itself stays frozen. |
|
| 59 |
| **Drone** | The 1.3 kg X-quad the model was trained for, simulated in your browser: 1 ms RK4, motor lag, drag. It matches the Python plant to 1e-14. The model never sees this code, only the states it produces. |
|
|
@@ -80,3 +80,6 @@ python3 -m http.server 8768 # then open http://127.0.0.1:8768
|
|
| 80 |
node tools/test.mjs
|
| 81 |
node tools/run_headless.mjs 1 2 3
|
| 82 |
```
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: DronePilot
|
| 3 |
emoji: 馃浉
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
|
|
|
| 7 |
pinned: true
|
| 8 |
license: mit
|
| 9 |
short_description: Write a drone's task card; a 5.6k-param world model flies it
|
| 10 |
+
thumbnail: https://huggingface.co/spaces/MacroSwan/DronePilot/resolve/main/thumbnail.png
|
| 11 |
models:
|
| 12 |
+
- MacroSwan/skyjepa
|
| 13 |
datasets:
|
| 14 |
+
- MacroSwan/skyjepa-quadrotor-sim
|
| 15 |
tags:
|
| 16 |
- robotics
|
| 17 |
- world-model
|
|
|
|
| 23 |
- embodied-ai
|
| 24 |
---
|
| 25 |
|
| 26 |
+
# DronePilot: the SkyJEPA task card
|
| 27 |
|
| 28 |
A 1.3 kg quadrotor carries a 5.6k-parameter SkyJEPA world model. The model learned only the drone's own dynamics,
|
| 29 |
without any task. **You write the task**, in 3D:
|
|
|
|
| 43 |
|
| 44 |
Goals and costs carry the task. The world model knows its body, never the mission. The same frozen model flies any
|
| 45 |
card, so changing the task means editing a card, not training. This is the architecture behind
|
| 46 |
+
[DronePilot](https://huggingface.co/spaces/MacroSwan/DronePilot), [CablePilot](https://huggingface.co/spaces/MacroSwan/CablePilot) and [ArmPilot](https://huggingface.co/spaces/MacroSwan/ArmPilot). Here it is reduced to
|
| 47 |
the aircraft it started from.
|
| 48 |
|
| 49 |
Inspired by **SkyJEPA** (Rao, Zhang, Balestriero, LeCun, Loianno, *Learning Long-Horizon World Models for Zero-Shot
|
|
|
|
| 53 |
|
| 54 |
| | |
|
| 55 |
|---|---|
|
| 56 |
+
| **World model** | [MacroSwan/skyjepa](https://huggingface.co/MacroSwan/skyjepa), our clean-room reimplementation (full profile, 5k domain-randomized flights). Two causal TCN encoders, a GRU latent predictor and a physics prober that corrects an SO(3) rigid body. It is ported to JavaScript and matches PyTorch to 6e-6 (`tools/test.mjs`). |
|
| 57 |
| **Planner** | MPPI, from dronepilot's `core/mppi.py` with `configs/skyjepa_quad/mppi.yaml`: 256 samples, a 1 s horizon, an ESS-solved temperature and a light pull to hover. |
|
| 58 |
| **Nerve** | dronepilot's `core/nerve.py`: what the model failed to predict over the last 0.25 s, integrated into a felt acceleration that the next plans carry (gain 0.3). Without it this model settles about 0.7 m off a goal. The model itself stays frozen. |
|
| 59 |
| **Drone** | The 1.3 kg X-quad the model was trained for, simulated in your browser: 1 ms RK4, motor lag, drag. It matches the Python plant to 1e-14. The model never sees this code, only the states it produces. |
|
|
|
|
| 80 |
node tools/test.mjs
|
| 81 |
node tools/run_headless.mjs 1 2 3
|
| 82 |
```
|
| 83 |
+
|
| 84 |
+
The pilots: [CablePilot](https://huggingface.co/spaces/MacroSwan/CablePilot) (a cable robot clears a playroom) 路 [DronePilot](https://huggingface.co/spaces/MacroSwan/DronePilot) (a quadrotor flies your task card) 路 [ArmPilot](https://huggingface.co/spaces/MacroSwan/ArmPilot) (an SO-101 puts a pen in a cup).
|
| 85 |
+
Part of [MacroSwan](https://huggingface.co/MacroSwan): small world models and planning, with their compute bill.
|
core/model.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
| 6 |
-
<title>SkyJEPA Task Card</title>
|
| 7 |
<meta name="description" content="Write a task card for a quadrotor: rings to pass, a goal, obstacles as costs. A 5.6k-parameter SkyJEPA world model imagines 256 futures every 50 ms and flies the cheapest.">
|
| 8 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
@@ -43,7 +43,7 @@
|
|
| 43 |
|
| 44 |
<aside class="panel">
|
| 45 |
<header>
|
| 46 |
-
<p class="mark">
|
| 47 |
<h1>Write the task. The world model flies it.</h1>
|
| 48 |
<p class="lede">A 1.3 kg quadrotor carries a 5.6k-parameter SkyJEPA world model that only knows its own dynamics, and nothing about any task. You write the task card: <b class="g">rings</b> to fly through and a <b class="g">goal</b> are goals, and <b class="c">obstacles</b> are costs. Every 50 ms the drone imagines 256 futures and flies the cheapest. Edit the card mid-flight and watch the plan bend.</p>
|
| 49 |
</header>
|
|
@@ -110,8 +110,8 @@
|
|
| 110 |
|
| 111 |
<footer class="fine">
|
| 112 |
<p><b>Inspired by SkyJEPA</b> (Rao, Zhang, Balestriero, LeCun, Loianno, <a href="https://arxiv.org/abs/2606.23444" target="_blank" rel="noopener">arXiv:2606.23444</a>). A world model learns a quadrotor's dynamics in latent space, without any task, and a sampling planner flies it. The task lives only in the cost.</p>
|
| 113 |
-
<p><b>World model:</b> our clean-room reimplementation, <a href="https://huggingface.co/
|
| 114 |
-
<p><b>
|
| 115 |
</footer>
|
| 116 |
</aside>
|
| 117 |
</main>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
| 6 |
+
<title>DronePilot: SkyJEPA Task Card</title>
|
| 7 |
<meta name="description" content="Write a task card for a quadrotor: rings to pass, a goal, obstacles as costs. A 5.6k-parameter SkyJEPA world model imagines 256 futures every 50 ms and flies the cheapest.">
|
| 8 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
|
|
| 43 |
|
| 44 |
<aside class="panel">
|
| 45 |
<header>
|
| 46 |
+
<p class="mark">MacroSwan <span>路</span> DronePilot</p>
|
| 47 |
<h1>Write the task. The world model flies it.</h1>
|
| 48 |
<p class="lede">A 1.3 kg quadrotor carries a 5.6k-parameter SkyJEPA world model that only knows its own dynamics, and nothing about any task. You write the task card: <b class="g">rings</b> to fly through and a <b class="g">goal</b> are goals, and <b class="c">obstacles</b> are costs. Every 50 ms the drone imagines 256 futures and flies the cheapest. Edit the card mid-flight and watch the plan bend.</p>
|
| 49 |
</header>
|
|
|
|
| 110 |
|
| 111 |
<footer class="fine">
|
| 112 |
<p><b>Inspired by SkyJEPA</b> (Rao, Zhang, Balestriero, LeCun, Loianno, <a href="https://arxiv.org/abs/2606.23444" target="_blank" rel="noopener">arXiv:2606.23444</a>). A world model learns a quadrotor's dynamics in latent space, without any task, and a sampling planner flies it. The task lives only in the cost.</p>
|
| 113 |
+
<p><b>World model:</b> our clean-room reimplementation, <a href="https://huggingface.co/MacroSwan/skyjepa" target="_blank" rel="noopener">MacroSwan/skyjepa</a> (full profile, 5k domain-randomized flights), ported to JavaScript. It matches PyTorch to 6e-6. A small residual observer corrects its steady bias in flight. <b>Drone:</b> the 1.3 kg quad it was trained for, simulated in your browser (1 ms rigid-body steps, motor lag, drag). The model never sees that code, only the states it produces.</p>
|
| 114 |
+
<p><b>The pilots:</b> <a href="https://huggingface.co/spaces/MacroSwan/CablePilot" target="_blank" rel="noopener">CablePilot</a> (a cable robot clears a playroom) 路 <b>DronePilot</b> (a quadrotor flies your task card) 路 <a href="https://huggingface.co/spaces/MacroSwan/ArmPilot" target="_blank" rel="noopener">ArmPilot</a> (an SO-101 puts a pen in a cup). The same idea on three bodies, by <a href="https://huggingface.co/MacroSwan" target="_blank" rel="noopener">MacroSwan</a>: small world models and planning, with their compute bill. More bodies, papers and models: <a href="https://huggingface.co/spaces/edgarmoreau/world-models" target="_blank" rel="noopener">World Models. Embodied AI.</a> Everything here runs on one CPU thread, with no server and no GPU.</p>
|
| 115 |
</footer>
|
| 116 |
</aside>
|
| 117 |
</main>
|
main.js
CHANGED
|
@@ -252,7 +252,7 @@ function renderYaml() {
|
|
| 252 |
L.push(`<span class="cm"># own dynamics, never this card.</span>`);
|
| 253 |
L.push(`<span class="k">task:</span> my_course`);
|
| 254 |
L.push(`<span class="k">body:</span> skyjepa_quad`);
|
| 255 |
-
L.push(`<span class="k">world_model:</span>
|
| 256 |
L.push(`<span class="k">objects:</span>`);
|
| 257 |
L.push(` start: {at: ${P(card.start)}}`);
|
| 258 |
card.rings.forEach(r => L.push(` <span class="g">${n[r.id]}</span>: {kind: ring, at: ${P(r.p)}, radius: ${r1(r.r)}}`));
|
|
|
|
| 252 |
L.push(`<span class="cm"># own dynamics, never this card.</span>`);
|
| 253 |
L.push(`<span class="k">task:</span> my_course`);
|
| 254 |
L.push(`<span class="k">body:</span> skyjepa_quad`);
|
| 255 |
+
L.push(`<span class="k">world_model:</span> MacroSwan/skyjepa`);
|
| 256 |
L.push(`<span class="k">objects:</span>`);
|
| 257 |
L.push(` start: {at: ${P(card.start)}}`);
|
| 258 |
card.rings.forEach(r => L.push(` <span class="g">${n[r.id]}</span>: {kind: ring, at: ${P(r.p)}, radius: ${r1(r.r)}}`));
|
tools/export_model.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""Export the SkyJEPA 5k reference (dronepilot models/skyjepa_quad/full = HF
|
| 2 |
plus a PyTorch rollout the JS port is checked against (tools/test.mjs).
|
| 3 |
|
| 4 |
cd ~/Projects/dronepilot && uv run python ../pilothub/skyjepa-course/tools/export_model.py
|
|
@@ -19,7 +19,7 @@ pk = torch.load(CK / "prober.pt", map_location="cpu", weights_only=False)
|
|
| 19 |
t = lambda v: np.asarray(v.detach().float()).round(8).tolist() # noqa: E731
|
| 20 |
model = {"jepa": {k: t(v) for k, v in jk["model"].items()}, "prober": {k: t(v) for k, v in pk["prober"].items()},
|
| 21 |
"norm": {k: t(v) for k, v in jk["normalizer"].items()}, "history": int(jk["config"].get("history", 10)),
|
| 22 |
-
"source": "
|
| 23 |
(OUT / "core/model.json").write_text(json.dumps(model))
|
| 24 |
|
| 25 |
# a short real flight on the plant, then a model rollout of random plans from there
|
|
|
|
| 1 |
+
"""Export the SkyJEPA 5k reference (dronepilot models/skyjepa_quad/full = HF MacroSwan/skyjepa) to JSON for the browser,
|
| 2 |
plus a PyTorch rollout the JS port is checked against (tools/test.mjs).
|
| 3 |
|
| 4 |
cd ~/Projects/dronepilot && uv run python ../pilothub/skyjepa-course/tools/export_model.py
|
|
|
|
| 19 |
t = lambda v: np.asarray(v.detach().float()).round(8).tolist() # noqa: E731
|
| 20 |
model = {"jepa": {k: t(v) for k, v in jk["model"].items()}, "prober": {k: t(v) for k, v in pk["prober"].items()},
|
| 21 |
"norm": {k: t(v) for k, v in jk["normalizer"].items()}, "history": int(jk["config"].get("history", 10)),
|
| 22 |
+
"source": "MacroSwan/skyjepa (full profile, 5k trajectories): clean-room SkyJEPA, Rao et al. 2026, arXiv:2606.23444"}
|
| 23 |
(OUT / "core/model.json").write_text(json.dumps(model))
|
| 24 |
|
| 25 |
# a short real flight on the plant, then a model rollout of random plans from there
|