Commit dab79c9
committed
feat(demos/ota): reactive fault narrative + reproducible artefact build
Round of work to make the OTA demo's fault story actually visible AND
to lock the build/test path against regression.
Reactive SCAN_PHANTOM_RETURN fault:
- broken_lidar subscribes /cmd_vel (Twist + TwistStamped, since Nav2
Jazzy uses the stamped variant) and only reports the fault while the
controller is actively driving. Empty dashboard at boot, lights up
the moment the operator publishes /goal_pose, stays active through
recovery behaviors. The phantom itself is now a 21-ray, 0.5 m wedge
centered on index 180 - one ray at 1 m the planner just routes
around because the costmap raytraces it away.
- fixed_lidar fires EVENT_PASSED at 500 ms (4x the broken_lidar tick)
so the FaultManager debounce counter overtakes whatever broken_lidar
accumulated, no matter how long the operator was driving before the
OTA. Stops being load-bearing once the fault flips to HEALED.
- demo.launch.py sets fault_manager to in-memory storage (clean
dashboard at every boot - SQLite was persisting last session's
CONFIRMED entry) and turns on healing_enabled with threshold 2.
Reproducible artefact build:
- ota_update_server/Dockerfile is now multi-stage. Stage 1 (ros:jazzy)
clones ros2_medkit at the same ref the gateway image pins, builds
ros2_medkit_msgs, builds fixed_lidar + obstacle_classifier_v2 from
the demo's ros2_packages/, and runs pack_artifact.py to produce
tarballs + catalog.json. Stage 2 ships the slim FastAPI server +
the tarballs via COPY --from. `docker compose build` is now the
reproducible path - no "build artefacts on host first" step.
- CI: dropped the separate "Build artifacts inside ros:jazzy" step;
`docker compose up -d --build` does it atomically.
- scripts/build_artifacts.sh stays as an opt-in dev convenience. It
no longer silently bootstraps msgs - if the env doesn't have it on
the prefix path it errors out with instructions to either source an
overlay or use `docker compose build`. Less hidden state.
Demo narrative regression test:
- tests/smoke_test_demo_narrative.sh exercises the full beat:
publish /goal_pose, assert SCAN_PHANTOM_RETURN appears (reactive
proof - if the fault appears, broken_lidar's /cmd_vel subscription
saw motion, so we don't need a brittle `ros2 topic echo` snapshot),
trigger OTA prepare+execute, assert process flip, assert fault
clears, assert /cmd_vel settles. CI gets a new ota-demo-narrative
job that runs this in isolation from the API-only smoke check.1 parent 08b0c21 commit dab79c9
11 files changed
Lines changed: 635 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 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 | + | |
187 | 236 | | |
188 | 237 | | |
189 | 238 | | |
| |||
211 | 260 | | |
212 | 261 | | |
213 | 262 | | |
214 | | - | |
215 | 263 | | |
216 | 264 | | |
217 | 265 | | |
218 | 266 | | |
219 | 267 | | |
220 | 268 | | |
221 | | - | |
222 | | - | |
| 269 | + | |
| 270 | + | |
223 | 271 | | |
224 | 272 | | |
225 | 273 | | |
226 | 274 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 275 | + | |
233 | 276 | | |
234 | 277 | | |
235 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 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 | + | |
2 | 41 | | |
3 | | - | |
4 | | - | |
| 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 | + | |
5 | 87 | | |
6 | 88 | | |
7 | 89 | | |
8 | 90 | | |
9 | 91 | | |
10 | 92 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 93 | + | |
15 | 94 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
19 | 98 | | |
20 | 99 | | |
21 | 100 | | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
Lines changed: 116 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
2 | 21 | | |
3 | 22 | | |
4 | 23 | | |
| 24 | + | |
5 | 25 | | |
6 | 26 | | |
7 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
8 | 31 | | |
9 | 32 | | |
| 33 | + | |
10 | 34 | | |
11 | 35 | | |
12 | 36 | | |
13 | 37 | | |
14 | 38 | | |
15 | 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 | + | |
16 | 64 | | |
17 | 65 | | |
18 | 66 | | |
| |||
27 | 75 | | |
28 | 76 | | |
29 | 77 | | |
30 | | - | |
31 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
32 | 95 | | |
33 | 96 | | |
34 | 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 | + | |
35 | 143 | | |
36 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
37 | 151 | | |
38 | 152 | | |
39 | 153 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments