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/*!
91 * @public @memberof t_constellation_tracker
92 */
94{
95 struct t_constellation_tracker_camera_mosaic mosaics[XRT_CONSTELLATION_MAX_TRACKING_MOSAICS];
96 size_t num_mosaics;
97};
98
99/*!
100 * @public @memberof t_constellation_tracker
101 */
102int
103t_constellation_tracker_create(struct xrt_frame_context *xfctx,
104 struct t_constellation_tracker_params *params,
105 struct t_constellation_tracker **out_tracker);
106
107int
108t_constellation_tracker_add_device(struct t_constellation_tracker *tracker,
110 struct t_constellation_tracker_device *device,
111 t_constellation_device_id_t *out_device_id);
112
113int
114t_constellation_tracker_remove_device(struct t_constellation_tracker *tracker, t_constellation_device_id_t device);
115
116struct xrt_tracking_origin *
117t_constellation_tracker_get_tracking_origin(struct t_constellation_tracker *tracker);
118
119#ifdef __cplusplus
120}
121#endif
A generic interface to allow a tracking system to receive "snapshots" of seen t_blob in a frame.
Definition t_constellation.h:101
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
A constellation tracker device is a device that the constellation tracker will attempt to track in 6d...
Definition t_constellation.h:327
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.h:94
A constellation tracker tracking source is an arbitrary source of tracking data for the constellation...
Definition t_constellation.h:221
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
A pose composed of a position and orientation.
Definition xrt_defines.h:492
A tracking system or device origin.
Definition xrt_tracking.h:78
Header defining the tracking system integration in Monado.
Tracking API interface.
Header defining the tracking system integration in Monado.