{
 "原理:物理模擬的時間步進與即時因子#1": {
  "type": "flow",
  "reveal": [
   0,
   1,
   4
  ],
  "nodes": [
   {
    "label": "翻頁動畫",
    "sub": "一張張靜止畫面"
   },
   {
    "label": "切成小時間步"
   },
   {
    "label": "每步依力算",
    "sub": "新的速度與位置"
   },
   {
    "label": "模擬時間",
    "sub": "不等於手錶時間"
   }
  ]
 },
 "原理:物理模擬的時間步進與即時因子#2": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "一個模擬步驟",
    "points": [
     "讀取最新的 cmd_vel",
     "物理引擎推進一個時間步",
     "感測器模型產生資料",
     "發布 topic 與 clock"
    ]
   },
   {
    "title": "都用模擬時間",
    "points": [
     "整個系統時間一致",
     "暫停模擬時整個機器人系統也暫停"
    ]
   }
  ]
 },
 "原理:物理模擬的時間步進與即時因子#3": {
  "type": "flow",
  "layout": "cycle",
  "reveal": [
   0,
   5
  ],
  "nodes": [
   {
    "label": "讀取速度指令"
   },
   {
    "label": "物理步進"
   },
   {
    "label": "產生感測器資料"
   },
   {
    "label": "發布 topic 與時鐘"
   },
   {
    "label": "模擬時間前進一步"
   }
  ]
 },
 "原理:物理模擬的時間步進與即時因子#4": {
  "type": "table",
  "head": [
   "項目",
   "內容"
  ],
  "rows": [
   [
    "歐拉法",
    "速度加加速度×時間;位置加速度×時間"
   ],
   [
    "自由落體",
    "加速度 9.8,精確解 1 秒下落 4.9 公尺"
   ],
   [
    "時間步 0.1 秒",
    "十步後 4.41 公尺,少 0.49 約 10%"
   ],
   [
    "時間步 0.01 秒",
    "誤差縮小約 10 倍"
   ],
   [
    "代價",
    "步長越小,每秒要算的步數越多"
   ]
  ],
  "reveal": [
   0,
   1,
   4,
   5
  ],
  "widths": [
   1,
   2.6
  ]
 },
 "原理:物理模擬的時間步進與即時因子#5": {
  "type": "bar",
  "labels": [
   "精確解",
   "步長 0.1 秒"
  ],
  "values": [
   4.9,
   4.41
  ],
  "unit": "公尺",
  "reveal": [
   0,
   2
  ],
  "highlight": 1
 },
 "原理:物理模擬的時間步進與即時因子#6": {
  "type": "flow",
  "reveal": [
   0,
   4,
   4
  ],
  "nodes": [
   {
    "label": "步長 1 毫秒"
   },
   {
    "label": "每秒要算",
    "sub": "1000 步"
   },
   {
    "label": "電腦花 2 秒",
    "sub": "才算完"
   },
   {
    "label": "RTF = 0.5",
    "sub": "模擬比現實慢一倍"
   }
  ]
 },
 "原理:物理模擬的時間步進與即時因子#7": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "模擬器的理想化",
    "points": [
     "摩擦係數是設定值",
     "馬達沒有電壓降",
     "感測器雜訊是理想高斯",
     "通訊沒有延遲和掉包"
    ]
   },
   {
    "title": "記住這句話",
    "points": [
     "模擬可驗證邏輯與流程",
     "不能驗證安全"
    ]
   }
  ]
 },
 "Gazebo 模擬:虛擬世界裡的機器人#1": {
  "type": "cards",
  "reveal": [
   0,
   2,
   3
  ],
  "cards": [
   {
    "title": "真機測試",
    "points": [
     "要充電、清場",
     "擔心撞壞",
     "一次只能一個人用"
    ]
   },
   {
    "title": "模擬",
    "points": [
     "重複測試相同場景",
     "快速試錯",
     "安全測試撞牆、掉線"
    ]
   },
   {
    "title": "缺點",
    "points": [
     "沒有馬達打滑、雷達反光",
     "沒有電源與 Wi-Fi 延遲"
    ]
   }
  ]
 },
 "Gazebo 模擬:虛擬世界裡的機器人#2": {
  "type": "table",
  "head": [
   "項目",
   "內容"
  ],
  "rows": [
   [
    "Gazebo",
    "物理引擎、感測器模擬、3D 場景"
   ],
   [
    "與 ROS 2 交換",
    "scan、odom、cmd_vel、TF、clock"
   ],
   [
    "Humble 時代",
    "Gazebo Classic 加 gazebo_ros_pkgs(已停止維護)"
   ],
   [
    "Jazzy 等較新版",
    "新一代 Gazebo(舊稱 Ignition)加 ros_gz"
   ]
  ],
  "reveal": [
   0,
   2,
   2,
   3,
   4
  ],
  "widths": [
   1,
   2.4
  ]
 },
 "Gazebo 模擬:虛擬世界裡的機器人#3": {
  "type": "flow",
  "reveal": [
   0,
   2,
   3
  ],
  "nodes": [
   {
    "label": "Gazebo 或真機",
    "sub": "二選一"
   },
   {
    "label": "相同名稱的 topic",
    "sub": "scan、odom、cmd_vel、TF"
   },
   {
    "label": "上層 node",
    "sub": "SLAM、Nav2、RViz2、rosbag、AI node"
   }
  ]
 },
 "Gazebo 模擬:虛擬世界裡的機器人#4": {
  "type": "flow",
  "reveal": [
   0,
   3,
   3,
   5
  ],
  "nodes": [
   {
    "label": "安裝套件",
    "sub": "turtlebot3 的 gazebo"
   },
   {
    "label": "設定機型",
    "sub": "TURTLEBOT3_MODEL=burger"
   },
   {
    "label": "launch 世界",
    "sub": "Gazebo 視窗"
   },
   {
    "label": "第二終端機",
    "sub": "source、同機型、鍵盤遙控"
   },
   {
    "label": "topic list",
    "sub": "cmd_vel、scan、odom、imu、TF、clock"
   }
  ]
 },
 "Gazebo 模擬:虛擬世界裡的機器人#7": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "即時因子 RTF",
    "points": [
     "60 秒的模擬",
     "花了 120 秒才跑完"
    ],
    "value": "RTF = 0.5"
   },
   {
    "title": "降低負擔",
    "points": [
     "不開圖形介面",
     "簡化場景",
     "縮小相機解析度",
     "關掉不需要的感測器"
    ]
   },
   {
    "title": "虛擬機沒有 GPU",
    "points": [
     "Gazebo 和 RViz2 可能很卡",
     "改用實機 Ubuntu 或降低畫質"
    ]
   }
  ]
 },
 "RViz2:看見機器人「看到」的世界#1": {
  "type": "flow",
  "reveal": [
   0,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "topic 與 TF",
    "sub": "訂閱它們"
   },
   {
    "label": "RViz2",
    "sub": "3D 視覺化工具"
   },
   {
    "label": "畫面",
    "sub": "模型、TF、雷達點、地圖、路徑"
   }
  ]
 },
 "RViz2:看見機器人「看到」的世界#2": {
  "type": "table",
  "head": [
   "情況",
   "Fixed Frame"
  ],
  "rows": [
   [
    "看地圖與導航",
    "map"
   ],
   [
    "只有里程計、沒有定位",
    "odom"
   ],
   [
    "畫面沒東西、狀態 Error",
    "多半是框架不存在(沒有該框架的 TF)"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "widths": [
   1.4,
   1.6
  ]
 },
 "RViz2:看見機器人「看到」的世界#3": {
  "type": "table",
  "head": [
   "Display",
   "說明"
  ],
  "rows": [
   [
    "RobotModel",
    "顯示 URDF 模型,需要 robot_description"
   ],
   [
    "TF",
    "顯示所有座標框架與關係"
   ],
   [
    "LaserScan",
    "選 scan 這個 topic"
   ],
   [
    "Map",
    "選 map;Durability 設 Transient Local"
   ],
   [
    "狀態",
    "OK、Warn、Error;Could not transform 多半是 TF 或時間問題"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "widths": [
   1,
   2.6
  ]
 },
 "RViz2:看見機器人「看到」的世界#5": {
  "type": "table",
  "head": [
   "工具",
   "用途"
  ],
  "rows": [
   [
    "Move Camera",
    "移動視角"
   ],
   [
    "2D Pose Estimate",
    "指定機器人大概位置與朝向(給 AMCL)"
   ],
   [
    "2D Goal Pose",
    "指定導航目標(舊版叫 2D Nav Goal)"
   ],
   [
    "Publish Point",
    "發布點到 clicked_point,常用來量位置"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   4
  ],
  "widths": [
   1.2,
   2.4
  ]
 },
 "RViz2:看見機器人「看到」的世界#7": {
  "type": "flow",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "加 TF",
    "sub": "樹是否完整、箭頭合理"
   },
   {
    "label": "加 RobotModel",
    "sub": "模型方向與尺寸"
   },
   {
    "label": "加 LaserScan",
    "sub": "點雲貼牆 = 里程計良好"
   },
   {
    "label": "再加上層資料",
    "sub": "地圖、路徑、代價地圖"
   }
  ]
 },
 "launch 檔與 use_sim_time#1": {
  "type": "table",
  "head": [
   "項目",
   "內容"
  ],
  "rows": [
   [
    "原因",
    "有的 node 用模擬時間,有的用牆上時間"
   ],
   [
    "症狀 1",
    "Lookup would require extrapolation"
   ],
   [
    "症狀 2",
    "RViz2 不顯示雷達,或地圖不更新"
   ],
   [
    "症狀 3",
    "Nav2 一直在等待 transform"
   ],
   [
    "規則",
    "模擬或播 bag 加 clock:全設 true;真機:全設 false"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "widths": [
   0.8,
   2.6
  ]
 },
 "launch 檔與 use_sim_time#2": {
  "type": "cards",
  "reveal": [
   0,
   2,
   2
  ],
  "cards": [
   {
    "title": "use_sim_time 為 true",
    "points": [
     "使用 Gazebo 發布的 clock",
     "時間一致,可以查到 TF"
    ]
   },
   {
    "title": "沒有設定的 node",
    "points": [
     "使用牆上時間",
     "造成 TF 錯誤"
    ]
   }
  ]
 },
 "launch 檔與 use_sim_time#3": {
  "type": "flow",
  "reveal": [
   0,
   1,
   3,
   4,
   5
  ],
  "nodes": [
   {
    "label": "Python launch 檔",
    "sub": "也支援 XML、YAML"
   },
   {
    "label": "啟動 node 與 RViz2"
   },
   {
    "label": "use_sim_time 參數",
    "sub": "預設 true"
   },
   {
    "label": "放進 launch 資料夾",
    "sub": "setup.py 的 data_files"
   },
   {
    "label": "build 後 ros2 launch",
    "sub": "可改成 false"
   }
  ]
 },
 "launch 檔與 use_sim_time#7": {
  "type": "table",
  "head": [
   "項目",
   "內容"
  ],
  "rows": [
   [
    "好處",
    "數值放 YAML,不寫死在程式裡"
   ],
   [
    "node 名稱",
    "front_monitor"
   ],
   [
    "ros__parameters",
    "警告距離 0.3;use_sim_time false"
   ],
   [
    "載入",
    "launch 的 parameters 指定 YAML 路徑"
   ]
  ],
  "reveal": [
   0,
   1,
   3,
   4
  ],
  "widths": [
   1,
   2.4
  ]
 }
}