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_FRAME_SOURCES];
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 * The IMU sink for this device. This pointer is filled in by the constellation tracker. After adding the device
85 * to the constellation tracker, drivers should send IMU samples to this sink.
86 */
88 /*!
89 * The calibration details for the pushed IMU samples.
90 */
92};
93
95{
96 T_CONSTELLATION_TRACKER_FLAGS_NONE = 0,
97 /*!
98 * Whether the constellation tracker should be deterministic.
99 * Turn this on if you require consistent results, at the cost of performance.
100 */
102};
103
104/*!
105 * @public @memberof t_constellation_tracker
106 */
108{
109 //! Flags for the constellation tracker, see t_constellation_tracker_flags
111 struct t_constellation_tracker_camera_mosaic mosaics[XRT_CONSTELLATION_MAX_TRACKING_MOSAICS];
112 size_t num_mosaics;
113};
114
115/*!
116 * @public @memberof t_constellation_tracker
117 */
118int
119t_constellation_tracker_create(struct xrt_frame_context *xfctx,
120 struct t_constellation_tracker_params *params,
121 struct t_constellation_tracker **out_tracker);
122
123int
124t_constellation_tracker_add_device(struct t_constellation_tracker *tracker,
126 struct t_constellation_tracker_device *device,
127 t_constellation_device_id_t *out_device_id);
128
129int
130t_constellation_tracker_remove_device(struct t_constellation_tracker *tracker, t_constellation_device_id_t device);
131
132struct xrt_tracking_origin *
133t_constellation_tracker_get_tracking_origin(struct t_constellation_tracker *tracker);
134
135int
136t_constellation_tracker_get_tracked_pose(struct t_constellation_tracker *tracker,
137 t_constellation_device_id_t device,
138 timepoint_ns when_ns,
139 struct xrt_space_relation *out_relation);
140
141#ifdef __cplusplus
142}
143#endif
int64_t timepoint_ns
Integer timestamp type.
Definition u_time.h:77
A generic interface to allow a tracking system to receive "snapshots" of seen t_blob in a frame.
Definition t_constellation.h:136
Essential calibration data for a single camera, or single lens/sensor of a stereo camera.
Definition t_tracking.h:269
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_FRAME_SOURCES]
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:87
struct xrt_imu_noise_calibration imu_calibration
The calibration details for the pushed IMU samples.
Definition t_constellation_tracker.h:91
A constellation tracker device is a device that the constellation tracker will attempt to track in 6d...
Definition t_constellation.h:415
The LED model is a series of points which define the real-world positions of all LEDs.
Definition t_constellation.h:313
Definition t_constellation_tracker.h:108
enum t_constellation_tracker_flags flags
Flags for the constellation tracker, see t_constellation_tracker_flags.
Definition t_constellation_tracker.h:110
A constellation tracker tracking source is an arbitrary source of tracking data for the constellation...
Definition t_constellation.h:256
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
IMU noise model and bias calibration, the noise density grows with the reading on each axis.
Definition xrt_tracking.h:213
An object to send IMU samples to.
Definition xrt_tracking.h:260
A pose composed of a position and orientation.
Definition xrt_defines.h:535
A relation with two spaces, includes velocity and acceleration.
Definition xrt_defines.h:726
A tracking system or device origin.
Definition xrt_tracking.h:115
Header defining the tracking system integration in Monado.
t_constellation_tracker_flags
Definition t_constellation_tracker.h:95
@ T_CONSTELLATION_TRACKER_FLAGS_DETERMINISTIC
Whether the constellation tracker should be deterministic.
Definition t_constellation_tracker.h:101
Tracking API interface.
Header defining the tracking system integration in Monado.