🌐 US-Proxy
id="body-softwares" class="foundation-grid action-show controller-softwares engine-home">

Inspiration

A camera remount can change its orientation relative to the IMU, and recalibration then yields a new rotation and a new estimate of the offset between the two clocks. When an engineer deploys an approved result, the two values should come from the same calibration run. CalibSwitch addresses the deployment step for a planar QNX consumer. ModalAI VINS calibration guide · ETH Zurich Kalibr output format

What it does

At 0:14–0:24, a host adapter converts a published Kalibr camera–IMU chain (the OpenVINS RealSense D455 calibration, fetched at a pinned commit) into a profile with yaw, clock offset and base generation, and reports the roll, pitch and translation it drops. At 0:24–0:37, the QNX guest's serial console is shown at recorded speed: calibctl diff previews the profile, calibctl commit publishes it, and the timer loop applies −421 millidegrees and 2524 microseconds on one tick.

At 0:37–1:13, the same three inputs go through a plain temporary-file-plus-rename publisher and through /dev/calibswitch. These scenes show sequential commands from one recorded guest run, redrawn side by side; they were not concurrent terminals. The plain publisher accepts an out-of-range value and lets a stale approval overwrite a newer one; the device refuses both. When a writer is killed before publishing, both keep the published value and differ only in cleanup.

What's novel

Rename already keeps the pair intact. The new part is where the remaining rules are enforced: once, in a QNX resource manager, for every writer.

Test (QNX 8.0 guest) Two files Plain temp file + rename CalibSwitch device
Mixed-pair ticks, writer killed between two writes 556 / 3,000 0 / 3,000 0 / 3,000
15° yaw sent to the publisher not tested accepted; this writer has no check refused, ERANGE
Approval prepared before a newer run not tested overwrote the newer run refused, EAGAIN
Writer killed before publishing not tested published value kept; temporary file left published value kept; stage dropped on close

The table reports these implementations in these tests. A central file publisher with a lock and the same range and generation checks could enforce the same policy; that design was not tested in this comparison. The README has the full table, including the exact-generation restart test.

A QNX open control block holds each reader's snapshot and scopes a writer's pending update to its open descriptor, so closing the last reference discards an uncommitted stage even when the writer dies. The kill comparison is at 1:13–1:24, the watcher pulses and privilege probes at 1:24–1:38, and the reduced table at 1:52–2:02. After registering its path the daemon drops to UID 1000.

How it was built

The C programs use QNX SDP 8.0 and ran on a QNX 8.0 x86-64 guest under QEMU TCG. A single dispatch thread processes generation checks and devctl publication. A watcher registers its event with MsgRegisterEvent and uses ionotify to reopen on changes. QNX timer pulses drive the demo consumer. The QNX build and CLI checks appear at 1:38–1:52.

How I used AI

AI coding agents (OpenAI Codex and Anthropic Claude) wrote most of the C sources, guest scripts, benchmark, Kalibr adapter and video renderer under my direction; QNX runtime claims were kept only when a run on the QNX guest reproduced them and its output was saved under logs/; host-side pieces (the adapter, the report generator, the renderer) were checked on the host. One example: an early kill-benchmark log (logs/g4_killbench_small_20261202_v0_flawed.log) printed mode=seqlock ... writer_updates=0: every read had finished before the writer started. After the fix, the same mode prints writer_updates=14842 (logs/g4_killbench_small_20261202.log), and the restart check now verifies the exact generation the restarted writer published.

Each build was then reviewed by a model from a different vendor than the one that wrote it, scored against three public QNX hackathon winners on the official criteria. Those reviews led to the side-by-side rename comparison, the run on a published Kalibr result and the switch from slides to guest recordings. CalibSwitch itself has no AI component. The narration is English text-to-speech from macOS Samantha.

Challenges and results

  • An early benchmark finished reading before the writer began updating. The replacement waits for the first update and verifies the exact generation produced by the restarted writer.
  • In the December 2 filmed kill comparison, the two-file writer produced 556/3,000 mixed ticks. Plain rename and CalibSwitch each recorded 0/3,000. A separate README capture recorded 521/3,000 for the two-file writer.
  • In two paced seeds, each with 3,000 reads per source, CalibSwitch and generation-checked rename each passed 60/60 exact-generation restart checks. A separate QNX run passed 15/15 CLI and access checks.

What's next

Evaluate behavior with sensor data on a physical QNX target. The current payload covers planar yaw and clock offset; for the published D455 chain the adapter dropped 0.04° of roll, 0.22° of pitch and a 36 mm translation. Full estimator integration, pulse-driven application latency and restart persistence remain future work.

Media credit

English synthetic narration using macOS Samantha. The console scene at 0:24–0:37 replays the serial bytes of recordings/live_v5.cast at their recorded arrival times (ANSI codes removed, long lines wrapped). Every other terminal scene redraws the asciicast recordings in recordings/; lines are unmodified, and timing and selection are edited for reading. The side-by-side scenes show sequential commands from one guest run, redrawn in two panes, not concurrent terminals. The Kalibr example is the OpenVINS rs_d455 chain (GPL-3.0), fetched by script and not redistributed.

Built With

Share this project:

Updates

Submission history