-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathviewer-tutorial.html
More file actions
380 lines (370 loc) · 15.7 KB
/
Copy pathviewer-tutorial.html
File metadata and controls
380 lines (370 loc) · 15.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>ManiMux Viewer 使用教程</title>
<style>
:root {
--bg: #f4f6f8;
--panel: #ffffff;
--ink: #18212b;
--muted: #607080;
--line: #dce3e8;
--blue: #1686e8;
--green: #1ea866;
--yellow: #e3a008;
--red: #e34d59;
--navy: #0f1722;
--shadow: 0 18px 48px rgba(19, 34, 49, 0.10);
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
line-height: 1.65;
}
a { color: var(--blue); }
code, pre {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.shell {
width: min(1180px, calc(100% - 32px));
margin: 0 auto;
}
header {
color: white;
background:
radial-gradient(circle at 85% 15%, rgba(22, 134, 232, 0.32), transparent 34%),
linear-gradient(135deg, #0c1521, #172638 72%, #102034);
padding: 64px 0 54px;
}
.eyebrow {
color: #8ecbff;
font-size: 0.82rem;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
}
h1 { margin: 8px 0 12px; font-size: clamp(2.1rem, 5vw, 4.4rem); line-height: 1.08; }
h2 { margin-top: 0; font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { margin-bottom: 0.35rem; }
.lead { max-width: 780px; color: #cfdae5; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button {
display: inline-block;
border: 1px solid rgba(255,255,255,0.22);
border-radius: 10px;
padding: 10px 15px;
color: white;
text-decoration: none;
font-weight: 750;
background: rgba(255,255,255,0.08);
}
.button.primary { background: var(--blue); border-color: var(--blue); }
main { padding: 36px 0 80px; }
section {
margin: 24px 0;
padding: clamp(22px, 4vw, 38px);
border: 1px solid var(--line);
border-radius: 18px;
background: var(--panel);
box-shadow: var(--shadow);
}
.hero-image {
display: block;
width: 100%;
border: 1px solid var(--line);
border-radius: 14px;
margin-top: 24px;
}
.callout {
border-left: 5px solid var(--blue);
border-radius: 10px;
padding: 14px 16px;
background: rgba(22, 134, 232, 0.08);
}
.callout.warn { border-left-color: var(--yellow); background: rgba(227, 160, 8, 0.10); }
.callout.danger { border-left-color: var(--red); background: rgba(227, 77, 89, 0.10); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
border: 1px solid var(--line);
border-radius: 14px;
padding: 18px;
background: color-mix(in srgb, var(--panel) 95%, var(--blue));
}
.step {
display: inline-grid;
place-items: center;
width: 32px;
height: 32px;
margin-right: 8px;
border-radius: 50%;
color: white;
background: var(--blue);
font-weight: 850;
}
pre {
overflow-x: auto;
margin: 12px 0 0;
padding: 15px;
border-radius: 11px;
color: #e8f2fc;
background: var(--navy);
font-size: 0.88rem;
line-height: 1.55;
}
.flow {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
align-items: stretch;
gap: 10px;
margin-top: 18px;
}
.flow div {
position: relative;
min-height: 106px;
border: 1px solid var(--line);
border-radius: 13px;
padding: 14px;
background: var(--panel);
}
.flow div:not(:last-child)::after {
content: "→";
position: absolute;
right: -17px;
top: 34px;
z-index: 2;
color: var(--blue);
font-size: 1.35rem;
font-weight: 900;
}
.tag {
display: inline-block;
border-radius: 999px;
padding: 2px 9px;
color: var(--muted);
background: rgba(96, 112, 128, 0.12);
font-size: 0.78rem;
font-weight: 800;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.04em; }
.status { font-weight: 800; white-space: nowrap; }
.blue { color: var(--blue); }
.green { color: var(--green); }
.yellow { color: var(--yellow); }
.red { color: var(--red); }
details { border-top: 1px solid var(--line); padding: 13px 0; }
summary { cursor: pointer; font-weight: 800; }
footer { padding: 24px 0 46px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
.grid, .grid.three { grid-template-columns: 1fr; }
.flow { grid-template-columns: 1fr; }
.flow div:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -24px; }
}
</style>
</head>
<body>
<header>
<div class="shell">
<div class="eyebrow">ManiMux · Viser operator guide</div>
<h1>Viewer 使用教程</h1>
<p class="lead">
Viewer 负责准备、开始、结束和标注 rollout;模型权重仍由用户在独立终端部署。
当前阶段会自动高亮,不能执行的按钮保持禁用。
</p>
<div class="hero-actions">
<a class="button primary" href="#start">从四个终端开始</a>
<a class="button" href="#flow">查看操作流程</a>
<a class="button" href="../README.md">返回 README</a>
</div>
</div>
</header>
<main class="shell">
<section>
<h2>先理解边界</h2>
<div class="grid three">
<div class="card">
<h3>模型服务</h3>
<p>加载 checkpoint、norm stats 和官方推理代码,监听自己的 WebSocket 端口。</p>
</div>
<div class="card">
<h3>ManiMux Runtime</h3>
<p>连接相机、模型和机器人,执行 Timeline、算法、Safety、Recorder 与 home。</p>
</div>
<div class="card">
<h3>Viewer</h3>
<p>只发送操作请求并展示状态。相机下方的双轨时间线会交替显示正在采样与正在执行的 chunk,并标出 RTC overlap、trim 和被替换的旧尾部。它不会自动加载、切换或杀掉模型服务。</p>
</div>
</div>
<div class="callout warn">
<strong>Task command 是真实模型指令。</strong>它来自 infra config 的
<code>run.task</code>,在 Prepare 前可以编辑;<code>policy_label</code>只是显示名。
</div>
<img class="hero-image" src="../assets/viewer-hero.png" alt="ManiMux Viewer with cameras and dual-arm robot">
</section>
<section id="start">
<h2>四个终端启动</h2>
<p>以下使用 Pi05 红球任务作为示例。真机前仍需完成对应 runbook 的急停、CAN、工作区和 checkpoint 检查。</p>
<div class="grid">
<div class="card">
<h3><span class="step">1</span>Camera</h3>
<pre>cd /home/ubuntu/manimux
envs/yam/.venv/bin/manimux-camera-server \
--config configs/cameras.yaml</pre>
</div>
<div class="card">
<h3><span class="step">2</span>Viewer</h3>
<pre>cd /home/ubuntu/manimux
envs/yam/.venv/bin/manimux-viewer \
--robot yam --host 0.0.0.0 --port 8086</pre>
</div>
<div class="card">
<h3><span class="step">3</span>Policy server</h3>
<pre>cd /home/ubuntu/manimux
XPolicyLab/policy/Pi_05/openpi/.venv/bin/python \
scripts/servers/pi05_yam_server.py \
--config configs/pi05/yam/server/finetune-pick-red-ball-box-step1000.yaml</pre>
</div>
<div class="card">
<h3><span class="step">4</span>Runtime service</h3>
<pre>cd /home/ubuntu/manimux
envs/yam/.venv/bin/manimux serve \
--config configs/pi05/yam/infra/pick-red-ball-box/rtc-step1000.yaml</pre>
</div>
</div>
<div class="callout">
打开 <code>http://localhost:8086</code>。先确认 policy server 已完成加载并监听端口,再点击 Prepare。
<code>manimux serve</code>可以长期保持;一次 rollout 失败后仍会回到等待下一次 Prepare。
</div>
</section>
<section id="flow">
<h2>一次 rollout 的完整流程</h2>
<div class="flow">
<div><span class="tag">1 · READY</span><h3>填写任务</h3><p>确认 Task command;实验模式填写 layout/condition ID。</p></div>
<div><span class="tag">2 · PREPARE</span><h3>选择类型</h3><p>Normal 不要求人工标签;Experiment 结束后必须打标。</p></div>
<div><span class="tag">3 · PAUSED</span><h3>等待就绪</h3><p>模型身份、相机、RobotDriver 和初始状态检查通过后才进入此状态。</p></div>
<div><span class="tag">4 · RUNNING</span><h3>Start rollout</h3><p>Runtime 开始提交模型动作。需要临时保持时使用 Pause / Hold。</p></div>
<div><span class="tag">5 · FINISH</span><h3>Finish & Home</h3><p>停止执行、保存 episode,并执行配置中的 home 路径。</p></div>
</div>
<h3>Normal 与 Experiment</h3>
<table>
<thead><tr><th>模式</th><th>用途</th><th>结束后</th></tr></thead>
<tbody>
<tr><td><strong>Normal rollout</strong></td><td>调试、观察模型、检查链路</td><td>保存轨迹和视频,不强制人工 reward</td></tr>
<tr><td><strong>Experiment rollout</strong></td><td>正式实验或 calibration</td><td>填写 task result、smoothness、reviewer 和失败标签后保存</td></tr>
</tbody>
</table>
<div class="callout warn">
<strong>Pause / Hold 不等于结束。</strong>暂停后 episode 仍然打开,因此不能评分。
只有 <strong>Finish & Home</strong> 完成后,Experiment evaluation 才会启用。
</div>
</section>
<section>
<h2>按钮到底做什么</h2>
<table>
<thead><tr><th>按钮</th><th>效果</th><th>是否结束 episode</th></tr></thead>
<tbody>
<tr><td><strong>Prepare normal rollout</strong></td><td>用当前任务创建普通 rollout,并等待 runtime 进入 PAUSED</td><td>否</td></tr>
<tr><td><strong>Prepare experiment rollout</strong></td><td>创建需要人工评价的 rollout</td><td>否</td></tr>
<tr><td><strong>Start rollout / Resume rollout</strong></td><td>首次开始或从 Pause / Hold 继续</td><td>否</td></tr>
<tr><td><strong>Pause / Hold</strong></td><td>保持当前机器人命令,不回 home,不关闭 episode</td><td>否</td></tr>
<tr><td><strong>Finish & Home</strong></td><td>请求停止、保存并按配置 home</td><td>是</td></tr>
<tr><td><strong>Return Home</strong></td><td>Advanced recovery 中的人工恢复操作;只在暂停状态使用</td><td>否</td></tr>
</tbody>
</table>
</section>
<section>
<h2>状态与故障提示</h2>
<table>
<thead><tr><th>提示</th><th>含义</th><th>下一步</th></tr></thead>
<tbody>
<tr><td class="status yellow">Waiting for runtime</td><td>Viewer 已开,但没有收到 <code>manimux serve</code> 心跳</td><td>启动或检查 runtime service</td></tr>
<tr><td class="status green">Connected · PAUSED</td><td>一次 rollout 已准备好,但尚未执行模型动作</td><td>检查现场后点击 Start rollout</td></tr>
<tr><td class="status red">Connection refused :8500</td><td>Policy worker 无法连接模型服务</td><td>确认模型服务完成加载并监听正确端口;不必重启仍在等待的 serve</td></tr>
<tr><td class="status red">Backend identity mismatch</td><td>端口上的 checkpoint、任务或 norm stats 与 infra config 不一致</td><td>不要继续;部署正确 server config,或选择匹配的 infra config</td></tr>
<tr><td class="status red">Executor heartbeat lost</td><td>当前 runtime 已退出或失联</td><td>确认机器人安全状态;重新启动 serve 会创建新 session</td></tr>
</tbody>
</table>
<div class="callout danger">
<strong><code>kill -9</code> 无法执行清理和 home。</strong>普通 Ctrl-C/SIGTERM 才能进入 ManiMux 的有序停止路径。
无论软件显示什么,重连前都要读取真实关节反馈并确认机器人状态。
</div>
</section>
<section>
<h2>数据保存在哪里</h2>
<p>根目录由 infra config 的 <code>run.output_dir</code> 决定。每次 <code>serve</code> 创建独立 session:</p>
<pre>data/experiments/<task>/<runtime>/
└── session-<timestamp>-<id>/
├── session-manifest.json
└── rollout-001/
├── meta.json
├── result.json
├── data.zarr/
├── videos/
│ ├── index.json
│ └── *.mp4
└── evaluation/
└── human-label.json</pre>
<ul>
<li><code>session-manifest.json</code>保存 config 路径、哈希和 Git revision。</li>
<li><code>data.zarr</code>保存 observation、模型 chunk、命令与实测状态。</li>
<li><code>evaluation/human-label.json</code>只在人工评价保存后出现。</li>
<li>中断产生的 <code>*.partial</code>保留用于诊断,正式汇总时应显式排除。</li>
</ul>
</section>
<section>
<h2>开始前的 20 秒检查</h2>
<div class="grid">
<div class="card">
<h3>软件</h3>
<ul>
<li>三路相机画面正常且没有持续闪烁</li>
<li>Policy server 端口已经 LISTEN</li>
<li>Task command 与本次任务一致</li>
<li>Policy label 与 checkpoint 身份没有混淆</li>
</ul>
</div>
<div class="card">
<h3>现场</h3>
<ul>
<li>急停可触达,工作区无人</li>
<li>物体布局与 layout/condition ID 一致</li>
<li>机器人真实姿态与 Viewer 基本一致</li>
<li>正式实验前完成对应模型 runbook preflight</li>
</ul>
</div>
</div>
</section>
<section>
<h2>常见问题</h2>
<details>
<summary>每次重启 Viewer 都要重启模型服务吗?</summary>
<p>不需要。Viewer、模型服务和 <code>manimux serve</code>是独立进程。只重启 Viewer 不会卸载模型。</p>
</details>
<details>
<summary>修改 Task command 会自动切换权重吗?</summary>
<p>不会。它只改变本次 rollout 发给模型的语言指令。切换训练任务或 checkpoint 仍需部署对应 server config,并使用匹配的 infra config。</p>
</details>
<details>
<summary>为什么 Prepare 是灰色?</summary>
<p>通常是 runtime service 心跳未到、已有 rollout 尚未结束,或 experiment rollout 的人工评价尚未保存。看页面顶部当前阶段提示,不要反复点击。</p>
</details>
<details>
<summary>Finish 后还能继续同一个 rollout 吗?</summary>
<p>不能。Finish 会结束并保存当前 episode。下一次操作从新的 Prepare 开始,并写入新的 rollout 目录。</p>
</details>
</section>
</main>
<footer class="shell">
ManiMux Viewer guide · Operator UI is not a replacement for hardware limits, watchdogs or an emergency stop.
</footer>
</body>
</html>