Namespaces | |
| namespace | aigenlib |
Data Structures | |
| struct | ExperimentOptions |
| Startup-only synthetic experiment settings shared by both planners. More... | |
| struct | Belief |
| Fixed-shape posterior summary consumed by the diffusion model. More... | |
| struct | CmaesOptions |
| Bounded parameters for the comparison-only CMA-ES planner. More... | |
| struct | NetworkOptions |
| Model identity and execution limits for a diffusion network. More... | |
| class | Network |
| Owns an ONNX session and samples eight metre-valued control points. More... | |
| class | Survey |
| Maintains a synthetic field, GP posterior, and planning comparisons. More... | |
Typedefs | |
| using | Noise = std::array<double, DIPLA_COORDINATE_COUNT * points> |
| using | Waypoints = std::array<std::array<double, DIPLA_COORDINATE_COUNT>, points> |
Functions | |
| void | initialize_runtime (const std::string &onnx_lib_path={}) |
| Load the ONNX Runtime C API before constructing an inference session. | |
| void | apply_flight_margin (Waypoints &route, unsigned margin_cells=ExperimentOptions::default_margin_cells) |
| Apply the configured horizontal flight margin. | |
| int | serve (int descriptor, const std::string &config, const std::string &default_model, const std::string &default_metadata, bool cmaes=false, const CmaesOptions &comparison={}, const NetworkOptions &network_options={}, const ExperimentOptions &experiment={}) |
| Serve a Diplacam session over an already-connected IPC descriptor. | |
Variables | |
| constexpr std::size_t | cells = DIPLA_GRID_SIDE * DIPLA_GRID_SIDE |
| constexpr std::size_t | points = DIPLA_WAYPOINT_COUNT |
Typedef Documentation
◆ Noise
| using dipla::Noise = std::array<double, DIPLA_COORDINATE_COUNT * points> |
Flattened XYZ diffusion noise, grouped by coordinate axis.
Definition at line 48 of file dipla_planner.hpp.
◆ Waypoints
| using dipla::Waypoints = std::array<std::array<double, DIPLA_COORDINATE_COUNT>, points> |
Eight ordered XYZ waypoints in local east/north/metre coordinates.
Definition at line 50 of file dipla_planner.hpp.
Function Documentation
◆ apply_flight_margin()
| void dipla::apply_flight_margin | ( | Waypoints & | route, |
| unsigned | margin_cells ) |
Apply the configured horizontal flight margin.
Both planners pass here once before publication. The inset is an application policy, not model normalization or a change to the raw sampler. Validate the entire route, including Z, before changing any coordinate.
- See also
- Network::sample
Raw model outputs remain unchanged until the application prepares a flight route. The default two-cell inset clips XY to 4..96 metres without modifying model Z.
- Parameters
-
route Complete finite route to constrain in place. margin_cells Horizontal inset in grid cells, inclusive range 0..24.
- Exceptions
-
std::runtime_error If the margin is invalid or any coordinate is nonfinite.
Definition at line 599 of file dipla_planner.cpp.
◆ initialize_runtime()
| void dipla::initialize_runtime | ( | const std::string & | onnx_lib_path | ) |
Load the ONNX Runtime C API before constructing an inference session.
Delegate runtime discovery to the shared loader so Diplacam uses the same library-selection and process-lifetime rules as other ONNX consumers. Keeping an error buffer here turns the C API's bounded diagnostic into a C++ exception before a Network can acquire a session from an unavailable runtime.
- See also
- Network::Network
Searches executable-relative directories in order, trying architecture-specific runtime names before generic names on ARM64. The optional directory is searched last and is normally resolved from the model settings INI by the application entry point. The loaded handle is retained for process lifetime so every shared session retains a valid runtime API.
- Parameters
-
onnx_lib_path Optional final directory to search; empty skips it.
- Exceptions
-
std::runtime_error If no candidate exists, cannot load, or exposes an incompatible API.
Definition at line 75 of file dipla_planner.cpp.
◆ serve()
| int dipla::serve | ( | int | descriptor, |
| const std::string & | config, | ||
| const std::string & | default_model, | ||
| const std::string & | default_metadata, | ||
| bool | cmaes = false, | ||
| const CmaesOptions & | comparison = {}, | ||
| const NetworkOptions & | network_options = {}, | ||
| const ExperimentOptions & | experiment = {} ) |
Serve a Diplacam session over an already-connected IPC descriptor.
Starts one planning thread and services requests on the calling thread. One GP owner consumes each accepted observation once. Queue overflow fails closed. START during an active survey requests a new retained chunk; its first accepted pose anchors field centre (50,50). Active START retains that frame and belief; STOP followed by START resets both. Complete-route replies copy one generation; legacy retrieval pins a route across eight points. The caller retains descriptor ownership and should close it after this returns. Reply backpressure fails the connection instead of blocking request handling.
- Parameters
-
descriptor Connected socket descriptor; ownership remains with caller. config Worker INI containing field, cadence and planning-pose age settings. default_model Default model path supplied by the executable settings/CLI. default_metadata Default metadata path supplied by the executable settings/CLI. cmaes Select the explicit comparison-only planner; false uses diffusion. comparison Bounded CMA-ES options used only when cmaes is true. network_options Descriptor and bounded ONNX execution policy, ignored in comparison mode. experiment Startup GP, synthetic sensor, seed and flight-margin policy.
- Returns
- Zero after orderly transport and worker shutdown; nonzero on failure.
- Exceptions
-
std::exception For invalid configuration or unrecoverable setup errors.
- Note
- Computational validity is not route execution or field accuracy. This worker neither publishes GCS moves nor changes navigation blocks.
Definition at line 491 of file dipla_worker.cpp.
Variable Documentation
◆ cells
|
constexpr |
Number of cells in the supported 51-by-51 world grid.
Definition at line 44 of file dipla_planner.hpp.
◆ points
|
constexpr |
Number of ordered control points returned by either planner.
Definition at line 46 of file dipla_planner.hpp.