Monado OpenXR Runtime
Loading...
Searching...
No Matches
t_constellation_tracker.h
Go to the documentation of this file.
1// Copyright 2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Header defining the constellation tracker parameters and functions.
6 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7 * @ingroup xrt_iface
8 */
9
10#pragma once
11
12#include "xrt/xrt_tracking.h"
13
15
16#include "tracking/t_tracking.h"
17
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define XRT_CONSTELLATION_MAX_TRACKING_MOSAICS (1)
24
25struct t_constellation_tracker;
26
27/*!
28 * @public @memberof t_constellation_tracker
29
30 * A constellation tracker camera is a single camera that the constellation tracker will use to track devices. The
31 * constellation tracker will provide the blob sink for this camera.
32 */
34{
35 //! The calibration for this camera
37
38 //! The position of this camera, in the mosaic's tracking origin.
40 /*
41 * Whether this camera has a concrete pose in the tracking origin, or if we don't know the current position and
42 * need to compute it.
43 */
44 bool has_concrete_pose;
45
46 /*!
47 * The blob sink for this camera, this is an out parameter filled in by the constellation tracker, and you are
48 * expected to pass this to your blobwatch implementation.
49 */
51};
52
53/*!
54 * @public @memberof t_constellation_tracker
55 *
56 * A constellation tracker camera mosaic is a set of cameras that may or may not be physically attached, but
57 * importantly, they all fire at the same time and are synchronized with each other.
58 */
60{
61 /*
62 * The constellation tracking source for this mosaic, if any. This is used as the origin of any cameras in the
63 * mosaic.
64 */
65 struct t_constellation_tracker_tracking_source *tracking_origin;
66
67 //! The cameras in this mosaic, with their blob sinks filled in by the constellation tracker.
68 struct t_constellation_tracker_camera cameras[XRT_TRACKING_MAX_CAMS];
69 //! The number of cameras in this mosaic.
71};
72
73/*!
74 * @public @memberof t_constellation_tracker
75 *
76 * Parameters for adding a device to the constellation tracker.
77 */
79{
80 //! The constellation pattern for this device.
82
83 /*
84 * An optional tracking source to give the constellation tracker extra information to better throw out bad
85 * guesses when finding the device.
86 */
87 struct t_constellation_tracker_tracking_source *tracking_source;
88
89 /*!
90 * The IMU sink for this device. This pointer is filled in by the constellation tracker. After adding the device
91 * to the constellation tracker, drivers should send IMU samples to this sink.
92 */
94};
95
97{
98 T_CONSTELLATION_TRACKER_FLAGS_NONE = 0,
99 /*!
100 * Whether the constellation tracker should be deterministic.
101 * Turn this on if you require consistent results, at the cost of performance.
102 */
104};
105
106/*!
107 * @public @memberof t_constellation_tracker
108 */
110{
111 //! Flags for the constellation tracker, see t_constellation_tracker_flags
113 struct t_constellation_tracker_camera_mosaic mosaics[XRT_CONSTELLATION_MAX_TRACKING_MOSAICS];
114 size_t num_mosaics;
115};
116
117/*!
118 * @public @memberof t_constellation_tracker
119 */
120int
121t_constellation_tracker_create(struct xrt_frame_context *xfctx,
122 struct t_constellation_tracker_params *params,
123 struct t_constellation_tracker **out_tracker);
124
125int
126t_constellation_tracker_add_device(struct t_constellation_tracker *tracker,
128 struct t_constellation_tracker_device *device,
129 t_constellation_device_id_t *out_device_id);
130
131int
132t_constellation_tracker_remove_device(struct t_constellation_tracker *tracker, t_constellation_device_id_t device);
133
134struct xrt_tracking_origin *
135t_constellation_tracker_get_tracking_origin(struct t_constellation_tracker *tracker);
136
137#ifdef __cplusplus
138}
139#endif
A generic interface to allow a tracking system to receive "snapshots" of seen t_blob in a frame.
Definition t_constellation.h:109
Essential calibration data for a single camera, or single lens/sensor of a stereo camera.
Definition t_tracking.h:236
A constellation tracker camera mosaic is a set of cameras that may or may not be physically attached,...
Definition t_constellation_tracker.h:60
struct t_constellation_tracker_camera cameras[XRT_TRACKING_MAX_CAMS]
The cameras in this mosaic, with their blob sinks filled in by the constellation tracker.
Definition t_constellation_tracker.h:68
size_t num_cameras
The number of cameras in this mosaic.
Definition t_constellation_tracker.h:70
A constellation tracker camera is a single camera that the constellation tracker will use to track de...
Definition t_constellation_tracker.h:34
struct t_blob_sink * blob_sink
The blob sink for this camera, this is an out parameter filled in by the constellation tracker,...
Definition t_constellation_tracker.h:50
struct xrt_pose pose_in_origin
The position of this camera, in the mosaic's tracking origin.
Definition t_constellation_tracker.h:39
struct t_camera_calibration calibration
The calibration for this camera.
Definition t_constellation_tracker.h:36
Parameters for adding a device to the constellation tracker.
Definition t_constellation_tracker.h:79
struct t_constellation_tracker_led_model led_model
The constellation pattern for this device.
Definition t_constellation_tracker.h:81
struct xrt_imu_sink * imu_sink
The IMU sink for this device.
Definition t_constellation_tracker.h:93
A constellation tracker device is a device that the constellation tracker will attempt to track in 6d...
Definition t_constellation.h:347
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:274
Definition t_constellation_tracker.h:110
enum t_constellation_tracker_flags flags
Flags for the constellation tracker, see t_constellation_tracker_flags.
Definition t_constellation_tracker.h:112
A constellation tracker tracking source is an arbitrary source of tracking data for the constellation...
Definition t_constellation.h:229
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
An object to send IMU samples to.
Definition xrt_tracking.h:181
A pose composed of a position and orientation.
Definition xrt_defines.h:502
A tracking system or device origin.
Definition xrt_tracking.h:83
Header defining the tracking system integration in Monado.
t_constellation_tracker_flags
Definition t_constellation_tracker.h:97
@ T_CONSTELLATION_TRACKER_FLAGS_DETERMINISTIC
Whether the constellation tracker should be deterministic.
Definition t_constellation_tracker.h:103
Tracking API interface.
Header defining the tracking system integration in Monado.