Monado OpenXR Runtime
Loading...
Searching...
No Matches
constellation_tracker_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 constellation tracker usage of the constellation tracker rerun logging.
6 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7 * @ingroup tracking
8 */
9
10#pragma once
11
12#include "xrt/xrt_config_build.h"
13
14// @note In general usage, we don't use the internal header, rerun is an opt-in debugging feature, so we are OK using
15// internal APIs here to keep code clean and non-invasive. Please look at target_builder_rift.c instead for normal
16// usage of these APIs.
18
19#include <rerun.hpp>
20
21
22namespace xrt::tracking::constellation {
23
24const std::string rerun_recording_id = "constellation_tracking";
25
27{
28public: // Fields
29 std::unique_ptr<rerun::RecordingStream> stream{};
30
31public: // Methods
33 {
34 stream = std::make_unique<rerun::RecordingStream>(rerun_recording_id);
35 }
36
37 /*!
38 * Log a camera sample to rerun.
39 *
40 * @remarks Call with `tracker->device_lock` held.
41 *
42 * @param tracker The constellation tracker.
43 * @param camera_sample The camera sample to log.
44 */
45 void
46 LogSample(const ConstellationTracker &tracker, const CameraSample &camera_sample);
47
48 /*!
49 * Logs a camera's image frame to rerun.
50 *
51 * @param mosaic_index The index of the mosaic the camera belongs to.
52 * @param camera_index The index of the camera in the mosaic.
53 * @param frame The camera's image frame.
54 */
55 void
57 uint32_t mosaic_index,
58 uint32_t camera_index,
59 const xrt_frame &frame);
60
61private: // Methods
62 void
63 LogStaticScene(const CameraSample &camera_sample, const t_camera_calibration &calibration);
64
65 void
66 LogLedModel(const std::string &entity_name,
67 t_constellation_device_id_t device_id,
68 const t_constellation_tracker_led_model &led_model,
69 bool prior);
70
71 void
72 LogBlobSet(const CameraSample &camera_sample);
73
74 void
75 LogFrameCameraMetrics(const CameraSample &camera_sample);
76
77 void
78 LogFrameDeviceMetrics(const CameraSample &camera_sample, const DeviceState &device_state);
79};
80
81}; // namespace xrt::tracking::constellation
Definition u_pacing_compositor.c:54
Essential calibration data for a single camera, or single lens/sensor of a stereo camera.
Definition t_tracking.h:236
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:266
Definition t_constellation_tracker_internal.hpp:112
Definition t_constellation_tracker_internal.hpp:378
Definition t_constellation_tracker_internal.hpp:97
Definition constellation_tracker_rerun.hpp:27
void LogImageFrame(const ConstellationTracker &tracker, uint32_t mosaic_index, uint32_t camera_index, const xrt_frame &frame)
Logs a camera's image frame to rerun.
Definition constellation_tracker_rerun.cpp:410
void LogSample(const ConstellationTracker &tracker, const CameraSample &camera_sample)
Log a camera sample to rerun.
Definition constellation_tracker_rerun.cpp:336
Basic frame data structure - holds a pointer to buffer.
Definition xrt_frame.h:25
Internal ures for the constellation tracker.