Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
Diplacam Native Planner

Purpose

Diplacam is a native C++ application for comparing a learned diffusion route sampler with an explicitly selected, native CMA-ES planner over one synthetic field. It does not capture images or claim physical sensing accuracy. The flight-facing route contains eight ordered XY targets; callers retain control of the fixed 2 m demonstration altitude and discard predicted Z.

Architecture

Survey owns private field truth, a dense Gaussian-process posterior, and observation replay state. Network validates the deployed ONNX graph and applies the complete 20-step DDIM update using reusable tensor buffers. The IPC worker separates socket handling from planning: the socket thread services requests while one planner thread consumes a bounded observation FIFO and publishes a retained chunk pinned across its eight slots. The flight plan requests the next chunk with START after its path completes; STOP ends the survey. CmaesOptions selects a comparison path; it is not an automatic fallback for ONNX failure.

Data and resource contracts

The production survey grid is 51 by 51 cells at 2 m spacing. CSV truth is private to the observation source; the sampler receives only posterior mean, marginal variance, current position, and fixed-seed initial noise. Covariance updates include independently seeded Gaussian sensor noise with the demo's positive 0.01 likelihood variance. Flight targets are clamped to 4..96 m XY; raw network outputs retain their reference 0..100 m contract. Covariance is dense and occupies about 51.6 MiB for one 2601-cell matrix. The target is a Raspberry Pi Zero 2 W with shared 512 MiB system memory, so whole-board memory headroom still requires target measurement. The model checkpoint was trained for 10 through 40 m; the demonstration's 2 m sensor use is outside that range and is not evidence of planning quality or safety.

Runtime selection

initialize_runtime loads ONNX Runtime explicitly from executable-relative locations in configured priority order. ARM64 builds try -arm64 filenames before generic names within each directory. No ambient system-library fallback is used. The application settings INI resolves model, metadata, and optional runtime-directory paths relative to that INI.

Metadata reader

Deployment JSON uses the bounded JSONbourne C library without an OpenCV link. Input is limited to 16 KiB, nesting to 16 containers and parser storage to one aligned 64 KiB temporary buffer. Required members are unique and typed; checked, locale-independent numeric conversion rejects overflow and nonfinite values. Integer contract fields reject fractional and exponential tokens. Neither numerical backend links OpenCV statically or dynamically. Packages retain the JSON header/license and aigenlib's separate source attribution.

Build and generate this reference

Build the application from the repository root with make diplacam. Generate this API reference with make diplacam-docs; output is written under .build/diplacam-doxygen/ and is intentionally not checked into source control. The root build allocates versions transactionally from [diplacam] in build_versions.ini, sharing the suite lock and incrementing the patch only after success. --version / -V reports name, version and Git revision; --help / -h explains all CLI options without loading settings or ONNX. --build-info continues to report only the selected numerical backend.

The harness runs from an unrelated working directory. Its plan helper validates the eight-row CSV contract, invalid checks parser rejection, and run_binary optionally wraps an ARM64 artifact with the configured QEMU and SDK sysroot. The second half constructs isolated executable/fallback/INI directories to prove lookup precedence without changing the repository's runtime files.

Selectable numerical backend

The default aigenlib/ backend contains an independent C++17 numerical layer with owning row-major storage, point arithmetic, scaled Cholesky and symmetric pseudoinverse solves, and the sparse GP kernels. Use make diplacam DIPLA_MATH_BACKEND=eigen to select Eigen without a clean; use aigenlib to switch back. The selector also applies to tests, ARM64 builds and packages. diplacam --build-info reports the actual compiled backend. aigenlib/compat.hpp provides the always-aigenlib Aigen namespace: callers can use namespace Math = Aigen and Math::Matrix4f, or include Eigen and change the alias to Eigen. namespace Math = aipp::math follows the build selector. This supports a documented value subset, not Eigen's full expression API. make diplacam-aigenlib builds just the static library without Eigen or ONNX; make diplacam-aigenlib-arm64 cross-compiles it using the prepared Trixie SDK. See aigenlib/README.md and aigenlib/NOTICE.md for supported APIs, contracts, build selection and permissive upstream attribution.