Skip to content

The Observatory: roadmap from the simulated duck to the real robots

Date: 2026-12-03. Asked by the operator, 2026-12-03: keep the ideas, the roadmap, the strategy and the plans for the Observatory without side-stepping the current work. Builds on RFC-0019 (detectors), RFC-0025 (MVP 2: the TurtleBot3 Burger in Gazebo), RFC-0034 (calibration, the physical robot's reference) and ADR-0030.

The strategy

  • What the Observatory is for: replaying a run so we can see where the problem is. It shows what the robot believed against what was true, the decisions it made with their reasons, and the alerts and contacts. It measures the error terms the robot's profile is calibrated from.
  • What is general in it today: runs as MCAP; one timeline; estimate against truth per tick; decisions with their reasons; detectors over a recording.
  • What is ours to the duck today: scenes as boxes on a floor; a 2D pose (x, y, heading); top-down map views; the 8x8 depth sensor; detectors that assume a walking robot.
  • The rule (operator, 2026-12-03): generalise only when there are three real, different cases. Today there are two, the simulated duck and the NXT, and both are ground robots on a flat floor.

The ledger: when an abstraction is generalised

The rule is ADR-0031: an abstraction is built when three cases that differ on its axis have recorded runs in the data folder, from a design written from those recordings and with the operator's go. The abstractions cross the parts (the pose is in the navigator API, the run format and the Observatory at once), so the ledger is the platform's: PLATFORM-ROADMAP.md, "The platform's ledger". A change that generalises checks it first.

The drone is the operator's own and can fly now, so it is the nearest third case for the pose and the views: one recorded flight, imported, opens half of that gate. Which drone it is and what its log holds is not known here; its GPS is an estimate, not a truth, so its estimate/truth pair needs a reference of its own. The real ducks, arriving soon, bring the outside reference and height.

MVP v1: the simulated duck (now)

The question it answers: where in the navigator or the controller does a run fail, and which error term made it fail?

  1. Challenge runs read their own scene as the true walls (scenefile.layout_from_boxes): built (7c1da7e).
  2. observatory clearance: each run's tightest point, split into the plan's clearance, the cross-track error and the localization error (longitudinal, lateral, normal): built (7c1da7e). Over the 48-run sweep, pooled over 3617 ticks near obstacles, the localization error's p95 is 0.047 m lateral, 0.056 m normal and 0.076 m as a distance, against the 0.116 m distance in ADR-0030's table (baseline A, other scenes).
  3. A clearance lane on the replay's timeline, with the alert distance and the footprint radius.
  4. Alerts, reflex stops, refusals and contacts as markers on the map at their pose.
  5. Detector findings on the replay page (RFC-0019 steps 2b and 3).
  6. Course procedures from RFC-0034 run their analysis through the Observatory, so the profile's measured terms come from a command, not a scratchpad.

What the replay does not show yet (inventory, 2026-12-03)

The operator: "I need complete observatory solution ... we need to close all the gaps". Items 3 to 5 above, opened up: what a run records, evaluates or detects that a person replaying it cannot see, or cannot see at its time and place. Read from the code on main, then read again on a6d81a8 (item 5 on main: d1931fc records the alerts and contacts and adds GET .../clearance, 35ca071 and a6d81a8 are its reviews' fixes); the page's code did not change, so every gap below is still open.

  • Contacts. contact.replay puts them in the evaluated event's raw (each with its run time t, truth_t, part, obstacle, depth; the first 40 onsets and the deepest, the rest counted; no position), but the run store keeps an event's raw only for anomaly events (libs/runfile/src/runfile/store.py, apply), so the page never receives them.
  • The evaluator's verdict, no_verdict and its guards. The evaluated event reaches the page as its text only; the run record's evaluator_truth is not copied by apply (evaluator_profile is, since 35ca071, and the clearance route reads it). An invariant event's rule and why are in its raw, so they reach the page only inside its text.
  • Proximity alerts. Recorded as anomaly events (an exit since 35ca071 confirmed after 0.5 s outside, so its file time can be up to about 0.55 s after its truth time); the map draws their pins for the whole run, with no ring of the alert's radius and no span from enter to exit.
  • The clearance line. Served, not drawn; the Moment tab's nearest obstacle says "not in the data".
  • Detector findings and the tightest point. observatory anomalies and observatory clearance on the command line only.
  • The timeline lanes. lanes.js keeps error, alert and warn, so an alert's exit (info) and every kind status.js does not map as an event kind (invariant, evaluated, stalled, recovery) are left out.
  • Recorded nowhere with a time or place. Every broken invariant after the first (Evaluator.check returns the run's first only; that one is now placed at its sample's time), the drop margin (min_drop_m, lowest_trunk_m), the truth copy's integrity (unpaired, max_gap_ms).

Stages, by what each shows of where a run went wrong; each ends with a page test and a must-fail case:

Stage What the replay gains Work Size
1 The evaluator's verdict, failed list and no_verdict reason, the contacts listed (part, obstacle, depth), the truth guards' state store and page S
2 Contacts and alerts on the map at their time: a marker at the truth pose, the alert's ring from enter to exit, pins that follow the playhead, a problems lane page M
3 The clearance lane with the alert and radius lines, the minimum marked, the nearest obstacle named page M
4 Detector findings from a route computed on request and cached (the operator's yes, 2026-12-03), drawn apart from what the runner recorded server and page M/L
5 The tightest point: a jump to it and its error terms, as observatory clearance gives them server and page S/M
6 Recorded by the runner: each contact as its own event with its position, every invariant, the drop margin, the integrity figures (an ADR first: it changes what a run records) runner M
7 The navigator's own events in the lanes, from a read of what robots/duck emits page S

Choices made unless the operator says otherwise: a contact's marker at the truth pose of its tick until stage 6 records its own; the evaluator's verdict beside the navigator's, labelled apart; the ring from the alert distance the run recorded, not the profile as it is now. The deck.gl page is removed (the operator, 2026-12-03; ADR-0032), so each map stage is built once.

Stage 1, built 2026-12-03: the runner's evaluated event carries pass, failed and no_verdict beside its text; the store keeps the evaluated and invariant events' records and the run's evaluator_truth; the Decided tab shows the evaluator's verdict (each failed rule apart) labelled apart from the navigator's, the contacts it was evaluated by (a click seeks to one) or why they were not checked, and the truth the evaluator had (test_evaluated_pages), live as well as reopened. A run recorded before it has no verdict fields (no run on disk was opened to count them): its evaluated row is its text, and its contacts and evaluator_truth show only if the run recorded them (item 5's runs record the contacts). A no-verdict run still lists the rules it broke, headed as not a FAIL. Not done here: the evaluator's events in the timeline lanes (stage 7), a contact on the map (stage 2).

Stage 6, built 2026-12-03 (ADR-0033): a run on the simulator's touches writes each touching episode as a contact event, at its enter and its exit, with the trunk's truth position and, from a body server with the v2 patch, the contact point of its first and deepest touch. The evaluator writes every rule's breach at its onset (first marks the run's first), and a fall or bounds breach breaks the goal even after another rule broke. The evaluated event adds min_drop and lowest_trunk with the sample that set each, the run's end the truth copy's integrity (truth_copy), and the evaluated contacts carry their point. Tests: test_run_records, test_store_evaluated, test_evaluated_pages (live and reopened alike), test_touches, test_contacts and test_host_setup_touches, each with must-fail cases and mutants. Not done here: the operator's Pollen checkout still has the v1 patch until scripts/host-setup runs with the operator's go, so until then runs record no contact point; the page lists contact events by their text but does not draw them (stage 2); no simulator run was made with it.

Stage 2, built 2026-12-03: on the map, in the world frame, a cross in the error colour where each contact began (its contact point, else the trunk's truth position), and while the playhead is inside a proximity alert a ring of the distance the run recorded (values.alert_m) round the truth; pins and crosses after the playhead are dimmed, and a click on either seeks. Under the Alarms lane a Problems lane draws each contact and alert from its enter to its exit (an enter with no exit, to the run's end), with its glyph and word, a button a click or Enter seeks with. One pairing (web/shell/problems.js) feeds the map and the lane. Tests: test_problems_pages, must-fail checks for each. Not done here: a contact with neither a point nor a truth position has no cross; the belief-to-truth lines of the anomaly pins are not dimmed; the open span of a live run is tested only reopened.

Stage 3, built 2026-12-04: under the Problems lane a Clearance lane draws, from GET .../clearance, the truth's distance to the nearest obstacle at each tick, on a scale up to the run's largest clearance but at most four times the largest of the alert distance, the radius and the minimum (a stretch above it is drawn dotted along the top, and the lane says the scale's top), with a line at the alert distance the run recorded and one at the robot's radius, each labelled with its value; the run's minimum is a marker and a button (click or Enter seeks), labelled with its value, obstacle and time, or with its value alone where the whole label does not fit beside it (and above or below the marker where neither does). The Moment tab names the nearest obstacle and the clearance at the playhead. A live run's line grows with its ticks. Checked on two real runs (ch24-s4 run-20261203-223207, ch31-s304 run-20261203-173354) against scripts/stabilize/common.py (truth.jsonl and scene.xml, no Observatory code): 694 of 694 and 505 of 505 samples within 1.5 mm of the true distance with the same obstacle, the drawn line within 0.01 px of the route, the minimum and the Moment rows equal to the route's; three mutants (the Moment row one tick off, the line drawn 2 cm high, the maximum taken for the minimum) fail that check. Tests: test_clearance_pages, must-fail checks for each; seven mutants (the label's placement four ways, the dotted stretch's step, the round caps, the Moment row before the first tick) fail it. Not done here: the minimum's label covers about 4 s of the line beside the marker on those runs; the real-run check is a script, not a gate; the 960 px layout was not looked at; untested: the label below its marker at the lane's top, the scale's top at the right, a run with no ticks; open: a hole is not found where half the steps or more are holes, and the Moment row's copy button escapes an obstacle's name twice.

Stage 4, built (2026-12-04): GET .../anomalies runs the default track's detectors over a run as observatory anomalies does, against the truth the clearance route reads, and answers only what the analysis found (what the robot and the harness tagged are the run's events); it is computed on request and kept, one answer per run in the server's memory (not RFC-0019 section 4.1's derived index: the operator's choice of 2026-12-03; lost on a restart), until the run's files, the layout's files or a detector's version change. Under the Alarms lane a Found lane marks each finding at its start, hollow in its severity's colour with its glyph, a bar to its end, a button a click or Enter seeks with, the detector and version in its tooltip; the Moment tab lists the findings in force at the playhead, under the Moment rows. With nothing found the lane says how many detectors ran; without an answer it says why. A live run is asked again at most every 10 s while it grows and once when it ends. Checked on four real runs (ch24-s2 run-20261202-150710, ch3-s2 run-20261202-162935, ch14-s3 run-20261202-191041, ch24-s4 run-20261203-223207): the route's findings equal observatory anomalies --json's, each mark is within 0.5 px of the ruler's place for its time, and the Moment tab lists it there. Tests: test_found_route and test_found_pages, must-fail checks for each; six mutants of the route and four of the page fail them. A live run is never a kept answer (its file changes with every record), so each ask reads the whole run again. A Detectors button (in the Found lane's label on a wide screen, where the bar's column has no room for it; in the bar on a narrow one) opens a switch per detector (the operator, 2026-12-04): the default track on, the experimental ones off and tagged, each with this run's count or why it did not apply or failed, the rule (and why an experimental one is off) in its tooltip; the choice is kept in this browser (rl.detectors, a switch only where it differs from the default) and asked as ?on=&off=. A detector that raises is failed and the others still run (the command prints it too); wrong_refusal no longer raises on a layout with no floor (every challenge scene's: it took min() of no floors) and says it does not apply. On the map each finding with a place is a hollow square at where.belief and, in the world frame, a ring at where.truth, joined, in its severity's colour, dimmed until the playhead reaches it; a click on it seeks; the legend keys the square; switching a detector draws them again, alone, not the run (a rebuild costs a long run seconds; after one, test_look_3d_pages hung in 5 of 6 runs on a test hook that counted to Infinity, fixed since). where is in the world frame, so the map frame takes the belief back through the epoch in force at the finding's t. Checked on the same four runs: the three placed findings' world pins equal the route's where, and each map pin is within 0.5 mm of the belief recorded at the tick the place came from (a near miss's place is its closest approach, up to 1.4 s after t). Ten checks in test_found_pages (one on a run whose map is turned and moved against the world); five mutants (a filled square, no inverse through the epoch, no redraw when the findings arrive, the ring in the map frame, no legend shape) fail them. Fixed after it shipped: the record did not say at which tick its places were taken, so a map re-anchored between t and that tick would have put the map frame's square in the wrong place (none of the 719 scratch runs has more than one epoch, so it had not happened). The analysis now writes where.t (RFC-0019 section 2.1, added), the page goes back through the epoch in force then, and a run re-anchored between a near miss's start and its closest approach checks it (two mutants: the page ignoring it, the analysis not writing it). Places that are not one tick's (a phantom's centre, a rim's median point, a robot-tagged record at its own t) carry none and use t. Fixed after it shipped: a detector that needs the layout said (--layout) on the page too, a flag the page has no way to pass; the route now says why this run has none, the command keeps its flag (a check each, a mutant each). From the reviews (mine and the advisor's, 2026-12-04), fixed with a check and a mutant each: a stored switch for a detector the server does not have was refused (400) on every run and left the Detectors button dead, with no way back to the defaults (the page now drops it and keeps the rest; the popover opens with the reason and the reset when there is no answer); the outliner's anomalies row read missing, with its switch disabled, while found pins were drawn (it now says "N found" and its switch hides them); where.t was rounded to the millisecond, so an epoch within half a millisecond of its tick picked the wrong frame (now exact); the server kept one answer per run, so a switch turned back, or two viewers with different switches, read the run again (now one per run and choice, 32 in all, the bound checked); an open popover kept its old counts after a switch, and hung where the button was when the window crossed 960 px. What an ask costs: 0.6 to 1.0 s on the longest real run (122 s); on synthetic runs with no depth data, 0.11, 0.21 and 0.47 s at 2, 5 and 10 minutes, so a real 10-minute live run, asked every 10 s, is likely 3 to 5 s an ask (not measured). Not fixed: an OBSERVATORY_LAYOUT file rewritten at the same size within one file-time tick keeps the old answer (negligible). The rebuild waste (2026-12-04): building a run again (an epoch behind the drawn ticks, a reload) left the dropped run's geometries, materials and textures on the GPU, so each rebuild added to what the page held; and every anomaly, contact or evaluator event of a live run built the whole run again. The page now frees the dropped run (the shared pin textures kept), and a live event draws only the run's own pins and the alerts' ring again (setEvents, as setFound does for the analysis). Checked through three's own count (renderer.info.memory): three rebuilds hold what one did (82 geometries), three live events hold what one did, and no live event calls setRun. Not changed: the other setRun callers (a run opened, the first ticks, an epoch behind the drawn ticks) still build the whole run; the wider review of how the 3D scenes are built is the second of the two reviews in STABILIZE.md. Fixed after it shipped (the follow-up commit): on a run that recorded no anomaly of its own the anomalies layer was hidden as a missing stream, so the pins were built and not shown; two of the four real runs above (ch24-s2, ch3-s2) are such runs, and their check had compared the places only. The layer is now shown for the found pins too, and the real-run check asks whether it is. Three more checks (a run with its belief 25 cm off the truth): the layer shown there, the line between the square and the ring, the square dimmed before the playhead; three mutants fail them. A real recorded touch (item 6 of the screenshot audit, 2026-12-04): none of the runs on hand had one the map could place, and today's navigator kept its trunk 0.2 m or more from every box in seven runs. Cutting the torque near a box (a limp fall moves the trunk about 0.06 m) touched nothing at 0.21 m; goals near the hidden box were refused or stopped 0.26 m short. A start beside it did it: lab-challenge 31 --seed 304 --start 1.45,-0.21,1.417 --goal 0.3,0.0 --recover-refusals (the navigator refuses, no room to turn) recorded jaw_soft on hidden from -0.145 s to 10.0 s, 0.08 mm deep at most. On the page it showed a bug: the contact began before the run file, so the run has its exit and no enter, and the lane, the Moment and the map showed nothing of it (only the Decided tab did). The enter is now made from the exit (its moment less duration_s, placed at deep_pos); the run is a real-run fixture with three checks, which fail without the fix. Not covered: a real contact that begins during the run (an enter and an exit both recorded), and a real proximity alert.

Stage 5, built (2026-12-04): GET .../tightest is observatory clearance for one run (clearance.measure), against the truth the clearance lane reads, kept per run until its files or the layout's change (it reads the whole run: 0.31 s on ch3-s2, 49 s). The Moment tab's Tightest point section has a button to go there and the room split as the analysis splits it: the plan's clearance, less what the following lost, less what the localization lost, is the truth's (ch3-s2: 0.184 - 0.036 - 0.090 = 0.058 m to box at 44.06 s, the lane's minimum); then the longitudinal, lateral and cross-track errors there, and the 95th percentiles over the ticks within 0.30 m. Where no plan was in force (the touch run) it says so instead of a 0. Checked on the real-run fixtures: the route against the command's own numbers, the lane's minimum, the cache and the scene file's stamp; the page's jump, its split and the no-plan case; six mutants fail them. Found on the way: the real-run fixtures dropped the plans, so the tightest point had no plan clearance on them; the cut keeps /miniview/plan now, and its own check compares the tightest point too (a mutant without the plans fails it). Not covered: the tightest point on the map (a marker of its own), a live run's tightest point while it moves (asked again on the found anomalies' beat, every 10 s, not checked), and runs with more than one epoch.

Stage 7, built (2026-12-04): a read of what robots/duck and the runner emit (about 50 event kinds; the lanes drew four of them and the anomalies) gave the status table (libs/web/status.js, kind event) the problems among them: a guardrail broken, the runner's truth guard and a broken invariant are errors; the goal stopped by a guardrail, stuck and the sweep guard are alerts; stalled, a recovery, a replan round a new obstacle, a goal held off or narrowed, the frames parted, obstacles cleared, leaving a drop and a failed camera look are warnings. A word the operator's verdict table has keeps its status there (stopped_by_guardrail alert, stalled warn). The lanes draw them in the streams they concern; the runner's own events (an invariant, a contact, the truth guard) in the truth's lanes as a harness anomaly is; a contact where it begins (its span is the problems lane's). The events lane colours them as the lanes do. The rest (a plan, a pace, a glance, the calibration, a cancel) stay out of the lanes, in the events lane only. Checked by test_event_lanes_pages (five mutants fail it) and on real runs on the scratch data (ch31-s304 run-20261204-171939: the fall's invariant at 31.29 s, error, and the guardrail's stop at 39.13 s, alert; ch24-s7 run-20261204-170739: stalled at 51.14 s, warn). On those runs, 107 have a stall, 21 an invariant and 3 a guardrail stop; none has stuck, a recovery or a guardrail event, so those are checked on made-up runs only. The status of each kind is a choice the operator may change. Not covered: a contact made from the evaluator's list or from an exit alone (stage 2's problems lane draws those, the stream lanes do not), and the evaluated verdict (the Decided tab and the run's badge carry it).

Not covered by the inventory: the navigator's event kinds were not listed from robots/duck; whether clicking a pin selects it is not checked; no test was run. The second read (a6d81a8) checked the store's apply, the runner's challenge loop, Evaluator.check, contact.replay and the page's lanes and status maps; it did not open the page.

The order (operator, 2026-12-03)

Serial, one job at a time (the machine runs other work); after each step my review, the advisor's, then the operator's.

  1. Remove the deck.gl page (ADR-0032).
  2. This inventory, read again against main.
  3. Stage 1.
  4. RFC-0034 re-evaluated with the operator, the terms shape settled, before stage 6's ADR: both decide what a run records and measures. Done: revised and accepted (2026-12-03).
  5. Stage 6's ADR, then stage 6. The ADR is accepted (ADR-0033, 2026-12-03); stage 6 is built (above).
  6. The baseline on challenges 29 to 31 (ADR-0030 decision 8), sized first, with the operator's go; after stage 6, so its runs record each contact. Sized at 3 repeats of seeds 301 to 308 (72 runs, the operator's go). Stopped by the operator's choice after 29 runs (2026-12-03, 17:45): the host ran at a load of 11 to 76 on 32 cores (other work and CI), and 10 of the first 17 runs had a truth-sample stall over 100 ms (baseline A: 13 of 211); ch30-s308 failed with a 1.07 s stall and is unsound by truth_copy.unpaired. Rep 1 read 8 of 8, 7 of 8 and 8 of 8 on challenges 29 to 31; whether the load lowered it is not known. The runs are kept apart (microduck-nav-runs/r6/baseline-floor-loaded, with the load sampled every 10 s) and are not the baseline; all 72 run again, on 4981d46, when the operator says the host is quiet.
  7. An assessment on the baseline's runs (the operator, 2026-12-03): open them in the Observatory with what stage 6 records and stage 1 shows, read this inventory again against them, and bring the operator what should change in the remaining stages (2, 3, 4, 5, 7) or in RFC-0034 before either goes on.
  8. RFC-0034 steps 1 and 2 (item 7), once the revised RFC is accepted and the assessment is through.
  9. Stages 2, 3, 5, 4 and 7, one after another (2, 3 and 5 change the same map and timeline code), as the assessment leaves them.

Reordered by the operator (2026-12-03, after the baseline was stopped for host load): code first, then the baseline, then the assessment. RFC-0034 steps 1 and 2 (item 7), then stages 2, 3, 5, 4 and 7; the baseline's 72 runs when the operator says the host is quiet; the assessment (item 6) on the baseline's runs after that.

MVP v2: the TurtleBot3 Burger in Gazebo (ROS 2, SLAM)

The question it answers: does the same replay and the same measurement work for a second kind of robot with another sensor and another truth source?

  • Import ROS 2 bags; Gazebo's true pose as the truth; the Gazebo world as the true layout.
  • The lidar (the Burger's LDS) as a scan view on the map and on the timeline.
  • The first SLAM measure: the map SLAM Toolbox built against Gazebo's world.
  • The estimate/truth pair and detectors that declare their needs are designed here, from three robots' data (the duck, the NXT, the Burger).
  • Not decided: whether the Burger's runs are recorded by our runner or by ros2 bag.

MVP v3: the real duck (apartment, building, maybe outside)

The question it answers: what went wrong on a real run when there is no simulator truth?

  • The reference replaces the simulator's truth: RFC-0034's open question 1 (taped marks, an overhead camera, a measured floor plan). Without one, only detectors that need no truth run (dithering, contacts from the IMU, refusals).
  • Height: stairs, steps, thresholds, ramps and curbs. The pose gains height, pitch and roll (the duck has an IMU); the world gains heights; the views gain a side or 3D view.
  • The world: the apartment and the building as measured floor plans that plug in, with drops.
  • Long runs: hours, not minutes; retention and search over many runs.
  • Sim against real: the same course in both, the two profiles' terms side by side (RFC-0034's two rounds).

MVP v4: the real TurtleBot3 (apartment, building, outside, SLAM)

The question it answers: how good is the map, and where did the robot think it was against where it was?

  • The SLAM map against a reference map (a measured floor plan or a reference scan).
  • The trajectory against a reference: absolute and relative trajectory error, the standard SLAM measures.
  • Loop closures and relocalizations as events on the timeline and markers on the map.
  • Not checked: whether the Burger's small wheels manage outside.

Later: lidars and beyond

  • More lidars: 3D point clouds, a lidar on the duck; the views and the world grow to 3D.
  • Robots working together: one shared map and frame (ROADMAP "Later" 2 and 7).
  • The drone: a case for the gate above as soon as one flight is recorded.
  • AUVs: an autonomous underwater vehicle is a robot. Its pose has six degrees of freedom, and it has no GPS underwater: it estimates its position from its own motion and sensors, so the estimate/truth pair fits it directly. Not planned.

Not covered

  • No milestone has dates or costs.
  • The v2 to v4 items come from the operator's plan and RFC-0025, not from a design: none is checked against the Observatory's code beyond the "ours to the duck" list above.
  • The reference for the real robots (v3, v4) is open (RFC-0034 open question 1).
  • Whether the Observatory reads live runs, not only recorded ones, is not considered here.