Command-line and worker-process entry point for Diplacam. More...
#include "dipla_planner.hpp"#include "dipla_worker.hpp"#include "aigenlib/compat.hpp"#include "../../src/bounded_ini.h"#include "../../src/inference_settings.h"#include "../../src/inference_model.h"#include "../../src/version.h"#include <charconv>#include <cmath>#include <filesystem>#include <iomanip>#include <iostream>#include <limits>#include <optional>#include <random>#include <stdexcept>#include <string_view>
Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
| Parse CLI options and run standalone planning or the IPC worker. | |
Detailed Description
Command-line and worker-process entry point for Diplacam.
Keep application policy here and numerical work in its owning modules. This entry point resolves settings, selects one planner, and chooses one lifetime: a single standalone observation/route, or a long-lived IPC service whose planner thread retains survey state across route chunks.
Model settings are discovered relative to the executable, not the launcher's working directory. Explicit CLI model/metadata paths override their defaults, but do not turn off an existing INI's runtime, descriptor, or comparison policy. The distinction matters when launching from a service, a shell, or a package.
- Planner selection is not error recovery
- cmaes=true explicitly selects the native comparison planner. It bypasses ONNX initialization rather than trying diffusion first and quietly changing the experiment on failure. An invalid selected planner reports an error.
- Output contract
- Standalone stdout is one eight-point XY CSV, with diagnostics on stderr. Model-predicted Z is retained inside the sampler for numerical parity, but is not an altitude command. Both planner choices share flight-margin preparation.
- See also
- dipla_planner.hpp Survey, inference, and publication-preparation boundaries.
- dipla_worker.hpp Persistent IPC service and descriptor ownership.
Definition in file diplacam.cpp.
Function Documentation
◆ main()
| int main | ( | int | argc, |
| char ** | argv ) |
Parse CLI options and run standalone planning or the IPC worker.
Defaults are discovered relative to the executable rather than the process working directory. Explicit CLI paths override model settings, while an existing INI is still read for runtime lookup and comparison controls. Standalone mode emits the eight XY points as CSV and keeps diagnostics on stderr; the fixed 2 m survey footprint is separate from model-predicted Z.
- Parameters
-
[in] argc Number of command-line arguments, including the executable name. [in] argv Process-owned, NUL-terminated argument strings.
- Return values
-
0 Standalone output, information request, or orderly IPC service completion. 1 A standard exception was reported on stderr, or the IPC service failed.
- Note
- Information options return when encountered, before reading settings or initializing inference. Earlier malformed arguments can still report errors.
- Warning
- The standalone command produces one route, not a simulated flight or a live waypoint publisher. The persistent owner uses serve() instead.
Definition at line 250 of file diplacam.cpp.