{
 "原理:里程計誤差如何累積,格子搜尋如何找路#2": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   2,
   5,
   5,
   5,
   5
  ],
  "nodes": [
   {
    "label": "上一步位置",
    "color": 1
   },
   {
    "label": "加上新位移",
    "sub": "Δs 與 Δθ",
    "color": 0
   },
   {
    "label": "誤差留在起點",
    "color": 4
   },
   {
    "label": "沒東西拉回",
    "sub": "誤差只增不減",
    "color": 3
   },
   {
    "label": "航向誤差",
    "sub": "之後位移都偏",
    "color": 4,
    "kind": "end"
   }
  ]
 },
 "原理:里程計誤差如何累積,格子搜尋如何找路#3": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   1,
   3
  ],
  "nodes": [
   {
    "label": "x 更新",
    "sub": "x + Δs·cos θ",
    "color": 1
   },
   {
    "label": "y 更新",
    "sub": "y + Δs·sin θ",
    "color": 0
   },
   {
    "label": "θ 更新",
    "sub": "θ + Δθ",
    "color": 2,
    "kind": "end"
   }
  ]
 },
 "原理:里程計誤差如何累積,格子搜尋如何找路#4": {
  "type": "bar",
  "labels": [
   "航向誤差 1°",
   "航向誤差 5°"
  ],
  "values": [
   3.5,
   17.4
  ],
  "unit": "cm",
  "reveal": [
   1,
   2
  ],
  "highlight": 1
 },
 "原理:里程計誤差如何累積,格子搜尋如何找路#5": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   2,
   2,
   6,
   6
  ],
  "nodes": [
   {
    "label": "切成格子",
    "sub": "0 可走、1 障礙",
    "color": 1
   },
   {
    "label": "BFS 擴散",
    "sub": "一圈圈往外",
    "color": 0
   },
   {
    "label": "碰到終點",
    "sub": "最短 11 步",
    "color": 3
   },
   {
    "label": "路徑長",
    "sub": "每格 10 cm,約 110 cm",
    "color": 2
   },
   {
    "label": "轉彎處當路徑點",
    "color": 4
   },
   {
    "label": "交給 go to",
    "color": 1,
    "kind": "end"
   }
  ]
 },
 "里程計導航與簡單路徑規劃#2": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   5
  ],
  "nodes": [
   {
    "label": "算 dx、dy",
    "sub": "目標 − 目前",
    "color": 1
   },
   {
    "label": "目標方向角",
    "sub": "atan2 換成度",
    "color": 0
   },
   {
    "label": "要轉的角度",
    "sub": "方向角 − 航向,正規化",
    "color": 3
   },
   {
    "label": "原地轉向",
    "color": 2
   },
   {
    "label": "直線前進",
    "sub": "√(dx²+dy²)",
    "color": 4,
    "kind": "end"
   }
  ]
 },
 "里程計導航與簡單路徑規劃#4": {
  "type": "table",
  "head": [
   "項目",
   "內容"
  ],
  "rows": [
   [
    "車子位置",
    "(30, 100)"
   ],
   [
    "航向",
    "0°"
   ],
   [
    "目標",
    "(110, 150)"
   ],
   [
    "正規化",
    "(差 + 540) 取餘 360 − 180"
   ]
  ],
  "reveal": [
   3,
   4,
   4,
   4
  ]
 },
 "里程計導航與簡單路徑規劃#5": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "dx、dy",
    "sub": "80、50",
    "color": 1
   },
   {
    "label": "方向角",
    "sub": "atan2(50, 80) = 32°",
    "color": 0
   },
   {
    "label": "要轉角度",
    "sub": "32 − 0 = 32°,向左轉",
    "color": 3
   },
   {
    "label": "距離",
    "sub": "√8900 約 94.3 cm",
    "color": 2,
    "kind": "end"
   }
  ]
 },
 "任務排程與行為樹概念#1": {
  "type": "table",
  "head": [
   "任務",
   "座標 (x, y)"
  ],
  "rows": [
   [
    "A",
    "(110, 150)"
   ],
   [
    "B",
    "(230, 150)"
   ],
   [
    "C",
    "(230, 50)"
   ]
  ],
  "reveal": [
   0,
   0,
   0,
   3,
   3,
   3,
   3
  ]
 },
 "任務排程與行為樹概念#3": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "動作",
    "points": [
     "做一件事",
     "例如前往下一點"
    ]
   },
   {
    "title": "條件",
    "points": [
     "檢查一件事",
     "例如電量低於 20%"
    ]
   },
   {
    "title": "序列 Sequence",
    "points": [
     "依序執行子節點",
     "任一失敗就失敗,像 AND"
    ]
   },
   {
    "title": "選擇 Selector",
    "points": [
     "依序嘗試子節點",
     "第一個成功就成功,像 OR"
    ]
   }
  ]
 },
 "任務排程與行為樹概念#4": {
  "type": "flow",
  "layout": "col",
  "reveal": [
   1,
   4,
   4,
   4
  ],
  "nodes": [
   {
    "label": "根節點:選擇",
    "sub": "每輪從這裡 tick",
    "color": 1
   },
   {
    "label": "1 安全處理(序列)",
    "sub": "電量低 → 停車回報",
    "color": 4
   },
   {
    "label": "2 巡邏(序列)",
    "sub": "有點 → 前往並記錄",
    "color": 3
   },
   {
    "label": "3 待命(動作)",
    "sub": "沒事就停車",
    "color": 2,
    "kind": "end"
   }
  ]
 },
 "遠端監控、日誌與更新#2": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   1,
   4
  ],
  "nodes": [
   {
    "label": "機器人",
    "sub": "服務、日誌、唯讀狀態網頁",
    "color": 1
   },
   {
    "label": "區域網路",
    "color": 0
   },
   {
    "label": "電腦或手機",
    "sub": "瀏覽器看狀態,SSH 金鑰維護",
    "color": 3
   },
   {
    "label": "控制埠不暴露到網際網路",
    "color": 4,
    "kind": "end"
   }
  ]
 },
 "遠端監控、日誌與更新#3": {
  "type": "cards",
  "reveal": [
   0,
   1,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "要記錄",
    "points": [
     "狀態轉換、感測器異常",
     "電量",
     "任務開始與結果",
     "被拒絕的指令"
    ]
   },
   {
    "title": "限制大小",
    "points": [
     "RotatingFileHandler",
     "限制大小與份數",
     "避免寫滿 SD 卡"
    ]
   },
   {
    "title": "不要寫入",
    "points": [
     "金鑰",
     "他人的隱私資訊"
    ]
   }
  ]
 },
 "遠端監控、日誌與更新#5": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   3,
   3
  ],
  "nodes": [
   {
    "label": "收到 GET 請求",
    "color": 1
   },
   {
    "label": "檢查標頭 token",
    "sub": "不能是空的",
    "color": 3
   },
   {
    "label": "回傳 JSON 狀態",
    "sub": "不對就回傳禁止",
    "color": 2,
    "kind": "end"
   }
  ]
 }
}