{
 "原理:話題、服務、動作與 QoS 的設計取捨#1": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "topic",
    "points": [
     "像電台廣播",
     "開了就聽,沒開就錯過",
     "電台不在乎你有沒有聽"
    ]
   },
   {
    "title": "服務",
    "points": [
     "像去櫃台辦事",
     "遞出申請,在旁邊等",
     "櫃台處理完把結果交給你"
    ]
   },
   {
    "title": "動作",
    "points": [
     "像叫外送",
     "持續回報備餐中、配送中",
     "可中途取消,最後送達或失敗"
    ]
   }
  ]
 },
 "原理:話題、服務、動作與 QoS 的設計取捨#2": {
  "type": "table",
  "head": [
   "方式",
   "設計理由"
  ],
  "rows": [
   [
    "topic",
    "連續狀態,單向、多對多、開銷低"
   ],
   [
    "服務",
    "一問一答,呼叫端會等待回應"
   ],
   [
    "動作",
    "長時間任務,服務加回饋 topic"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "widths": [
   1,
   3
  ]
 },
 "原理:話題、服務、動作與 QoS 的設計取捨#3": {
  "type": "flow",
  "reveal": [
   0,
   3
  ],
  "nodes": [
   {
    "label": "目標被接受",
    "color": 1
   },
   {
    "label": "執行中",
    "sub": "持續回饋,可被取消",
    "color": 0
   },
   {
    "label": "三種結局",
    "sub": "成功、已取消、中止",
    "color": 2
   }
  ]
 },
 "原理:話題、服務、動作與 QoS 的設計取捨#4": {
  "type": "table",
  "head": [
   "資料",
   "適合的 QoS"
  ],
  "rows": [
   [
    "感測器資料",
    "best effort 加小佇列"
   ],
   [
    "地圖",
    "reliable 加 transient local"
   ],
   [
    "速度指令",
    "介於兩者之間"
   ]
  ],
  "reveal": [
   0,
   3,
   3
  ],
  "widths": [
   1,
   2
  ]
 },
 "原理:話題、服務、動作與 QoS 的設計取捨#5": {
  "type": "table",
  "head": [
   "發布者",
   "訂閱者",
   "結果"
  ],
  "rows": [
   [
    "reliable",
    "best effort",
    "可連線"
   ],
   [
    "best effort",
    "reliable",
    "不相容"
   ],
   [
    "volatile",
    "transient local",
    "不相容"
   ],
   [
    "transient local",
    "volatile",
    "可連線"
   ]
  ],
  "reveal": [
   0,
   4
  ],
  "widths": [
   1,
   1,
   1
  ]
 },
 "原理:話題、服務、動作與 QoS 的設計取捨#6": {
  "type": "bar",
  "labels": [
   "深度 10",
   "深度 1"
  ],
  "values": [
   1,
   0.1
  ],
  "unit": "秒",
  "reveal": [
   0,
   0,
   1,
   2
  ],
  "highlight": 0
 },
 "原理:話題、服務、動作與 QoS 的設計取捨#7": {
  "type": "table",
  "head": [
   "常見迷思",
   "事實"
  ],
  "rows": [
   [
    "reliable 一定比較好",
    "重送增加延遲,佇列可能堆積"
   ],
   [
    "用服務傳影像比較方便",
    "服務是一問一答,不適合連續資料"
   ],
   [
    "動作取消機器人就立刻停",
    "取消只是請求,安全停止要靠急停"
   ],
   [
    "QoS 預設值",
    "依版本而異,用 topic info 加 verbose"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "widths": [
   1.2,
   1.8
  ]
 },
 "節點與話題:rclpy 發布者與訂閱者#1": {
  "type": "flow",
  "reveal": [
   0,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "發布者 node",
    "sub": "不知道誰在聽"
   },
   {
    "label": "topic",
    "sub": "交換資料的地方"
   },
   {
    "label": "訂閱者 node",
    "sub": "不知道誰在講"
   }
  ]
 },
 "節點與話題:rclpy 發布者與訂閱者#2": {
  "type": "flow",
  "reveal": [
   0,
   3
  ],
  "nodes": [
   {
    "label": "雷達與遙控 node",
    "sub": "發布資料"
   },
   {
    "label": "安全 node",
    "sub": "所有速度指令的關卡"
   },
   {
    "label": "底盤驅動 node",
    "sub": "最右邊"
   }
  ]
 },
 "節點與話題:rclpy 發布者與訂閱者#3": {
  "type": "table",
  "head": [
   "重點",
   "內容"
  ],
  "rows": [
   [
    "訊息型別",
    "std_msgs 的 String"
   ],
   [
    "型別規則",
    "發布者與訂閱者必須相同"
   ],
   [
    "查看欄位",
    "interface show"
   ],
   [
    "String 欄位",
    "只有一個 data 字串"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "widths": [
   1,
   2
  ]
 },
 "節點與話題:rclpy 發布者與訂閱者#4": {
  "type": "flow",
  "reveal": [
   0,
   0,
   2,
   3,
   4,
   4
  ],
  "nodes": [
   {
    "label": "建立發布者",
    "sub": "chatter、String、深度 10"
   },
   {
    "label": "建立計時器",
    "sub": "每 0.5 秒呼叫回呼"
   },
   {
    "label": "計時回呼",
    "sub": "hello 加計數、發布、印日誌"
   },
   {
    "label": "main",
    "sub": "初始化、spin、Ctrl C 收尾"
   }
  ]
 },
 "節點與話題:rclpy 發布者與訂閱者#7": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "nodes": [
   {
    "label": "建立訂閱者",
    "sub": "String、chatter、深度 10"
   },
   {
    "label": "收到訊息的回呼",
    "sub": "把內容印到日誌"
   },
   {
    "label": "回呼別做太久",
    "sub": "單執行緒一次一個回呼"
   }
  ]
 },
 "服務、動作與參數:什麼時候用哪一種#1": {
  "type": "table",
  "head": [
   "方式",
   "用途",
   "例子"
  ],
  "rows": [
   [
    "topic",
    "持續資料流",
    "雷達掃描、里程計、速度指令"
   ],
   [
    "服務",
    "一次性、短時間",
    "清除地圖、查詢模式、儲存設定"
   ],
   [
    "動作",
    "長時間任務",
    "導航到某一點"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ],
  "widths": [
   0.8,
   1.2,
   2
  ]
 },
 "服務、動作與參數:什麼時候用哪一種#3": {
  "type": "table",
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "service list -t",
    "列出所有服務和型別"
   ],
   [
    "service call clear",
    "把畫面上的軌跡清掉"
   ],
   [
    "service call spawn",
    "帶入位置和名字,生出第二隻烏龜"
   ]
  ],
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   3
  ],
  "widths": [
   1,
   1.6
  ]
 },
 "服務、動作與參數:什麼時候用哪一種#4": {
  "type": "flow",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4,
   4
  ],
  "nodes": [
   {
    "label": "伺服器",
    "sub": "create_service、add_two_ints"
   },
   {
    "label": "處理函式",
    "sub": "a 加 b 放進 sum 回傳"
   },
   {
    "label": "客戶端",
    "sub": "建立 client,等服務上線"
   },
   {
    "label": "call_async",
    "sub": "填入 a、b,取回 sum"
   }
  ]
 },
 "服務、動作與參數:什麼時候用哪一種#5": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   4
  ],
  "nodes": [
   {
    "label": "AddTwoInts",
    "sub": "example_interfaces 的服務型別"
   },
   {
    "label": "AddServer",
    "sub": "負責回答加法"
   },
   {
    "label": "AddClient",
    "sub": "負責送出請求"
   },
   {
    "label": "驗證",
    "sub": "a=3、b=4,sum 應為 7"
   }
  ]
 },
 "服務、動作與參數:什麼時候用哪一種#6": {
  "type": "flow",
  "reveal": [
   0,
   1,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "action send_goal",
    "sub": "送出旋轉目標"
   },
   {
    "label": "持續回饋",
    "sub": "剩餘角度"
   },
   {
    "label": "最後結果",
    "sub": "到達指定角度"
   }
  ]
 },
 "服務、動作與參數:什麼時候用哪一種#7": {
  "type": "table",
  "head": [
   "做法",
   "說明"
  ],
  "rows": [
   [
    "declare_parameter",
    "宣告參數並給預設值"
   ],
   [
    "get_parameter",
    "取出來用"
   ],
   [
    "param list",
    "列出參數"
   ],
   [
    "param get",
    "讀取 turtlesim 背景紅色值"
   ],
   [
    "param set",
    "修改它,背景顏色跟著變"
   ]
  ],
  "reveal": [
   0,
   0,
   2,
   3,
   4,
   5
  ],
  "widths": [
   1,
   1.6
  ]
 },
 "QoS:為什麼訊息「明明有發卻收不到」#1": {
  "type": "flow",
  "reveal": [
   0,
   1,
   3
  ],
  "nodes": [
   {
    "label": "QoS 是通訊規則",
    "sub": "每個發布者和訂閱者各自設定"
   },
   {
    "label": "雙方規則不相容",
    "sub": "連線靜默失敗"
   },
   {
    "label": "node 都正常",
    "sub": "卻互相收不到資料"
   }
  ]
 },
 "QoS:為什麼訊息「明明有發卻收不到」#2": {
  "type": "table",
  "head": [
   "設定",
   "選項"
  ],
  "rows": [
   [
    "可靠性",
    "reliable 重送保證送到;best effort 盡力、延遲低"
   ],
   [
    "持久性",
    "volatile 只給當下訂閱者;transient local 保留最後幾筆"
   ],
   [
    "歷史與深度",
    "keep last 加深度 N,或 keep all"
   ],
   [
    "雷達、相機",
    "驅動通常用 best effort"
   ],
   [
    "地圖 topic",
    "transient local,晚開的 RViz2 也拿得到"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "widths": [
   1,
   3.2
  ]
 },
 "QoS:為什麼訊息「明明有發卻收不到」#3": {
  "type": "table",
  "head": [
   "發布者",
   "訂閱者",
   "結果"
  ],
  "rows": [
   [
    "reliable",
    "best effort",
    "可以連線"
   ],
   [
    "best effort",
    "reliable",
    "不相容"
   ],
   [
    "volatile",
    "transient local",
    "不相容"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "widths": [
   1,
   1,
   1
  ]
 },
 "QoS:為什麼訊息「明明有發卻收不到」#7": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   2
  ],
  "cards": [
   {
    "title": "方式一",
    "points": [
     "直接用感測器資料的現成設定",
     "用來訂閱雷達 scan"
    ]
   },
   {
    "title": "方式二:自訂",
    "points": [
     "深度 1",
     "reliable",
     "transient local",
     "keep last"
    ],
    "value": "拿得到晚開時錯過的地圖"
   }
  ]
 }
}