# PID / Kalman / ICP reproducibility package

All data are **synthetic**, not measurements. The browser and this package use the same `src/experiment.py`, `src/kernels.py` and `src/pid_lab.py` bytes. Existing source-only downloads remain available.

## Run / 実行

Extract the ZIP into a new directory. PID and integrity checks use Python's standard library. Kalman/ICP also require NumPy. Verified local versions: Python 3.12.3, NumPy 1.26.4. `requirements.txt` pins that tested NumPy version; it is not a complete cross-platform lockfile. Browser comparison evidence uses Python 3.14.2 / NumPy 2.4.6 / Pyodide 314.0.6. No GPU or physical sensors are required.

```sh
python3 reproduce.py --verify-only
python3 reproduce.py --experiment pid
python3 -m pip install -r requirements.txt
python3 reproduce.py --output reproduced.json
python3 reproduce.py --experiment icp --case symmetric_ring
```

ZIPを新しいフォルダへ展開してください。`--verify-only` は全配布ファイルのサイズとSHA-256を検査します。通常実行は保存済み13条件（PID 4 / Kalman 4 / ICP 5）と数値許容差で比較します。`--output` は既存ファイルを上書きしません。結果には実行時の環境、manifest hash、パラメータ、指標を記録します。依存ライブラリはZIPに含みません。

A successful comparison includes deliberately poor control/estimation cases. It means reproduction matched the reference, not that the algorithm solved every case. Missing Kalman observations and symmetric ICP geometry are intentional. Inspect each case's `failure_condition` and metrics in `manifest.json`.

成功は保存結果との一致を意味します。遅延・飽和・外れ値・対称形状の失敗例も含みます。残差が小さいだけでは正しい姿勢と判断できません。ハードウェア計測・性能保証ではありません。

## Sources and data

`manifest.json` is runtime-neutral: source, dataset, output, config, documentation and archive entries use explicit paths, SHA-256, provenance and data type. `src/` is executable; `originals/` records the generating source and generator for review. `data/` contains existing CSV/JSON baselines, and `figures/` the existing static results.

Kalman observations are frozen from `kalman_baseline.csv` (10 significant-digit export), generated originally with NumPy default_rng seed 42. The shared kernel embeds those same observations, so the comparison does not depend on generating new random values with a different NumPy version. PID/ICP are deterministic without a seed. See manifest parameters for fixed time steps, geometry and tolerances.

The repository owns regeneration: `python3 tools/build_playground_sources.py`, followed by `python3 tools/build_artifacts.py`, then `python3 tools/build_artifacts.py --check`. Do not edit only the ZIP or generated kernel. In a source checkout, the generator's required original paths are listed in the manifest. Running `originals/engineering_labs.py` in an empty working directory regenerates Kalman/ICP/frequency/aliasing/transform outputs together and needs Matplotlib 3.6.3 as well as NumPy. These plotting outputs are not the minimal browser adapter.

## License / ライセンス

No explicit license for the first-party Lab source/data was found in this repository at packaging time. This package records `unspecified`; distribution here does not establish a new open-source or open-data license. Third-party runtime licenses remain in the separate versioned browser vendor bundle and are not replaced by this notice. The charts are generated synthetic illustrations, not OpenCV input images. C++ and OpenCV image experiments are not included.
