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// @note In general usage, we don't use the internal header, rerun is an opt-in debugging feature, so we are OK using
13// internal APIs here to keep code clean and non-invasive. Please look at target_builder_rift.c instead for normal
14// usage of these APIs.
17
18#include <rerun.hpp>
19
20
21namespace xrt::tracking::constellation {
22
23const std::string rerun_recording_id = "constellation_tracking";
24
26{
27public: // Methods
28 RerunContext() : RerunStream(rerun_recording_id) {}
29
30 /*!
31 * Log a camera sample to rerun.
32 *
33 * @remarks Call with `tracker->device_lock` held.
34 *
35 * @param tracker The constellation tracker.
36 * @param camera_sample The camera sample to log.
37 */
38 void
39 logSample(const ConstellationTracker &tracker, const CameraSample &camera_sample);
40
41 /*!
42 * Logs a camera's image frame to rerun.
43 *
44 * @param mosaic_index The index of the mosaic the camera belongs to.
45 * @param camera_index The index of the camera in the mosaic.
46 * @param frame The camera's image frame.
47 */
48 void
50 uint32_t mosaic_index,
51 uint32_t camera_index,
52 const xrt_frame &frame);
53
54private: // Methods
55 void
56 logStaticScene(const CameraSample &camera_sample, const t_camera_calibration &calibration);
57
58 void
59 logLedModel(const std::string &entity_name,
60 t_constellation_device_id_t device_id,
61 const t_constellation_tracker_led_model &led_model,
62 bool prior);
63
64 void
65 logBlobSet(const CameraSample &camera_sample);
66
67 void
68 logFrameCameraMetrics(const CameraSample &camera_sample);
69
70 void
71 logFrameDeviceMetrics(const CameraSample &camera_sample, const DeviceState &device_state);
72
73 void
74 logFoundPose(const CameraSample &camera_sample,
75 const std::unique_ptr<Device> &device,
76 const FoundDevicePose &found_pose);
77};
78
79}; // namespace xrt::tracking::constellation
Shared internal helpers for every constellation rerun recorder.
Definition u_pacing_compositor.c:58
Essential calibration data for a single camera, or single lens/sensor of a stereo camera.
Definition t_tracking.h:269
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:311
Definition t_constellation_tracker_internal.hpp:128
Definition t_constellation_tracker_internal.hpp:453
Definition t_constellation_tracker_internal.hpp:111
Definition t_constellation_tracker_internal.hpp:97
Definition constellation_tracker_rerun.hpp:26
void logSample(const ConstellationTracker &tracker, const CameraSample &camera_sample)
Log a camera sample to rerun.
Definition constellation_tracker_rerun.cpp:254
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:330
The recording stream a rerun recorder logs through.
Definition constellation_rerun_common.hpp:149
Basic frame data structure - holds a pointer to buffer.
Definition xrt_frame.h:25
Internal ures for the constellation tracker.