Monado OpenXR Runtime
Loading...
Searching...
No Matches
sensor_fusion_rerun.hpp
Go to the documentation of this file.
1// Copyright 2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Internal header for sensor fusion usage of rerun logging.
6 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7 * @ingroup tracking
8 */
9
10#pragma once
11
13#include "sensor_fusion.hpp"
14
15#include <rerun.hpp>
16
17
18namespace xrt::tracking::constellation::optimizer::sensor_fusion {
19
20//! Whether to log older keyframes or just the newest.
21constexpr bool kLogOldKeyframes = false;
22
23const std::string_view kRerunRecordingId = "constellation_sensor_fusion";
24
26{
27public: // Methods
28 RerunContext() : RerunStream(kRerunRecordingId) {}
29
30 /*!
31 * Logs one sliding-window solve to rerun.
32 *
33 * Everything is logged against two timelines: a `solves` sequence, which is the only one that advances
34 * monotonically, and a `fusion_time` timestamp taken from the newest keyframe in the window.
35 *
36 * @param snapshot The window and its solved state, as captured around @ref SensorFusion::runFusionLocked.
37 */
38 void
39 logSolve(const SolveSnapshot &snapshot);
40
41private: // Methods
42 void
43 logStaticScene();
44
45 void
46 logSolveSummary(const SolveSnapshot &snapshot);
47
48 void
49 logSolverMetrics(const SolveSnapshot &snapshot);
50
51 void
52 logCameras(const SolveSnapshot &snapshot);
53
54 void
55 logDevice(const SolveSnapshot &snapshot);
56
57 void
58 logDeviceWindow(const SolveSnapshot &snapshot);
59
60 void
61 logDeviceMetrics(const SolveSnapshot &snapshot);
62
63 void
64 logObservations(const SolveSnapshot &snapshot);
65};
66
67}; // namespace xrt::tracking::constellation::optimizer::sensor_fusion
Shared internal helpers for every constellation rerun recorder.
Constellation tracker sensor fusion.
constexpr bool kLogOldKeyframes
Whether to log older keyframes or just the newest.
Definition sensor_fusion_rerun.hpp:21
The recording stream a rerun recorder logs through.
Definition constellation_rerun_common.hpp:149
void logSolve(const SolveSnapshot &snapshot)
Logs one sliding-window solve to rerun.
Definition sensor_fusion_rerun.cpp:498
One solve, whole: what went in, what came out, and how the solver got there.
Definition sensor_fusion.hpp:393